Skip to content

[9195] optimize group value bytes#23193

Open
Rich-T-kid wants to merge 5 commits into
apache:mainfrom
Rich-T-kid:rich-t-kid/optimize-groupValueBytes
Open

[9195] optimize group value bytes#23193
Rich-T-kid wants to merge 5 commits into
apache:mainfrom
Rich-T-kid:rich-t-kid/optimize-groupValueBytes

Conversation

@Rich-T-kid

@Rich-T-kid Rich-T-kid commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

The previous EmitTo::First(n) path in GroupValuesBytes used take().into_state() to drain the entire map, then re-interned the surviving groups back from scratch, rebuilding the hash table on every spill. This PR adds a dedicated emit(n) method to ArrowBytesMap that emits the first n values zero-copy by slicing directly from the frozen buffer, compacts the surviving bytes in-place, and rebases the hash table entries rather than discarding and rebuilding them.

What changes are included in this PR?

  • ArrowBytesMap::emit(n) : new method that emits the first n values zero-copy, compacts the surviving buffer in-place, and rebases non-inline hash table offsets so the map stays valid without a rebuild
  • GroupValuesBytes::emit : EmitTo::First(n) now uses map.emit(n) instead of take().into_state() + re-intern, eliminating the O(n) hash table rebuild on every spill; EmitTo::All keeps the O(1) take().into_state() fast path

Are these changes tested?

yes, ran into some edge cases that the test caught & fixed.

Are there any user-facing changes?

yes, this adds a public method to ArrowBytesMap

@github-actions github-actions Bot added physical-expr Changes to the physical-expr crates physical-plan Changes to the physical-plan crate labels Jun 25, 2026
@Rich-T-kid Rich-T-kid force-pushed the rich-t-kid/optimize-groupValueBytes branch from 2e3d6e0 to d0f3e0d Compare June 25, 2026 22:52
@github-actions github-actions Bot added the auto detected api change Auto detected API change label Jun 25, 2026
@Rich-T-kid Rich-T-kid force-pushed the rich-t-kid/optimize-groupValueBytes branch 3 times, most recently from ce12740 to 1e74a3d Compare June 25, 2026 22:54
perf: zero-copy emit and unified drain for GroupValuesBytes

Replace the O(n) Buffer::from(slice) memcpy in ArrowBytesMap::emit() with
a zero-copy path: freeze the MutableBuffer (finish()), slice the emitted
window from the frozen Arc, and copy only the surviving bytes back into a
fresh builder.

Add drain_emitted(n) to evict hash table entries for the n emitted values
and renumber survivors, enabling EmitTo::First(n) without a full rebuild.

Unify GroupValuesBytes::emit() to a single code path for both EmitTo::All
and EmitTo::First(n): compute n, call map.emit(n), then map.drain_emitted(n).

remove local benchmarks
@github-actions github-actions Bot removed the auto detected api change Auto detected API change label Jun 25, 2026
@Rich-T-kid Rich-T-kid force-pushed the rich-t-kid/optimize-groupValueBytes branch from 1e74a3d to f77b22b Compare June 25, 2026 22:57
pub fn emit(&mut self, n: usize) -> ArrayRef {
let total = self.offsets.len() - 1;
let remaining = total - self.emitted;
assert!(n <= remaining, "emit({n}): only {remaining} values remain");

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly not sure when to return a panic as opposed to just clamping down on n. I think it's fair to make the caller responsible for passing in a correct n. Im open to ideas against this

@Rich-T-kid Rich-T-kid force-pushed the rich-t-kid/optimize-groupValueBytes branch from 0982ab0 to d3d6ef4 Compare June 26, 2026 03:36
@Rich-T-kid Rich-T-kid force-pushed the rich-t-kid/optimize-groupValueBytes branch from d3d6ef4 to 337af59 Compare June 26, 2026 04:31
@Rich-T-kid Rich-T-kid marked this pull request as ready for review June 26, 2026 04:42
@Rich-T-kid

Rich-T-kid commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author
Image 6-26-26 at 12 45 AM Image 6-26-26 at 12 45 AM Image 6-26-26 at 12 45 AM (1)

local results some of the benchmarks ^

@gabotechs

Copy link
Copy Markdown
Contributor

run benchmarks tpch_sf10 tpch_mem_sf1 clickbench_1

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4811531139-712-6wxwn 6.12.85+ #1 SMP Mon May 11 08:17:35 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 rich-t-kid/optimize-groupValueBytes (902effe) to a27f030 (merge-base) diff using: tpch_sf10
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-c4811531139-713-cwkv5 6.12.85+ #1 SMP Mon May 11 08:17:35 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 rich-t-kid/optimize-groupValueBytes (902effe) to a27f030 (merge-base) diff using: tpch_mem_sf1
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-c4811531139-714-hqw6t 6.12.85+ #1 SMP Mon May 11 08:17:35 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 rich-t-kid/optimize-groupValueBytes (902effe) to a27f030 (merge-base) diff using: clickbench_1
Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

Benchmark for this request failed.

Last 20 lines of output:

Click to expand
# Micro-Benchmarks (specific operators and features)
cancellation:           How long cancelling a query takes
nlj:                    Benchmark for simple nested loop joins, testing various join scenarios
hj:                     Benchmark for simple hash joins, testing various join scenarios
smj:                    Benchmark for simple sort merge joins, testing various join scenarios
dict:                   Benchmark for dictionary-encoded group-by scenarios
compile_profile:        Compile and execute TPC-H across selected Cargo profiles, reporting timing and binary size


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Supported Configuration (Environment Variables)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
DATA_DIR            directory to store datasets
CARGO_COMMAND       command that runs the benchmark binary
DATAFUSION_DIR      directory to use (default /workspace/datafusion-base)
RESULTS_NAME        folder where the benchmark files are stored
PREFER_HASH_JOIN    Prefer hash join algorithm (default true)
SIMULATE_LATENCY    Simulate object store latency to mimic S3 (default false)
DATAFUSION_*        Set the given datafusion configuration


File an issue against this benchmark runner

1 similar comment
@adriangbot

Copy link
Copy Markdown

Benchmark for this request failed.

Last 20 lines of output:

Click to expand
# Micro-Benchmarks (specific operators and features)
cancellation:           How long cancelling a query takes
nlj:                    Benchmark for simple nested loop joins, testing various join scenarios
hj:                     Benchmark for simple hash joins, testing various join scenarios
smj:                    Benchmark for simple sort merge joins, testing various join scenarios
dict:                   Benchmark for dictionary-encoded group-by scenarios
compile_profile:        Compile and execute TPC-H across selected Cargo profiles, reporting timing and binary size


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Supported Configuration (Environment Variables)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
DATA_DIR            directory to store datasets
CARGO_COMMAND       command that runs the benchmark binary
DATAFUSION_DIR      directory to use (default /workspace/datafusion-base)
RESULTS_NAME        folder where the benchmark files are stored
PREFER_HASH_JOIN    Prefer hash join algorithm (default true)
SIMULATE_LATENCY    Simulate object store latency to mimic S3 (default false)
DATAFUSION_*        Set the given datafusion configuration


File an issue against this benchmark runner

@Rich-T-kid

Rich-T-kid commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

@gabotechs benchmarks failed, I don't see a reason from the bot as to why.
could you retry?

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

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

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

Comparing HEAD and rich-t-kid_optimize-groupValueBytes
--------------------
Benchmark clickbench_1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                  HEAD ┃   rich-t-kid_optimize-groupValueBytes ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 0  │           0.68 / 1.47 ±1.49 / 4.45 ms │           0.72 / 1.51 ±1.54 / 4.60 ms │     no change │
│ QQuery 1  │        14.00 / 14.54 ±0.59 / 15.69 ms │        13.83 / 14.23 ±0.40 / 14.97 ms │     no change │
│ QQuery 2  │        40.29 / 40.71 ±0.37 / 41.23 ms │        39.88 / 40.28 ±0.34 / 40.88 ms │     no change │
│ QQuery 3  │        35.98 / 36.51 ±0.83 / 38.16 ms │        35.71 / 35.97 ±0.15 / 36.19 ms │     no change │
│ QQuery 4  │     239.11 / 243.16 ±3.82 / 249.36 ms │     243.99 / 253.06 ±9.93 / 269.80 ms │     no change │
│ QQuery 5  │     430.44 / 437.56 ±5.87 / 447.11 ms │     434.31 / 438.59 ±2.79 / 442.40 ms │     no change │
│ QQuery 6  │           0.74 / 0.85 ±0.16 / 1.16 ms │           0.75 / 0.87 ±0.17 / 1.20 ms │     no change │
│ QQuery 7  │        15.71 / 15.75 ±0.03 / 15.81 ms │        15.60 / 16.41 ±1.38 / 19.16 ms │     no change │
│ QQuery 8  │     360.51 / 368.17 ±7.25 / 380.05 ms │     353.26 / 360.13 ±4.75 / 367.76 ms │     no change │
│ QQuery 9  │    553.83 / 571.63 ±17.19 / 595.02 ms │    547.38 / 571.33 ±21.36 / 610.62 ms │     no change │
│ QQuery 10 │        83.36 / 85.11 ±1.60 / 87.95 ms │        83.84 / 84.94 ±1.09 / 86.80 ms │     no change │
│ QQuery 11 │        96.08 / 96.78 ±0.59 / 97.74 ms │     95.66 / 102.04 ±10.72 / 123.31 ms │  1.05x slower │
│ QQuery 12 │     443.78 / 451.62 ±7.48 / 463.81 ms │    442.75 / 461.08 ±12.04 / 479.83 ms │     no change │
│ QQuery 13 │    455.45 / 476.27 ±16.27 / 495.87 ms │    458.87 / 483.42 ±18.65 / 506.19 ms │     no change │
│ QQuery 14 │     463.86 / 477.05 ±8.04 / 488.89 ms │    449.08 / 470.07 ±20.23 / 495.49 ms │     no change │
│ QQuery 15 │     287.26 / 295.64 ±4.58 / 299.88 ms │    294.42 / 305.74 ±15.22 / 335.70 ms │     no change │
│ QQuery 16 │     634.23 / 645.51 ±7.80 / 654.66 ms │    642.05 / 658.36 ±14.14 / 674.20 ms │     no change │
│ QQuery 17 │    641.83 / 656.61 ±13.57 / 680.72 ms │     640.68 / 652.83 ±6.32 / 659.13 ms │     no change │
│ QQuery 18 │ 1253.90 / 1287.26 ±26.59 / 1319.02 ms │ 1281.92 / 1320.21 ±30.52 / 1369.09 ms │     no change │
│ QQuery 19 │        33.69 / 37.01 ±4.00 / 43.56 ms │       34.35 / 46.86 ±13.84 / 70.37 ms │  1.27x slower │
│ QQuery 20 │    623.65 / 636.99 ±11.91 / 658.32 ms │    618.70 / 633.40 ±16.25 / 664.78 ms │     no change │
│ QQuery 21 │    641.70 / 652.76 ±12.54 / 677.31 ms │    628.43 / 643.83 ±11.31 / 655.62 ms │     no change │
│ QQuery 22 │  1327.79 / 1333.02 ±3.56 / 1337.19 ms │ 1341.84 / 1352.82 ±11.87 / 1371.31 ms │     no change │
│ QQuery 23 │ 3522.21 / 3560.38 ±31.32 / 3595.83 ms │ 3575.73 / 3593.52 ±16.24 / 3622.51 ms │     no change │
│ QQuery 24 │     209.96 / 217.32 ±7.45 / 231.66 ms │    208.78 / 218.25 ±13.50 / 245.05 ms │     no change │
│ QQuery 25 │     182.21 / 186.85 ±7.44 / 201.47 ms │     180.04 / 185.97 ±3.89 / 190.08 ms │     no change │
│ QQuery 26 │     212.85 / 213.33 ±0.40 / 213.91 ms │     210.00 / 213.19 ±2.26 / 216.98 ms │     no change │
│ QQuery 27 │     752.26 / 763.75 ±7.50 / 774.93 ms │     769.09 / 776.79 ±8.23 / 788.54 ms │     no change │
│ QQuery 28 │ 3490.58 / 3510.70 ±12.93 / 3530.66 ms │ 3494.19 / 3527.28 ±30.13 / 3580.24 ms │     no change │
│ QQuery 29 │       43.67 / 53.41 ±15.26 / 83.57 ms │        43.68 / 47.57 ±4.02 / 53.30 ms │ +1.12x faster │
│ QQuery 30 │    415.10 / 437.30 ±17.48 / 462.73 ms │    412.44 / 435.64 ±29.24 / 492.91 ms │     no change │
│ QQuery 31 │    380.30 / 404.52 ±18.55 / 434.14 ms │    346.91 / 377.37 ±21.44 / 400.97 ms │ +1.07x faster │
│ QQuery 32 │   929.95 / 983.66 ±32.20 / 1027.98 ms │  962.43 / 1009.39 ±57.04 / 1119.37 ms │     no change │
│ QQuery 33 │ 1492.00 / 1534.26 ±23.94 / 1565.69 ms │ 1501.64 / 1525.00 ±15.45 / 1545.93 ms │     no change │
│ QQuery 34 │  1509.72 / 1518.26 ±7.04 / 1528.66 ms │ 1527.96 / 1549.53 ±22.55 / 1592.41 ms │     no change │
│ QQuery 35 │    323.54 / 354.89 ±24.01 / 397.12 ms │    324.36 / 369.25 ±61.74 / 486.46 ms │     no change │
│ QQuery 36 │     131.94 / 141.32 ±7.01 / 147.69 ms │     131.61 / 144.40 ±7.40 / 150.42 ms │     no change │
│ QQuery 37 │        54.15 / 55.64 ±1.16 / 57.59 ms │        53.39 / 56.68 ±2.99 / 61.05 ms │     no change │
│ QQuery 38 │        89.01 / 92.30 ±3.36 / 98.80 ms │        89.94 / 93.34 ±3.31 / 98.26 ms │     no change │
│ QQuery 39 │    252.02 / 272.48 ±14.44 / 297.08 ms │    251.38 / 265.89 ±12.21 / 285.58 ms │     no change │
│ QQuery 40 │        20.98 / 22.88 ±1.70 / 25.47 ms │        20.28 / 21.71 ±1.06 / 23.05 ms │ +1.05x faster │
│ QQuery 41 │        18.96 / 19.77 ±1.35 / 22.47 ms │        19.10 / 24.58 ±7.39 / 38.27 ms │  1.24x slower │
│ QQuery 42 │        18.82 / 22.25 ±4.79 / 31.69 ms │        18.33 / 18.75 ±0.41 / 19.53 ms │ +1.19x faster │
└───────────┴───────────────────────────────────────┴───────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                                  ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                                  │ 23227.26ms │
│ Total Time (rich-t-kid_optimize-groupValueBytes)   │ 23402.05ms │
│ Average Time (HEAD)                                │   540.17ms │
│ Average Time (rich-t-kid_optimize-groupValueBytes) │   544.23ms │
│ Queries Faster                                     │          4 │
│ Queries Slower                                     │          3 │
│ Queries with No Change                             │         36 │
│ Queries with Failure                               │          0 │
└────────────────────────────────────────────────────┴────────────┘

Resource Usage

clickbench_1 — base (merge-base)

Metric Value
Wall time 120.0s
Peak memory 12.5 GiB
Avg memory 3.8 GiB
CPU user 1066.2s
CPU sys 71.8s
Peak spill 0 B

clickbench_1 — branch

Metric Value
Wall time 120.0s
Peak memory 10.2 GiB
Avg memory 3.7 GiB
CPU user 1069.6s
CPU sys 74.0s
Peak spill 0 B

File an issue against this benchmark runner

@gabotechs

Copy link
Copy Markdown
Contributor

Well, we got one at least.

Something does not look right in the screenshot you shared. In ClickBench, some queries claim to be 25x more performant. That is very suspicious, I don't think that's possible while maintaining correct results.

@gabotechs

Copy link
Copy Markdown
Contributor

run benchmarks tpch tpcds

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4811750240-717-jrtxv 6.12.85+ #1 SMP Mon May 11 08:17:35 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 rich-t-kid/optimize-groupValueBytes (902effe) to a27f030 (merge-base) diff using: tpcds
Results will be posted here when complete


File an issue against this benchmark runner

@Rich-T-kid

Copy link
Copy Markdown
Contributor Author

Something does not look right in the screenshot you shared. In ClickBench, some queries claim to be 25x more performant. That is very suspicious, I don't think that's possible while maintaining correct results.

I agree, the queries with the largest speed ups also shouldn't have been targeted by these optimizations. Thats why I wanted to double check using @adriangbot.

I need to also investigate why my local benchmarks were so off.

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4811750240-716-zz7f5 6.12.85+ #1 SMP Mon May 11 08:17:35 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 rich-t-kid/optimize-groupValueBytes (902effe) to a27f030 (merge-base) diff using: tpch
Results will be posted here when complete


File an issue against this benchmark runner

@Rich-T-kid Rich-T-kid left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Emit(all_groups) is slower than into_state() due to the needing to append on the non-emitted groups to a new backing buffer extra if branch may resolve regressions

self.num_groups = 0;
self.map.take().into_state()
}
EmitTo::First(n) => {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be worth adding a match if branch here to see if n == group_size. in that case also just use into_state()

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

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

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

Comparing HEAD and rich-t-kid_optimize-groupValueBytes
--------------------
Benchmark tpch_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Query     ┃                           HEAD ┃ rich-t-kid_optimize-groupValueBytes ┃    Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ QQuery 1  │ 38.28 / 39.13 ±0.89 / 40.71 ms │      38.21 / 40.10 ±1.13 / 41.20 ms │ no change │
│ QQuery 2  │ 18.93 / 19.47 ±0.51 / 20.35 ms │      19.21 / 19.44 ±0.20 / 19.78 ms │ no change │
│ QQuery 3  │ 30.40 / 31.38 ±0.98 / 33.22 ms │      30.58 / 32.17 ±1.24 / 33.35 ms │ no change │
│ QQuery 4  │ 17.37 / 17.58 ±0.16 / 17.83 ms │      17.43 / 17.54 ±0.06 / 17.60 ms │ no change │
│ QQuery 5  │ 37.54 / 39.89 ±1.21 / 40.96 ms │      37.69 / 38.55 ±0.98 / 40.30 ms │ no change │
│ QQuery 6  │ 16.04 / 16.26 ±0.15 / 16.46 ms │      15.92 / 16.32 ±0.31 / 16.86 ms │ no change │
│ QQuery 7  │ 43.59 / 46.19 ±2.19 / 48.50 ms │      43.84 / 45.09 ±1.17 / 47.22 ms │ no change │
│ QQuery 8  │ 42.71 / 44.08 ±1.10 / 45.48 ms │      42.44 / 42.68 ±0.20 / 42.96 ms │ no change │
│ QQuery 9  │ 49.61 / 50.94 ±2.09 / 55.11 ms │      49.27 / 50.40 ±1.13 / 52.34 ms │ no change │
│ QQuery 10 │ 42.66 / 42.98 ±0.38 / 43.71 ms │      42.28 / 43.61 ±1.76 / 46.83 ms │ no change │
│ QQuery 11 │ 13.38 / 13.56 ±0.16 / 13.82 ms │      13.32 / 13.64 ±0.35 / 14.28 ms │ no change │
│ QQuery 12 │ 23.44 / 24.27 ±0.73 / 25.52 ms │      23.84 / 24.74 ±0.71 / 25.69 ms │ no change │
│ QQuery 13 │ 32.04 / 34.55 ±4.14 / 42.80 ms │      34.16 / 35.46 ±1.23 / 37.60 ms │ no change │
│ QQuery 14 │ 23.55 / 23.88 ±0.18 / 24.07 ms │      23.53 / 23.59 ±0.05 / 23.65 ms │ no change │
│ QQuery 15 │ 30.68 / 31.27 ±0.63 / 32.41 ms │      31.12 / 31.52 ±0.48 / 32.46 ms │ no change │
│ QQuery 16 │ 13.99 / 14.18 ±0.20 / 14.46 ms │      13.86 / 14.21 ±0.18 / 14.32 ms │ no change │
│ QQuery 17 │ 73.18 / 73.64 ±0.55 / 74.69 ms │      72.89 / 74.20 ±0.97 / 75.79 ms │ no change │
│ QQuery 18 │ 57.51 / 58.95 ±0.92 / 60.26 ms │      60.66 / 61.45 ±0.71 / 62.68 ms │ no change │
│ QQuery 19 │ 32.99 / 33.95 ±1.44 / 36.79 ms │      32.81 / 33.42 ±0.92 / 35.24 ms │ no change │
│ QQuery 20 │ 31.90 / 32.03 ±0.13 / 32.21 ms │      31.75 / 31.94 ±0.16 / 32.14 ms │ no change │
│ QQuery 21 │ 54.92 / 56.06 ±0.84 / 57.42 ms │      55.35 / 56.39 ±0.65 / 57.27 ms │ no change │
│ QQuery 22 │ 14.22 / 14.35 ±0.09 / 14.46 ms │      14.01 / 14.20 ±0.19 / 14.52 ms │ no change │
└───────────┴────────────────────────────────┴─────────────────────────────────────┴───────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┓
┃ Benchmark Summary                                  ┃          ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━┩
│ Total Time (HEAD)                                  │ 758.60ms │
│ Total Time (rich-t-kid_optimize-groupValueBytes)   │ 760.64ms │
│ Average Time (HEAD)                                │  34.48ms │
│ Average Time (rich-t-kid_optimize-groupValueBytes) │  34.57ms │
│ Queries Faster                                     │        0 │
│ Queries Slower                                     │        0 │
│ Queries with No Change                             │       22 │
│ Queries with Failure                               │        0 │
└────────────────────────────────────────────────────┴──────────┘

Resource Usage

tpch — base (merge-base)

Metric Value
Wall time 5.0s
Peak memory 1.2 GiB
Avg memory 527.5 MiB
CPU user 21.8s
CPU sys 1.7s
Peak spill 0 B

tpch — branch

Metric Value
Wall time 5.0s
Peak memory 1.1 GiB
Avg memory 496.9 MiB
CPU user 21.8s
CPU sys 1.6s
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)

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

Comparing HEAD and rich-t-kid_optimize-groupValueBytes
--------------------
Benchmark tpcds_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                  HEAD ┃   rich-t-kid_optimize-groupValueBytes ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1  │           5.57 / 6.08 ±0.85 / 7.79 ms │           5.51 / 5.99 ±0.80 / 7.59 ms │     no change │
│ QQuery 2  │        80.07 / 80.39 ±0.23 / 80.76 ms │        80.61 / 81.07 ±0.33 / 81.61 ms │     no change │
│ QQuery 3  │        29.41 / 29.66 ±0.20 / 29.98 ms │        29.15 / 29.44 ±0.18 / 29.72 ms │     no change │
│ QQuery 4  │     482.08 / 487.14 ±3.49 / 492.47 ms │     473.94 / 478.44 ±2.67 / 481.30 ms │     no change │
│ QQuery 5  │        51.54 / 51.93 ±0.25 / 52.32 ms │        51.52 / 52.09 ±0.51 / 52.76 ms │     no change │
│ QQuery 6  │        35.94 / 36.53 ±0.34 / 36.86 ms │        36.54 / 37.02 ±0.34 / 37.47 ms │     no change │
│ QQuery 7  │        93.53 / 94.09 ±0.30 / 94.43 ms │        94.81 / 95.17 ±0.48 / 96.12 ms │     no change │
│ QQuery 8  │        36.59 / 38.16 ±2.29 / 42.73 ms │        36.81 / 38.48 ±3.20 / 44.87 ms │     no change │
│ QQuery 9  │        53.67 / 54.83 ±0.93 / 56.17 ms │        52.07 / 54.26 ±1.58 / 56.60 ms │     no change │
│ QQuery 10 │        63.23 / 63.37 ±0.10 / 63.50 ms │        63.14 / 63.39 ±0.20 / 63.70 ms │     no change │
│ QQuery 11 │     295.77 / 302.80 ±5.03 / 311.04 ms │     295.55 / 296.55 ±1.28 / 299.05 ms │     no change │
│ QQuery 12 │        27.92 / 28.62 ±0.58 / 29.52 ms │        28.59 / 28.92 ±0.48 / 29.86 ms │     no change │
│ QQuery 13 │     118.09 / 119.36 ±1.05 / 121.29 ms │     118.15 / 118.57 ±0.37 / 119.14 ms │     no change │
│ QQuery 14 │     413.43 / 419.20 ±3.98 / 425.03 ms │     417.44 / 419.35 ±1.64 / 421.70 ms │     no change │
│ QQuery 15 │        59.04 / 60.11 ±0.62 / 60.75 ms │        58.76 / 59.74 ±0.90 / 60.84 ms │     no change │
│ QQuery 16 │           6.74 / 6.90 ±0.17 / 7.14 ms │           6.94 / 7.04 ±0.07 / 7.15 ms │     no change │
│ QQuery 17 │        80.37 / 81.85 ±2.14 / 86.06 ms │        80.83 / 82.44 ±1.47 / 84.24 ms │     no change │
│ QQuery 18 │     122.96 / 124.13 ±0.62 / 124.63 ms │     124.76 / 125.82 ±1.33 / 128.44 ms │     no change │
│ QQuery 19 │        41.71 / 42.00 ±0.33 / 42.64 ms │        41.28 / 41.69 ±0.34 / 42.24 ms │     no change │
│ QQuery 20 │        35.17 / 36.24 ±1.27 / 38.69 ms │        35.45 / 35.66 ±0.27 / 36.19 ms │     no change │
│ QQuery 21 │        17.26 / 17.51 ±0.15 / 17.72 ms │        17.74 / 17.93 ±0.11 / 18.07 ms │     no change │
│ QQuery 22 │        63.26 / 64.08 ±0.97 / 65.76 ms │        61.90 / 62.29 ±0.30 / 62.74 ms │     no change │
│ QQuery 23 │     346.26 / 349.67 ±4.20 / 357.77 ms │     343.73 / 350.09 ±4.35 / 355.63 ms │     no change │
│ QQuery 24 │     225.73 / 229.78 ±4.92 / 238.89 ms │     225.41 / 228.11 ±2.55 / 232.12 ms │     no change │
│ QQuery 25 │     110.54 / 111.42 ±1.10 / 113.55 ms │     110.05 / 111.07 ±1.01 / 112.99 ms │     no change │
│ QQuery 26 │        57.66 / 59.45 ±1.93 / 63.09 ms │        57.56 / 59.32 ±2.26 / 63.71 ms │     no change │
│ QQuery 27 │           6.30 / 6.46 ±0.18 / 6.80 ms │           6.37 / 6.46 ±0.14 / 6.74 ms │     no change │
│ QQuery 28 │        60.50 / 61.26 ±0.76 / 62.65 ms │        60.41 / 61.63 ±1.28 / 64.10 ms │     no change │
│ QQuery 29 │       97.85 / 98.85 ±0.91 / 100.44 ms │       97.66 / 98.38 ±1.14 / 100.64 ms │     no change │
│ QQuery 30 │        32.39 / 33.01 ±0.68 / 34.23 ms │        32.83 / 34.33 ±2.05 / 38.35 ms │     no change │
│ QQuery 31 │     111.10 / 112.51 ±1.35 / 115.07 ms │     111.13 / 111.87 ±0.79 / 113.34 ms │     no change │
│ QQuery 32 │        20.50 / 20.91 ±0.36 / 21.53 ms │        20.35 / 20.73 ±0.43 / 21.35 ms │     no change │
│ QQuery 33 │        37.88 / 39.67 ±2.84 / 45.33 ms │        37.60 / 37.95 ±0.24 / 38.26 ms │     no change │
│ QQuery 34 │        10.08 / 10.55 ±0.41 / 11.09 ms │         9.75 / 11.52 ±2.68 / 16.80 ms │  1.09x slower │
│ QQuery 35 │        72.47 / 73.13 ±0.56 / 74.16 ms │        72.13 / 72.71 ±0.49 / 73.34 ms │     no change │
│ QQuery 36 │           5.76 / 5.90 ±0.17 / 6.23 ms │           5.81 / 5.94 ±0.21 / 6.37 ms │     no change │
│ QQuery 37 │           6.99 / 7.10 ±0.08 / 7.20 ms │           6.99 / 7.03 ±0.05 / 7.12 ms │     no change │
│ QQuery 38 │        61.75 / 62.18 ±0.29 / 62.58 ms │        61.69 / 62.18 ±0.26 / 62.43 ms │     no change │
│ QQuery 39 │     442.74 / 445.95 ±4.14 / 453.62 ms │     440.11 / 445.24 ±5.27 / 452.26 ms │     no change │
│ QQuery 40 │        23.43 / 23.79 ±0.25 / 24.20 ms │        23.48 / 26.18 ±4.37 / 34.89 ms │  1.10x slower │
│ QQuery 41 │        11.64 / 11.91 ±0.26 / 12.23 ms │        11.44 / 11.58 ±0.23 / 12.03 ms │     no change │
│ QQuery 42 │        24.02 / 24.11 ±0.06 / 24.20 ms │        23.60 / 24.19 ±0.34 / 24.54 ms │     no change │
│ QQuery 43 │           4.82 / 4.95 ±0.14 / 5.23 ms │           4.88 / 4.99 ±0.10 / 5.17 ms │     no change │
│ QQuery 44 │           9.25 / 9.44 ±0.12 / 9.58 ms │           9.25 / 9.32 ±0.04 / 9.38 ms │     no change │
│ QQuery 45 │        38.42 / 39.46 ±0.92 / 41.10 ms │        38.67 / 39.18 ±0.55 / 40.20 ms │     no change │
│ QQuery 46 │        11.71 / 11.85 ±0.11 / 12.03 ms │        11.60 / 12.14 ±0.53 / 13.08 ms │     no change │
│ QQuery 47 │     227.67 / 231.98 ±5.77 / 243.18 ms │     227.43 / 230.76 ±3.90 / 237.94 ms │     no change │
│ QQuery 48 │       96.33 / 97.62 ±1.60 / 100.74 ms │        96.32 / 97.49 ±0.82 / 98.82 ms │     no change │
│ QQuery 49 │        77.32 / 78.03 ±0.72 / 79.35 ms │        76.52 / 77.07 ±0.72 / 78.42 ms │     no change │
│ QQuery 50 │        58.86 / 60.91 ±2.42 / 65.65 ms │        58.41 / 58.74 ±0.21 / 59.05 ms │     no change │
│ QQuery 51 │        91.25 / 94.11 ±2.18 / 96.93 ms │        93.31 / 94.27 ±1.25 / 96.66 ms │     no change │
│ QQuery 52 │        23.90 / 24.13 ±0.19 / 24.33 ms │        23.93 / 24.16 ±0.18 / 24.49 ms │     no change │
│ QQuery 53 │        29.69 / 29.88 ±0.18 / 30.21 ms │        29.57 / 29.69 ±0.18 / 30.04 ms │     no change │
│ QQuery 54 │        56.07 / 58.75 ±4.85 / 68.44 ms │        55.28 / 55.72 ±0.24 / 55.93 ms │ +1.05x faster │
│ QQuery 55 │        23.56 / 24.22 ±0.57 / 25.11 ms │        23.24 / 25.12 ±2.73 / 30.52 ms │     no change │
│ QQuery 56 │        39.89 / 40.30 ±0.38 / 40.80 ms │        38.91 / 39.74 ±0.69 / 40.70 ms │     no change │
│ QQuery 57 │     178.30 / 180.11 ±2.44 / 184.69 ms │     176.84 / 179.30 ±3.15 / 185.53 ms │     no change │
│ QQuery 58 │     116.37 / 118.06 ±1.21 / 119.87 ms │     115.81 / 117.17 ±1.42 / 119.06 ms │     no change │
│ QQuery 59 │     119.64 / 121.43 ±1.94 / 124.75 ms │     117.42 / 118.95 ±1.87 / 122.62 ms │     no change │
│ QQuery 60 │        39.97 / 40.52 ±0.56 / 41.56 ms │        39.51 / 40.32 ±0.83 / 41.93 ms │     no change │
│ QQuery 61 │        12.48 / 12.64 ±0.20 / 13.01 ms │        12.49 / 12.65 ±0.20 / 13.05 ms │     no change │
│ QQuery 62 │        46.78 / 47.24 ±0.39 / 47.91 ms │        46.57 / 46.75 ±0.10 / 46.83 ms │     no change │
│ QQuery 63 │        30.39 / 32.63 ±3.65 / 39.92 ms │        29.67 / 30.11 ±0.39 / 30.74 ms │ +1.08x faster │
│ QQuery 64 │     414.14 / 423.27 ±8.51 / 436.42 ms │     412.45 / 416.37 ±4.58 / 425.04 ms │     no change │
│ QQuery 65 │     142.96 / 148.39 ±3.17 / 151.03 ms │     147.86 / 150.00 ±1.87 / 152.95 ms │     no change │
│ QQuery 66 │        79.72 / 81.44 ±1.88 / 84.14 ms │        78.79 / 81.61 ±4.31 / 90.18 ms │     no change │
│ QQuery 67 │     238.36 / 242.03 ±3.70 / 246.67 ms │     236.33 / 240.55 ±3.27 / 246.25 ms │     no change │
│ QQuery 68 │        11.97 / 12.15 ±0.18 / 12.48 ms │        11.92 / 12.12 ±0.18 / 12.45 ms │     no change │
│ QQuery 69 │        57.28 / 57.71 ±0.27 / 58.00 ms │        57.21 / 57.54 ±0.29 / 58.01 ms │     no change │
│ QQuery 70 │     104.99 / 109.60 ±2.76 / 113.37 ms │     106.73 / 111.02 ±7.85 / 126.70 ms │     no change │
│ QQuery 71 │        35.10 / 35.41 ±0.23 / 35.79 ms │        35.04 / 35.22 ±0.12 / 35.35 ms │     no change │
│ QQuery 72 │ 2118.65 / 2186.87 ±69.70 / 2287.71 ms │ 2121.08 / 2225.60 ±69.94 / 2290.69 ms │     no change │
│ QQuery 73 │          9.69 / 9.90 ±0.25 / 10.37 ms │          9.58 / 9.81 ±0.30 / 10.40 ms │     no change │
│ QQuery 74 │     166.68 / 169.90 ±2.81 / 175.14 ms │     168.55 / 173.61 ±7.59 / 188.66 ms │     no change │
│ QQuery 75 │     149.28 / 151.74 ±3.02 / 157.53 ms │     149.11 / 151.01 ±1.40 / 152.72 ms │     no change │
│ QQuery 76 │        35.37 / 36.77 ±1.38 / 39.31 ms │        35.39 / 35.53 ±0.13 / 35.76 ms │     no change │
│ QQuery 77 │        61.37 / 61.72 ±0.37 / 62.43 ms │        60.50 / 60.80 ±0.38 / 61.53 ms │     no change │
│ QQuery 78 │     184.66 / 188.18 ±2.92 / 193.13 ms │     184.04 / 188.30 ±3.38 / 194.38 ms │     no change │
│ QQuery 79 │        67.18 / 67.77 ±0.61 / 68.92 ms │        67.31 / 69.34 ±3.09 / 75.48 ms │     no change │
│ QQuery 80 │       98.89 / 99.70 ±0.51 / 100.27 ms │      98.33 / 100.96 ±1.41 / 102.59 ms │     no change │
│ QQuery 81 │        25.62 / 26.04 ±0.35 / 26.66 ms │        25.67 / 26.03 ±0.25 / 26.29 ms │     no change │
│ QQuery 82 │        16.29 / 16.58 ±0.27 / 17.00 ms │        16.42 / 16.53 ±0.13 / 16.69 ms │     no change │
│ QQuery 83 │        40.45 / 41.57 ±1.78 / 45.12 ms │        40.19 / 40.50 ±0.29 / 40.92 ms │     no change │
│ QQuery 84 │        30.31 / 31.50 ±1.79 / 35.05 ms │        30.17 / 31.94 ±2.52 / 36.94 ms │     no change │
│ QQuery 85 │     106.43 / 107.91 ±1.20 / 109.68 ms │     107.48 / 108.67 ±0.70 / 109.61 ms │     no change │
│ QQuery 86 │        24.91 / 25.41 ±0.39 / 25.89 ms │        24.98 / 25.33 ±0.21 / 25.52 ms │     no change │
│ QQuery 87 │        62.19 / 64.45 ±2.07 / 68.33 ms │        62.44 / 62.95 ±0.41 / 63.43 ms │     no change │
│ QQuery 88 │        62.61 / 63.78 ±0.67 / 64.35 ms │        62.64 / 63.05 ±0.33 / 63.65 ms │     no change │
│ QQuery 89 │        35.56 / 35.90 ±0.24 / 36.24 ms │        35.57 / 36.15 ±0.42 / 36.65 ms │     no change │
│ QQuery 90 │        17.10 / 17.38 ±0.23 / 17.80 ms │        17.19 / 17.40 ±0.23 / 17.80 ms │     no change │
│ QQuery 91 │        45.00 / 45.55 ±0.41 / 46.24 ms │        45.38 / 45.79 ±0.26 / 46.08 ms │     no change │
│ QQuery 92 │        29.37 / 29.70 ±0.33 / 30.29 ms │        29.76 / 31.54 ±3.03 / 37.57 ms │  1.06x slower │
│ QQuery 93 │        50.37 / 51.18 ±0.69 / 52.07 ms │        49.93 / 51.03 ±0.68 / 51.85 ms │     no change │
│ QQuery 94 │        38.14 / 38.82 ±0.44 / 39.47 ms │        38.05 / 38.72 ±0.48 / 39.41 ms │     no change │
│ QQuery 95 │        80.98 / 81.86 ±0.81 / 82.88 ms │        81.72 / 82.22 ±0.35 / 82.72 ms │     no change │
│ QQuery 96 │        24.06 / 24.35 ±0.29 / 24.91 ms │        24.28 / 25.92 ±2.61 / 31.12 ms │  1.06x slower │
│ QQuery 97 │        46.32 / 48.04 ±1.79 / 50.70 ms │        46.80 / 47.46 ±0.52 / 48.36 ms │     no change │
│ QQuery 98 │        42.55 / 42.86 ±0.25 / 43.17 ms │        42.34 / 42.80 ±0.35 / 43.25 ms │     no change │
│ QQuery 99 │        69.84 / 70.39 ±0.37 / 70.96 ms │        70.54 / 70.78 ±0.17 / 71.07 ms │     no change │
└───────────┴───────────────────────────────────────┴───────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                                  ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                                  │ 10336.68ms │
│ Total Time (rich-t-kid_optimize-groupValueBytes)   │ 10345.69ms │
│ Average Time (HEAD)                                │   104.41ms │
│ Average Time (rich-t-kid_optimize-groupValueBytes) │   104.50ms │
│ Queries Faster                                     │          2 │
│ Queries Slower                                     │          4 │
│ Queries with No Change                             │         93 │
│ Queries with Failure                               │          0 │
└────────────────────────────────────────────────────┴────────────┘

Resource Usage

tpcds — base (merge-base)

Metric Value
Wall time 55.0s
Peak memory 2.2 GiB
Avg memory 1.6 GiB
CPU user 231.8s
CPU sys 5.7s
Peak spill 0 B

tpcds — branch

Metric Value
Wall time 55.0s
Peak memory 2.1 GiB
Avg memory 1.4 GiB
CPU user 234.2s
CPU sys 5.6s
Peak spill 0 B

File an issue against this benchmark runner

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

Labels

physical-expr Changes to the physical-expr crates physical-plan Changes to the physical-plan crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improved performance for streaming grouping with single string columns

3 participants