Revisit batched bit-refill and multi-literal-per-refill decoding inside the fastloop, now that the two prior negative results (#2630, #2669) have had their premises removed. Strictly sequenced after the packed length/distance entries and the fastloop split.
Why the prior negatives no longer apply
Both earlier attempts measured the right change on the wrong shape, and both post-mortems said so explicitly:
After the fastloop split removes the per-refill input bounds check, and the packed length/distance entries make the fast-literal test a single bit test, the premises flip:
- refill once per iteration with one 8-byte wide load (k≈7 now, not 1), then
- decode 2-3 literals, or a literal + a full match, from the ~56 buffered bits — libdeflate does up to 3 literals per refill with next-entry preloading; miniz does 1 refill per 2 literals.
Method
Keep the same-worktree A/B discipline from #2630 (a cross-worktree baseline once produced a 37-point phantom). Spike with the equivalence sorry'd. If, even on the restructured loop, our codegen still measures this neutral, close it with the measurement — the fastloop-split gains are retained regardless.
Dependencies
Hard: requires the packed length/distance entries (single-bit literal test) and the fastloop/slowloop margin split (no per-refill input check) to be in place first.
🤖 Prepared with Claude Code
Revisit batched bit-refill and multi-literal-per-refill decoding inside the fastloop, now that the two prior negative results (#2630, #2669) have had their premises removed. Strictly sequenced after the packed length/distance entries and the fastloop split.
Why the prior negatives no longer apply
Both earlier attempts measured the right change on the wrong shape, and both post-mortems said so explicitly:
After the fastloop split removes the per-refill input bounds check, and the packed length/distance entries make the fast-literal test a single bit test, the premises flip:
Method
Keep the same-worktree A/B discipline from #2630 (a cross-worktree baseline once produced a 37-point phantom). Spike with the equivalence
sorry'd. If, even on the restructured loop, our codegen still measures this neutral, close it with the measurement — the fastloop-split gains are retained regardless.Dependencies
Hard: requires the packed length/distance entries (single-bit literal test) and the fastloop/slowloop margin split (no per-refill input check) to be in place first.
🤖 Prepared with Claude Code