Engineer details CPU tricks to speed up Boolean prefix-xor scans
A technical write-up describes methods for computing an xor-scan (a form of prefix computation) over bit arrays using carry-less multiplication instructions and a prefix-doubling technique. The approach restructures the carry-dependency chain so operations can run with greater instruction-level parallelism, reportedly reaching tens of bits processed per CPU cycle on cached memory, and extends the single-word technique to full arrays by exploiting runs of identical bits.