alexanderbianchi opened a new pull request, #3741:
URL: https://github.com/apache/iceberg-rust/pull/3741

   ## Which issue does this PR close?
   
   Related to #2557 and #3739. This draft carries Liang-Chi Hsieh’s three 
Criterion harness commits from #2558, rebased onto `986153cb5`, plus one commit 
adding the string `IN` benchmark to the existing `with_predicate` group.
   
   ## What changes are included in this PR?
   
   The benchmark scans 262,144 rows from local Snappy-compressed Parquet files 
with either 400 or 5,000 distinct UTF-8 literals. Each list runs against the 
same rows stored in one file and in 64 files. It projects the integer row ID 
and the string key. Half the rows match. Each case checks the exact 131,072 
matching row IDs before timing and checks the returned row count on every scan.
   
   Criterion binds a fresh predicate outside each timed iteration. The timer 
includes building file tasks, cloning the predicate for each file, building any 
index on first use, and reading the batches. The reader uses 8,192-row batches 
and one file at a time. The draft also ports the harness to the current 
`FileScanTask` and `ArrowReaderOptions` builders.
   
   ## Are these changes tested?
   
   Criterion mean wall time on an Apple M5 Pro, with 20 samples per case. All 
three builds used the same benchmark source. Each reader ran separately.
   
   | Distinct keys | Files | Original reader | FNV index | Foldhash index | 
Original / foldhash | FNV / foldhash |
   | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
   | 400 | 1 | 105.91 ms | 4.12 ms | 3.58 ms | 29.58× | 1.15× |
   | 400 | 64 | 110.21 ms | 8.19 ms | 7.78 ms | 14.17× | 1.05× |
   | 5,000 | 1 | 1,039.66 ms | 4.66 ms | 4.14 ms | 251.41× | 1.13× |
   | 5,000 | 64 | 1,067.74 ms | 8.85 ms | 8.13 ms | 131.33× | 1.09× |
   
   Repeating the indexed runs in reverse order at 400 keys gave 4.14 ms with 
FNV and 3.61 ms with foldhash for one file, and 7.44 ms and 7.05 ms for 64 
files. The first 400-key, 64-file comparison had overlapping 95% confidence 
intervals (FNV 7.65–8.92 ms, foldhash 7.17–8.53 ms). The repeat had narrower 
intervals (7.36–7.59 ms and 6.95–7.18 ms).
   
   ### Reproduce
   
   Start on this draft branch. The baseline uses the reader from `986153cb5`. 
The next two runs apply the successive reader commits from #3739. Use the same 
machine and Cargo target directory for all three builds.
   
   ```sh
   git fetch https://github.com/apache/iceberg-rust.git pull/3739/head
   bench_in() {
     cargo bench --locked -p iceberg --bench arrow_reader -- 
with_predicate/string_in \
       --warm-up-time 1 --measurement-time 3 --sample-size 20 --noplot 
--save-baseline "$1"
   }
   bench_in scalar
   git cherry-pick a16ffe709c258595895f5d3c9f00d34b3abedc9f
   bench_in fnv
   git cherry-pick 0c658b41e4a7df48f3362aa21056783a87b05696
   bench_in foldhash
   ```
   
   All 15 Criterion cases passed in test mode on each reader. The draft passed 
formatting, Clippy for the benchmark target, the public API check, and the 
Iceberg library suite (2,274 passed, 4 ignored).
   
   ## AI Disclosure
   
   Codex adapted the existing harness, wrote the new cases, and ran the 
comparisons. The fixture uses short `user-key-*` strings, a 50% match rate, and 
warm local storage. Longer keys and remote storage can change how much of the 
scan time goes to membership checks.
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to