Skip to content

perf: reuse cached dictionary value hashes in vectorized_append - #25185

Open
LiaCastaneda wants to merge 1 commit into
apache:mainfrom
LiaCastaneda:perf/dict-group-values-cache-hashes
Open

perf: reuse cached dictionary value hashes in vectorized_append#25185
LiaCastaneda wants to merge 1 commit into
apache:mainfrom
LiaCastaneda:perf/dict-group-values-cache-hashes

Conversation

@LiaCastaneda

@LiaCastaneda LiaCastaneda commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

  • Closes #.

Rationale for this change

vectorized_append is the path taken when we have non streaming hash aggregations (when there is no ordering in the group 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_append now 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 existing Arc::ptr_eq cache from #24418, which only covered the scalar append_val path.

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

@github-actions github-actions Bot added the physical-plan Changes to the physical-plan crate label Sep 11, 2026
@LiaCastaneda
LiaCastaneda marked this pull request as ready for review September 11, 2026 12:19
@LiaCastaneda
LiaCastaneda force-pushed the perf/dict-group-values-cache-hashes branch from f0bcd4f to e33ef31 Compare September 11, 2026 12:21
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.92%. Comparing base (0da2151) to head (e33ef31).
⚠️ Report is 4 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Rich-T-kid

Copy link
Copy Markdown
Contributor

run benchmark dictionary_group_values

1 similar comment
@Rich-T-kid

Copy link
Copy Markdown
Contributor

run benchmark dictionary_group_values

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c5634643824-2318-46mjh 6.12.94+ #1 SMP Tue Aug 4 08:44:15 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected

Comparing perf/dict-group-values-cache-hashes (e33ef31) to 0da2151 (merge-base) diff

Run configuration
run benchmark dictionary_group_values

Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c5634644346-2319-dl7lv 6.12.94+ #1 SMP Tue Aug 4 08:44:15 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected

Comparing perf/dict-group-values-cache-hashes (e33ef31) to 0da2151 (merge-base) diff

Run configuration
run benchmark dictionary_group_values

Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

Comparing perf/dict-group-values-cache-hashes (e33ef31) to 0da2151 (merge-base) diff

Run configuration
run benchmark dictionary_group_values
CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Details

group                                                                             HEAD                                    perf_dict-group-values-cache-hashes
-----                                                                             ----                                    -----------------------------------
dict_intern_emit/intern_emit/size_65536_card_1000_null_0.00                       1.02   510.6±34.75µs 122.4 MElem/sec    1.00    499.3±4.16µs 125.2 MElem/sec
dict_intern_emit/intern_emit/size_65536_card_20_null_0.00                         1.03   435.4±33.13µs 143.5 MElem/sec    1.00    422.4±5.97µs 147.9 MElem/sec
dict_intern_emit/intern_emit/size_65536_card_300_null_0.00                        1.03   466.6±33.83µs 134.0 MElem/sec    1.00    452.9±4.98µs 138.0 MElem/sec
dict_intern_emit/intern_emit/size_65536_card_65536_null_0.00                      1.00      5.9±0.01ms 10.6 MElem/sec     1.00      5.9±0.01ms 10.6 MElem/sec
dict_intern_emit/intern_emit/size_65536_card_75_null_0.00                         1.02   452.3±33.65µs 138.2 MElem/sec    1.00   442.5±13.51µs 141.2 MElem/sec
dict_intern_emit/intern_emit/size_8192_card_1000_null_0.00                        1.01   126.9±13.00µs 61.6 MElem/sec     1.00    125.6±7.75µs 62.2 MElem/sec
dict_intern_emit/intern_emit/size_8192_card_20_null_0.00                          1.00     56.7±0.83µs 137.8 MElem/sec    1.01     57.0±0.63µs 137.1 MElem/sec
dict_intern_emit/intern_emit/size_8192_card_300_null_0.00                         1.00     76.5±0.57µs 102.1 MElem/sec    1.22   93.3±167.44µs 83.7 MElem/sec
dict_intern_emit/intern_emit/size_8192_card_75_null_0.00                          1.00     62.3±0.62µs 125.3 MElem/sec    1.00     62.4±0.57µs 125.2 MElem/sec
dict_intern_emit/intern_emit/size_8192_card_8192_null_0.00                        1.02    524.7±1.64µs 14.9 MElem/sec     1.00    513.1±2.57µs 15.2 MElem/sec
dict_repeated_intern_emit/repeated_intern_emit/size_65536_card_1000_null_0.10     1.00      2.4±0.01ms 105.3 MElem/sec    1.00      2.4±0.01ms 104.8 MElem/sec
dict_repeated_intern_emit/repeated_intern_emit/size_65536_card_20_null_0.10       1.00      2.2±0.01ms 112.9 MElem/sec    1.01      2.2±0.00ms 112.1 MElem/sec
dict_repeated_intern_emit/repeated_intern_emit/size_65536_card_300_null_0.10      1.00      2.3±0.00ms 108.5 MElem/sec    1.01      2.3±0.00ms 107.9 MElem/sec
dict_repeated_intern_emit/repeated_intern_emit/size_65536_card_65536_null_0.10    1.05     16.8±0.15ms 14.9 MElem/sec     1.00     16.0±0.14ms 15.6 MElem/sec
dict_repeated_intern_emit/repeated_intern_emit/size_65536_card_75_null_0.10       1.00      2.3±0.00ms 109.2 MElem/sec    1.01      2.3±0.01ms 108.7 MElem/sec
dict_repeated_intern_emit/repeated_intern_emit/size_8192_card_1000_null_0.10      1.00    395.3±1.78µs 79.0 MElem/sec     1.05   415.9±89.84µs 75.1 MElem/sec
dict_repeated_intern_emit/repeated_intern_emit/size_8192_card_20_null_0.10        1.00    264.0±1.88µs 118.4 MElem/sec    1.05    276.6±1.80µs 113.0 MElem/sec
dict_repeated_intern_emit/repeated_intern_emit/size_8192_card_300_null_0.10       1.00    306.3±1.88µs 102.0 MElem/sec    1.04    319.3±2.09µs 97.9 MElem/sec
dict_repeated_intern_emit/repeated_intern_emit/size_8192_card_75_null_0.10        1.00  292.0±127.67µs 107.0 MElem/sec    1.00    292.3±1.61µs 106.9 MElem/sec
dict_repeated_intern_emit/repeated_intern_emit/size_8192_card_8192_null_0.10      1.00   1222.3±4.88µs 25.6 MElem/sec     1.00   1225.8±3.59µs 25.5 MElem/sec
dict_scalar_append_equal/scalar_append_equal/size_65536_card_1000_null_0.10       1.00   1349.3±2.98µs 46.3 MElem/sec     1.01   1359.7±4.64µs 46.0 MElem/sec
dict_scalar_append_equal/scalar_append_equal/size_65536_card_20_null_0.10         1.03   1261.5±3.09µs 49.5 MElem/sec     1.00   1224.7±2.63µs 51.0 MElem/sec
dict_scalar_append_equal/scalar_append_equal/size_65536_card_300_null_0.10        1.00   1260.9±3.09µs 49.6 MElem/sec     1.00   1263.3±3.15µs 49.5 MElem/sec
dict_scalar_append_equal/scalar_append_equal/size_65536_card_65536_null_0.10      1.00      7.3±0.02ms  8.5 MElem/sec     1.03      7.5±0.02ms  8.3 MElem/sec
dict_scalar_append_equal/scalar_append_equal/size_65536_card_75_null_0.10         1.00   1246.8±3.35µs 50.1 MElem/sec     1.02   1277.7±2.87µs 48.9 MElem/sec
dict_take_n/take_n/size_65536_card_1000_null_0.10                                 1.00      2.5±0.00ms 98.6 MElem/sec     1.02      2.6±0.01ms 97.1 MElem/sec
dict_take_n/take_n/size_65536_card_20_null_0.10                                   1.00      2.2±0.01ms 115.7 MElem/sec    1.03      2.2±0.00ms 112.5 MElem/sec
dict_take_n/take_n/size_65536_card_300_null_0.10                                  1.00      2.3±0.00ms 108.3 MElem/sec    1.02      2.4±0.01ms 105.8 MElem/sec
dict_take_n/take_n/size_65536_card_65536_null_0.10                                1.00     25.5±0.06ms  9.8 MElem/sec     1.02     26.1±0.07ms  9.6 MElem/sec
dict_take_n/take_n/size_65536_card_75_null_0.10                                   1.00      2.2±0.01ms 111.3 MElem/sec    1.02      2.3±0.01ms 108.6 MElem/sec

Resource Usage

dictionary_group_values — base (merge-base)

Metric Value
Wall time 510.1s
Peak memory 632.3 MiB
Avg memory 64.0 MiB
CPU user 344.5s
CPU sys 25.0s
Peak spill 0 B

dictionary_group_values — branch

Metric Value
Wall time 505.1s
Peak memory 869.1 MiB
Avg memory 89.4 MiB
CPU user 353.2s
CPU sys 18.5s
Peak spill 0 B

File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

Comparing perf/dict-group-values-cache-hashes (e33ef31) to 0da2151 (merge-base) diff

Run configuration
run benchmark dictionary_group_values
CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Details

group                                                                             HEAD                                    perf_dict-group-values-cache-hashes
-----                                                                             ----                                    -----------------------------------
dict_intern_emit/intern_emit/size_65536_card_1000_null_0.00                       1.02   514.2±28.28µs 121.6 MElem/sec    1.00   506.0±10.80µs 123.5 MElem/sec
dict_intern_emit/intern_emit/size_65536_card_20_null_0.00                         1.02   443.3±32.44µs 141.0 MElem/sec    1.00   433.2±11.85µs 144.3 MElem/sec
dict_intern_emit/intern_emit/size_65536_card_300_null_0.00                        1.00   460.5±27.21µs 135.7 MElem/sec    1.02   468.7±14.47µs 133.4 MElem/sec
dict_intern_emit/intern_emit/size_65536_card_65536_null_0.00                      1.00      6.1±0.01ms 10.2 MElem/sec     1.02      6.3±0.08ms 10.0 MElem/sec
dict_intern_emit/intern_emit/size_65536_card_75_null_0.00                         1.02   453.7±33.84µs 137.8 MElem/sec    1.00    443.1±5.17µs 141.0 MElem/sec
dict_intern_emit/intern_emit/size_8192_card_1000_null_0.00                        1.00    125.0±1.50µs 62.5 MElem/sec     1.18  147.3±202.16µs 53.0 MElem/sec
dict_intern_emit/intern_emit/size_8192_card_20_null_0.00                          1.00     56.6±0.57µs 138.1 MElem/sec    1.05     59.2±1.67µs 132.0 MElem/sec
dict_intern_emit/intern_emit/size_8192_card_300_null_0.00                         1.00     76.6±1.85µs 102.0 MElem/sec    1.03     78.6±2.97µs 99.4 MElem/sec
dict_intern_emit/intern_emit/size_8192_card_75_null_0.00                          1.00     62.5±0.72µs 125.0 MElem/sec    1.01     63.2±2.98µs 123.6 MElem/sec
dict_intern_emit/intern_emit/size_8192_card_8192_null_0.00                        1.02    524.7±3.99µs 14.9 MElem/sec     1.00    513.3±2.84µs 15.2 MElem/sec
dict_repeated_intern_emit/repeated_intern_emit/size_65536_card_1000_null_0.10     1.01      2.4±0.03ms 103.9 MElem/sec    1.00      2.4±0.00ms 105.1 MElem/sec
dict_repeated_intern_emit/repeated_intern_emit/size_65536_card_20_null_0.10       1.00      2.2±0.00ms 112.6 MElem/sec    1.00      2.2±0.01ms 112.2 MElem/sec
dict_repeated_intern_emit/repeated_intern_emit/size_65536_card_300_null_0.10      1.00      2.3±0.02ms 107.4 MElem/sec    1.00      2.3±0.02ms 107.5 MElem/sec
dict_repeated_intern_emit/repeated_intern_emit/size_65536_card_65536_null_0.10    1.00     16.5±0.09ms 15.1 MElem/sec     1.24     20.4±2.52ms 12.2 MElem/sec
dict_repeated_intern_emit/repeated_intern_emit/size_65536_card_75_null_0.10       1.01      2.3±0.02ms 108.0 MElem/sec    1.00      2.3±0.00ms 108.6 MElem/sec
dict_repeated_intern_emit/repeated_intern_emit/size_8192_card_1000_null_0.10      1.00    396.6±1.62µs 78.8 MElem/sec     1.03    409.7±3.68µs 76.3 MElem/sec
dict_repeated_intern_emit/repeated_intern_emit/size_8192_card_20_null_0.10        1.00    267.7±2.26µs 116.7 MElem/sec    1.04    278.9±2.31µs 112.0 MElem/sec
dict_repeated_intern_emit/repeated_intern_emit/size_8192_card_300_null_0.10       1.00    307.1±2.38µs 101.8 MElem/sec    1.04    320.0±1.95µs 97.7 MElem/sec
dict_repeated_intern_emit/repeated_intern_emit/size_8192_card_75_null_0.10        1.00    280.3±2.65µs 111.5 MElem/sec    1.05    293.0±2.37µs 106.7 MElem/sec
dict_repeated_intern_emit/repeated_intern_emit/size_8192_card_8192_null_0.10      1.00   1234.8±9.82µs 25.3 MElem/sec     1.01   1242.4±7.58µs 25.2 MElem/sec
dict_scalar_append_equal/scalar_append_equal/size_65536_card_1000_null_0.10       1.00   1356.0±5.05µs 46.1 MElem/sec     1.02   1384.0±3.16µs 45.2 MElem/sec
dict_scalar_append_equal/scalar_append_equal/size_65536_card_20_null_0.10         1.00   1225.1±3.19µs 51.0 MElem/sec     1.00   1226.2±3.99µs 51.0 MElem/sec
dict_scalar_append_equal/scalar_append_equal/size_65536_card_300_null_0.10        1.01   1265.9±8.18µs 49.4 MElem/sec     1.00   1257.4±4.88µs 49.7 MElem/sec
dict_scalar_append_equal/scalar_append_equal/size_65536_card_65536_null_0.10      1.00      7.2±0.02ms  8.7 MElem/sec     1.13      8.1±0.36ms  7.7 MElem/sec
dict_scalar_append_equal/scalar_append_equal/size_65536_card_75_null_0.10         1.00   1249.5±5.23µs 50.0 MElem/sec     1.00   1244.2±3.67µs 50.2 MElem/sec
dict_take_n/take_n/size_65536_card_1000_null_0.10                                 1.00      2.6±0.02ms 97.2 MElem/sec     1.00      2.6±0.01ms 97.2 MElem/sec
dict_take_n/take_n/size_65536_card_20_null_0.10                                   1.00      2.2±0.02ms 114.8 MElem/sec    1.03      2.3±0.02ms 111.0 MElem/sec
dict_take_n/take_n/size_65536_card_300_null_0.10                                  1.00      2.4±0.01ms 106.2 MElem/sec    1.00      2.4±0.00ms 106.2 MElem/sec
dict_take_n/take_n/size_65536_card_65536_null_0.10                                1.00     25.5±0.28ms  9.8 MElem/sec     1.02     26.0±0.06ms  9.6 MElem/sec
dict_take_n/take_n/size_65536_card_75_null_0.10                                   1.00      2.2±0.00ms 111.5 MElem/sec    1.03      2.3±0.01ms 108.7 MElem/sec

Resource Usage

dictionary_group_values — base (merge-base)

Metric Value
Wall time 515.1s
Peak memory 725.9 MiB
Avg memory 64.6 MiB
CPU user 344.8s
CPU sys 24.6s
Peak spill 0 B

dictionary_group_values — branch

Metric Value
Wall time 510.1s
Peak memory 584.0 MiB
Avg memory 85.5 MiB
CPU user 356.2s
CPU sys 17.9s
Peak spill 0 B

File an issue against this benchmark runner

@Rich-T-kid

Copy link
Copy Markdown
Contributor

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 intern() call. in practice this isnt what happens, dictionary array values typically map to one parquet row-group which can be very large.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

physical-plan Changes to the physical-plan crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants