fallintoplace opened a new pull request, #1397: URL: https://github.com/apache/arrow-go/pull/1397
### What Speed up `CountSetBits` for ranges with an unaligned offset. ### Why The current path checks leading bits one at a time before using word popcount. ### Implementation - Count the first partial byte with a mask and `bits.OnesCount8`. - Use the existing bulk path for the remaining bits. ### Benchmark - Go 1.26.3, Apple M1 Pro, median of 5, 0 allocs/op: 5 bits at offset 3, 10.88 → 2.92 ns/op (3.7x); 8,192 bits at offset 3, 124.4 → 80.18 ns/op (1.55x). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
