iceberg-kitten opened a new pull request, #1636:
URL: https://github.com/apache/arrow-go/pull/1636

   ### Why
   Sequential and reverse scans can hit a binary search each time they enter a 
short chunk.
   
   ### What
   Resolve indices in neighboring chunks directly.
   
   ### Implementation
   Check the previous or next chunk before searching. The fallback finds the 
last chunk start at or before the index so empty chunks with repeated offsets 
cannot capture the lookup.
   
   ### Benchmark
   
   Resolve one row index per operation across 8,192 chunks. The 4,096-row 
random case showed no statistically clear timing change.
   
   | Input | Time/op before → after | Change |
   | --- | ---: | ---: |
   | 1 row/chunk, forward | 67.9 → 11.8 ns | -82.6% |
   | 1 row/chunk, reverse | 68.1 → 11.9 ns | -82.5% |
   | 1 row/chunk, random | 133 → 124 ns | -7.0% |
   | 64 rows/chunk, forward | 6.46 → 4.65 ns | -28.1% |
   | 64 rows/chunk, reverse | 6.56 → 4.5 ns | -31.4% |
   | 64 rows/chunk, random | 136 → 112 ns | -17.5% |
   | 4,096 rows/chunk, forward | 5.11 → 4.06 ns | -20.5% |
   | 4,096 rows/chunk, reverse | 4.92 → 4.15 ns | -15.7% |
   | 4,096 rows/chunk, random | 127 → 118 ns | -7.7% |
   
   Medians of 8 runs per revision on Linux amd64, Intel Core i9-12900HK, Go 
1.26.11, pinned to one efficiency core. Baseline is `main` at `aba35416`. Use 
the same benchmark on both revisions. Copy the PR's benchmark file into the 
baseline checkout before running. All cases reported 0 allocs/op.
   
   ```sh
   go test ./arrow/compute/exec -run '^$' -bench 
'^BenchmarkChunkResolver$/^rowsPerChunk=(1|64|4096)$' -benchmem 
-benchtime=120ms -count=8 -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