Repository navigation
bench(variant): add list-index lookup with empty lists - #11193
Conversation
|
Hi @emecii, I think the scope I agreed on in #11052 (comment) is way too big. What we need here is to add a simple |
|
Reduced this in a716195 to one function in Both benchmark cases, 367 unit tests, 13 doc tests, Clippy, formatting, and spelling checks pass. The revised description records the measurement boundaries and known empty-row validity difference. This does not resolve the earlier ~24% overhead in the separate all-OOB Int64 case; #11052 is unchanged. |
|
Thanks @emecii. Could you add the all-OOB Int64 case that showed a regression as well? Otherwise it's good |
|
Added in 1855069: |
Which issue does this PR close?
Related to #11101 and #11052.
Rationale for this change
Add a small benchmark for
variant_getlist-index lookup when some rows are empty lists.What changes are included in this PR?
Two benchmark functions in the existing
variant_kernelstarget, following the nearby cases. The first builds 8,192 rows alternating empty and two-element integer lists, then looks up index zero with Variant output. The same fixture is timed unshredded and shredded as a List of Int64. Fixture construction, shredding, and path setup are outside timing; options cloning and output destruction are included.The second restores the previously regressing small case: 64 one-element
[1]lists shredded as List, index 9 (all out of bounds), and Int64 output. It checks that all 64 results are null before timing. The benchmark name isvariant_get_list_index_all_oob_int64_64_rows.Are these changes tested?
cargo bench --locked -p parquet-variant-compute --bench variant_kernels -- variant_get_list_index --test: all three cases pass.cargo test --locked -p parquet-variant-compute: 367 unit tests and 13 doc tests passed for the previous revision; this benchmark-only follow-up was validated with the benchmark smoke run, Criterion, Clippy, and formatting.cargo clippy --locked -p parquet-variant-compute --all-targets --all-features -- -D warningscargo fmt --all -- --check,git diff --check, and the repository spelling check with typos 1.37.0 pass.The benchmark runs on the existing baseline without asserting the missing-index validity behavior that #11052 fixes. Unshredded and shredded outputs currently differ in validity on empty rows, so these timings do not establish an equivalent-output speedup or the cost of that correctness fix. The earlier ~24% overhead observed in the separate 64-row all-OOB Int64 case remains unresolved; adding its benchmark does not change that result.
Are there any user-facing changes?
No. This only adds a benchmark; production code and dependencies are unchanged.
AI usage
OpenAI Codex generated this benchmark revision, ran the validation, and drafted this description and review reply.