You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Perf: trim GC slab tails without scanning discarded free slots #101
The exact shared-realm object_churn profile attributed 216 of 994 coordinator evaluation samples to GcCellBacking.trimEmptyTailChunks. The old path filtered the intrusive free list node by node, including every slot in tail chunks that were immediately returned. Bootstrap cells leave a small live size-class prefix, so the optimized path reconstructs the list from issued slots in the bounded retained prefix instead.
Rejected exact-parent experiments are recorded in the issue timeline: deferring nursery trimming changed reuse behavior, while only fast-clearing completely empty buckets missed the measured live-prefix case.
Acceptance criteria
Tail trimming work is bounded by retained issued slots rather than discarded free slots.
Fully empty buckets clear their all-free list in O(1).
Partially live buckets retain exactly their valid free nodes and existing reusable-tail behavior.
Preserve capacity, issued/free/live counters, ownership indexes, and allocator delegation.
Materially improve the exact shared row without regressing direct throughput.
Pass focused allocator/GC/no-GIL tests and the batched unit/TSan gates.
Update the benchmark report, raw evidence, README, and benchmark guide.
changed the title [-]Perf: defer GC slab trimming until full collections[/-][+]Perf: trim fully empty GC slab buckets without scanning every free slot[/+]on Jul 14, 2026
changed the title [-]Perf: trim fully empty GC slab buckets without scanning every free slot[/-][+]Perf: trim GC slab tails without scanning discarded free slots[/+]on Jul 14, 2026
short exact-parent direct object_churn (100 jobs): 21 samples/binary, 213.873 ms -> 206.555 ms median (3.4% faster), all checksums 1030552128;
short exact-parent shared (8 lanes x 10 jobs): 21 samples/binary, 624.623 ms -> 557.282 ms median (12.1% faster), all checksums 825067776;
publication-load shared (8 lanes x 100 jobs): 6 samples/binary, 13.016 s -> 11.425 s median (12.2% faster), all checksums 8309369344.
Validation:
focused GC cell backing units: 20/20 pass;
complete units: 762/762 pass, 0 leaked;
focused GC cell backing TSan: 20/20 pass.
The implementation preserves trimming and the eight-chunk reuse tail, but reconstructs free nodes only from issued slots in the retained prefix. A completely discarded size class clears in O(1). Full publication and README refresh will follow in a separate docs commit.
Completed and published on main. Exact-parent eight-lane shared object_churn improved 12.2%; the full publication improved 10.3% to 11,089.300 ms. Direct exact-parent throughput improved 3.4%. Focused allocator units, all 762 units, focused TSan, and the full 1,540-sample comparison passed with exact checksums.
Activity
[-]Perf: defer GC slab trimming until full collections[/-][+]Perf: trim fully empty GC slab buckets without scanning every free slot[/+][-]Perf: trim fully empty GC slab buckets without scanning every free slot[/-][+]Perf: trim GC slab tails without scanning discarded free slots[/+]chrisbbreuer commentedon Jul 14, 2026
Retained implementation evidence on exact parent
3cc2a58c(baseline runner SHA-256576826a06d9699821712452dc42e5ad2dd9c1682e7d6a3aaa4665f91d95474fb):object_churn(100 jobs): 21 samples/binary, 213.873 ms -> 206.555 ms median (3.4% faster), all checksums1030552128;825067776;8309369344.Validation:
The implementation preserves trimming and the eight-chunk reuse tail, but reconstructs free nodes only from issued slots in the retained prefix. A completely discarded size class clears in O(1). Full publication and README refresh will follow in a separate docs commit.
perf(gc): bound tail slab freelist rebuilds (#101)
docs(bench): publish bounded trim results (#97, #101)
chrisbbreuer commentedon Jul 14, 2026
Completed and published on
main. Exact-parent eight-lane sharedobject_churnimproved 12.2%; the full publication improved 10.3% to 11,089.300 ms. Direct exact-parent throughput improved 3.4%. Focused allocator units, all 762 units, focused TSan, and the full 1,540-sample comparison passed with exact checksums.