Latest Results
FSSTView: coalesce adjacent spans in the gather (compaction at export)
The only overhead GatherBulk carries over the theoretical minimum is the gather
memcpy, and it was copying every element's span individually. For an
order-preserving filter, surviving neighbours are still heap-adjacent, so a run
of k survivors can be copied in one memcpy instead of k. The gather now
accumulates a contiguous [run_start, run_end) heap range and flushes it once per
run, making the copy cost proportional to the number of runs rather than the
number of elements.
This is a strict win where survivors form long runs (non-selective filter:
many_short/nonselective canonicalize ~5.38ms -> ~4.75ms) and a no-op for a
shuffle (no adjacency -> one copy per element as before, behind a cheap branch).
Combined with Direct (single contiguous run, zero copy), the export is now
optimal: gather work scales with run count, then one bulk decode, then a
sequential element-ordered view-build.
Correctness: spans are still emitted in element order, so the decoded buffer
stays element-ordered; coalescing only fires on genuine zero-gap adjacency.
Covered by the existing all-strategies-agree and gaps+shuffle+nullable tests.
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>claude/fsstview-array-listview-TdW45 Latest Branches
-8%
refactor/parent-ref-stack-allocated -3%
claude/fsstview-array-listview-TdW45 0%
© 2026 CodSpeed Technology