fallintoplace opened a new pull request, #1405:
URL: https://github.com/apache/arrow-go/pull/1405

   ## What
   Expand nullable boolean bitmaps eight values at a time.
   
   ## Why
   The dense-null path currently reads and writes each bit individually.
   
   ## Implementation
   - Use a 256-byte lookup to deposit packed values into valid positions by 
byte.
   - Keep the sparse-null path unchanged and preserve overlap and surrounding 
bits.
   - Add offset and null-pattern parity coverage.
   
   ## Benchmark
   The per-bit and byte paths both include the initial output-buffer copy. Go 
1.26.3, Apple M1 Pro (`darwin/arm64`), `GOMAXPROCS=1`; 10 runs of 150 ms per 
case.
   
   | Metric | Before | After | Change |
   | --- | ---: | ---: | ---: |
   | 64 Ki values, 50% null, offset 0 | 204.39 µs/op | 34.70 µs/op | -83.03% |
   | 64 Ki values, 50% null, offset 5 | 203.34 µs/op | 36.82 µs/op | -81.89% |
   | 64 Ki values, 14.3% null, offset 0 | 302.05 µs/op | 37.53 µs/op | -87.58% |
   | 64 Ki values, 14.3% null, offset 5 | 300.81 µs/op | 37.19 µs/op | -87.64% |
   | 1 Mi values, 50% null, offset 0 | 3.336 ms/op | 555.0 µs/op | -83.36% |
   | 1 Mi values, 50% null, offset 5 | 3.337 ms/op | 585.9 µs/op | -82.44% |
   | 1 Mi values, 14.3% null, offset 0 | 5.112 ms/op | 600.6 µs/op | -88.25% |
   | 1 Mi values, 14.3% null, offset 5 | 5.043 ms/op | 597.1 µs/op | -88.16% |
   | Geometric mean, 8 cases | 1.010 ms/op | 146.1 µs/op | -85.53% |
   
   All cases use 0 B/op and 0 allocs/op. Command: `GOMAXPROCS=1 go test 
./parquet/internal/encoding -run '^$' -bench '^BenchmarkSpacedBitmapExpansion$' 
-benchmem -benchtime=150ms -count=10 -cpu=1`.
   


-- 
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]

Reply via email to