Skip to content

docs: re-validate perf-review I79/I84 against post-rewrite code - #82

Merged
Xof merged 1 commit into
mainfrom
docs/revalidate-i79-i84
Jun 23, 2026
Merged

docs: re-validate perf-review I79/I84 against post-rewrite code#82
Xof merged 1 commit into
mainfrom
docs/revalidate-i79-i84

Conversation

@Xof

@Xof Xof commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Re-validates two 2026-06-01 perf-review items against the current code (both predate the multi-page freemap rewrite and the transaction.rs extraction, so their line refs were stale).

  • I84 (freemap allocate_first scans from byte 0, no cursor) → ✅ ADDRESSED. The COW tree's FreeMapTree::allocate_first (freemap_tree.rs:470) now scans from a hint cursor and advances it per allocation — exactly what the finding asked for. Closed.
  • I79 (clone→swap at commit) → re-scoped, not the free win it was billed as. The 8 KB freemap-bitmap clone is gone (freemap is a COW tree now); the surviving current_live_slots clone in SlotPacker::commit is read post-commit by sparse_data_pages / data_page_ids_snapshot, so a mem::swap would expose pre-transaction state and needs a read-timing proof + regression test — and it's a microsecond HashMap clone below the fsync floor. Not a no-bench win.

Outcome of the requested re-validation: no cheap confirmed code wins here — one finding was already fixed by the freemap rewrite, the other isn't cheap in the current code. Tracker corrected so neither gets re-triggered.

Docs-only.

Both predate the multi-page freemap + transaction.rs extraction, so their
line refs are stale and their fixes are overtaken:

- I84 (freemap from-0 scan, no cursor): ADDRESSED — FreeMapTree::allocate_first
  now scans from a hint cursor (freemap_tree.rs:470), threaded via cow_alloc.
  Marked resolved.
- I79 (clone-not-swap at commit): re-scoped. The 8 KB freemap-bitmap clone is
  gone (freemap is a COW tree now); the surviving current_live_slots clone in
  SlotPacker::commit is NOT a free swap — current_live_slots is read post-commit
  by stats (sparse_data_pages / data_page_ids_snapshot), so a swap needs a
  read-timing safety proof + test, and it sits below the fsync floor. Not a
  no-bench win.
@github-actions

Copy link
Copy Markdown

🚦 Bench results: PR vs main

⚠️ 2 regression(s) detected across 2 scenario/mode pair(s)

Scenario Mode Δ throughput Worst Δ
ycsb-b chisel-mem -2.9% p99 +18.4% ⚠️
ycsb-a redb-strict -0.0% p99 +12.5% ⚠️
document-store chisel-mem +1.5%
document-store chisel-strict -0.4%
document-store redb-strict +2.2%
document-store sqlite-strict +0.0%
mutation-log chisel-mem +1.4%
mutation-log chisel-strict +0.3%
mutation-log redb-strict -0.0%
mutation-log sqlite-strict -1.2%
ycsb-a chisel-mem +14.3%
ycsb-a chisel-strict -0.1%
ycsb-a sqlite-strict +4.3%
ycsb-b chisel-strict +0.7%
ycsb-b redb-strict -0.2%
ycsb-b sqlite-strict +0.5%
Per-scenario detail (4 metrics × cells)

document-store

Mode Throughput p50 p95 p99
chisel-mem 14739 ops/s → 14953 ops/s (+1.5%) 10.6 µs → 10.8 µs (+1.4%) 137.5 µs → 136.3 µs (-0.8%) 790.3 µs → 787.2 µs (-0.4%)
chisel-strict 2923 ops/s → 2913 ops/s (-0.4%) 22.9 µs → 21.4 µs (-6.8%) 1.04 ms → 1.01 ms (-2.3%) 2.79 ms → 2.70 ms (-3.3%)
redb-strict 3877 ops/s → 3964 ops/s (+2.2%) 23.2 µs → 20.0 µs (-13.7%) 692.3 µs → 612.6 µs (-11.5%) 3.16 ms → 2.98 ms (-5.9%)
sqlite-strict 5129 ops/s → 5131 ops/s (+0.0%) 19.0 µs → 19.7 µs (+3.5%) 378.4 µs → 400.0 µs (+5.7%) 1.79 ms → 1.95 ms (+8.6%)

mutation-log

Mode Throughput p50 p95 p99
chisel-mem 52638 ops/s → 53358 ops/s (+1.4%) 22.4 µs → 22.4 µs (+0.0%) 28.5 µs → 27.5 µs (-3.7%) 35.1 µs → 33.7 µs (-3.9%)
chisel-strict 1754 ops/s → 1760 ops/s (+0.3%) 321.2 µs → 317.6 µs (-1.1%) 726.8 µs → 734.1 µs (+1.0%) 15.94 ms → 15.85 ms (-0.6%)
redb-strict 1806 ops/s → 1805 ops/s (-0.0%) 161.1 µs → 159.6 µs (-0.9%) 285.2 µs → 289.2 µs (+1.4%) 32.90 ms → 32.19 ms (-2.2%)
sqlite-strict 5127 ops/s → 5068 ops/s (-1.2%) 90.0 µs → 90.1 µs (+0.1%) 263.5 µs → 262.4 µs (-0.4%) 459.6 µs → 436.1 µs (-5.1%)

ycsb-a

Mode Throughput p50 p95 p99
chisel-mem 19874 ops/s → 22707 ops/s (+14.3%) 79.8 µs → 67.1 µs (-15.9%) 107.0 µs → 97.1 µs (-9.2%) 183.9 µs → 160.4 µs (-12.8%)
chisel-strict 2228 ops/s → 2227 ops/s (-0.1%) 286.4 µs → 292.7 µs (+2.2%) 843.5 µs → 847.6 µs (+0.5%) 1.54 ms → 1.66 ms (+7.3%)
redb-strict 2683 ops/s → 2682 ops/s (-0.0%) 125.0 µs → 126.5 µs (+1.2%) 225.6 µs → 244.7 µs (+8.5%) 484.5 µs → 545.1 µs (+12.5%) ⚠️
sqlite-strict 196999 ops/s → 205386 ops/s (+4.3%) 4.8 µs → 4.6 µs (-3.1%) 7.4 µs → 6.9 µs (-6.7%) 9.4 µs → 8.8 µs (-6.9%)

ycsb-b

Mode Throughput p50 p95 p99
chisel-mem 143468 ops/s → 139266 ops/s (-2.9%) 2.8 µs → 2.6 µs (-6.4%) 80.0 µs → 78.3 µs (-2.2%) 93.3 µs → 110.5 µs (+18.4%) ⚠️
chisel-strict 21193 ops/s → 21347 ops/s (+0.7%) 4.8 µs → 4.8 µs (-0.1%) 307.4 µs → 302.3 µs (-1.6%) 768.0 µs → 766.9 µs (-0.1%)
redb-strict 27202 ops/s → 27149 ops/s (-0.2%) 3.4 µs → 3.3 µs (-2.7%) 126.3 µs → 123.5 µs (-2.2%) 217.3 µs → 199.6 µs (-8.2%)
sqlite-strict 247026 ops/s → 248259 ops/s (+0.5%) 4.0 µs → 4.0 µs (-1.2%) 5.9 µs → 5.8 µs (-1.4%) 7.0 µs → 6.9 µs (-0.8%)
Generated by chisel-bench-diff at 2026-06-23T06:28:04Z. Compares PR HEAD against main. Never blocks merge — signal, not gate. Thresholds: throughput 5%, p50 5%, p95 10%, p99 10%.

@Xof
Xof merged commit 1428fa2 into main Jun 23, 2026
10 checks passed
@Xof
Xof deleted the docs/revalidate-i79-i84 branch July 1, 2026 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant