perf: reuse cached dictionary value hashes in vectorized_append - #25185
perf: reuse cached dictionary value hashes in vectorized_append#25185LiaCastaneda wants to merge 1 commit into
Conversation
f0bcd4f to
e33ef31
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #25185 +/- ##
========================================
Coverage 81.92% 81.92%
========================================
Files 1132 1132
Lines 421192 421360 +168
Branches 421192 421360 +168
========================================
+ Hits 345041 345190 +149
- Misses 55756 55769 +13
- Partials 20395 20401 +6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
run benchmark dictionary_group_values |
1 similar comment
|
run benchmark dictionary_group_values |
|
🤖 Benchmark running (GKE) | trigger CPU Details (lscpu)Comparing perf/dict-group-values-cache-hashes (e33ef31) to 0da2151 (merge-base) diff Run configurationrun benchmark dictionary_group_valuesResults will be posted here when complete File an issue against this benchmark runner |
|
🤖 Benchmark running (GKE) | trigger CPU Details (lscpu)Comparing perf/dict-group-values-cache-hashes (e33ef31) to 0da2151 (merge-base) diff Run configurationrun benchmark dictionary_group_valuesResults will be posted here when complete File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Instance: Comparing perf/dict-group-values-cache-hashes (e33ef31) to 0da2151 (merge-base) diff Run configurationrun benchmark dictionary_group_valuesCPU Details (lscpu)Details
Resource Usagedictionary_group_values — base (merge-base)
dictionary_group_values — branch
File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Instance: Comparing perf/dict-group-values-cache-hashes (e33ef31) to 0da2151 (merge-base) diff Run configurationrun benchmark dictionary_group_valuesCPU Details (lscpu)Details
Resource Usagedictionary_group_values — base (merge-base)
dictionary_group_values — branch
File an issue against this benchmark runner |
|
there is no perf difference entirely due to how the benchmarks are set up. in the benchmarks the values array are created fresh for each if maintainers are interested in seeing what the performance gains this would mean for parquet files we may need to wait for #24227 to be over the finish line so we can run @adriangbot with the flag enabled. |
Which issue does this PR close?
Rationale for this change
vectorized_appendis the path taken when we have non streaming hash aggregations (when there is no ordering in thegroup by), right now it re hashed the entire dictionary values on every batch unlike append_val which that only does this if the values array was already seen before.What changes are included in this PR?
vectorized_appendnow reuses the cached value hashes when a batch carries the same dictionary values array as the previous one (this is the common case of a repartition or filter), instead of re hashing the whole dictionary and re-initialising the map on every batch. This extends the existingArc::ptr_eqcache from #24418, which only covered the scalarappend_valpath.What is the testing strategy for this PR?
All dict tests pass, I have a PR for a benchmark that exercises this path -> #25198
Are there any user-facing changes?
no, this is a pure perf PR