Expand description
Posting-block decode kernels: bit-unpack and delta prefix sum. Posting-block decode kernels: bit-unpack and delta prefix sum.
§Why this is novel territory
No published Lucene, tantivy, PISA, or PEF postings measurement exists on
Apple M-series silicon (research/02a:287, :516); tantivy’s SIMD decode
is SSE2-gated and x86-only. A NEON block-max decode path on a 128-byte
cache-line machine is ground nobody has taken.
§Shape
Two kernels, both following the Task 03/04 convention: scalar is the
behavioural oracle, the NEON arm sits behind runtime feature detection,
and prop_neon_unpack_equals_scalar proves equivalence over every bit
width rather than over a sampled few.
- bit-unpack widens a packed run into
u32lanes. The NEON arm uses only stablecore::arch::aarch64intrinsics — shifts, ands, and loads. Unlikesdotandfcvtl(Task 03), no inline assembly is needed here. - prefix sum turns docid gaps back into absolute ids. The shape is Lemire’s interleaved load/store form, which reaches 8.9 B values/s on an M4 against 3.9 B scalar.
No timing is recorded here. The decode-rate figure is NOT YET MEASURED: this machine is not single-tenant, and a contaminated number is worse than no number.
Constants§
- NARROW_
MAX_ BITS - Unpacks using the best available arm.
Functions§
- prefix_
sum - Runs the prefix sum using the best available arm.
- prefix_
sum_ scalar - Turns gaps into absolute ids in place, scalar oracle.
- prefix_
sum_ wide - Turns gaps into absolute ids, sixteen values per group.
- unpack
- Runs the bit-unpack using the best available arm.
- unpack_
narrow - Unpacks at eight bits or fewer, eight values per iteration.
- unpack_
scalar - Unpacks
countvalues ofbitseach, scalar oracle.