Skip to content

perf: pre-size collections and reuse per-iteration buffers - #26192

Merged
comphead merged 4 commits into
apache:mainfrom
comphead:alloc-opt
Oct 12, 2026
Merged

comphead merged 4 commits into
apache:mainfrom
comphead:alloc-opt

Conversation

@comphead

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

  • N/A

Rationale for this change

Many execution paths allocate more than they need. Collections start empty although their final size is known, and some temporaries are allocated again on every row, batch, partition or column. Each case is small, but together they add avoidable allocator traffic on hot paths.

What changes are included in this PR?

Two mechanical rules applied across the workspace:

  • with_capacity where the size is known or tightly bounded by in-memory data.
  • Per-iteration temporaries hoisted out of loops and reused with clear() when they don't escape the iteration.

For example, RepartitionExec no longer allocates a Vec per batch per output partition, TDigest merging reuses one buffer instead of a full-size Vec per merge step, and hive-partitioned writes no longer build a Vec<String> key per row.

What is the testing strategy for this PR?

No behavior change, so existing tests cover it. The workspace --lib --tests --bins suite and sqllogictest pass locally. Criterion benches against main (regexp_replace, reverse, array_slice, bounded_window) are neutral to a few percent faster.

Are there any user-facing changes?

No.

Use `with_capacity` where the final size is known or tightly bounded by
in-memory data, and hoist temporaries that were allocated on every row,
batch, partition or column out of their loops so they are reused.
@github-actions github-actions Bot added sql SQL Planner logical-expr Logical plan and expressions physical-expr Changes to the physical-expr crates optimizer Optimizer rules core Core DataFusion crate substrait Changes to the substrait crate catalog Related to the catalog crate common Related to common crate execution Related to the execution crate proto Related to proto crate functions Changes to functions implementation datasource Changes to the datasource crate ffi Changes to the ffi crate physical-plan Changes to the physical-plan crate spark Changes to datafusion-spark crate labels Oct 10, 2026
@comphead

Copy link
Copy Markdown
Contributor Author

The PR has many LOC changed, but in fact it is the same pattern to use bounded datastructure where possible instead of unbounded

@comphead

Copy link
Copy Markdown
Contributor Author

run benchmarks tpch tpcds

@comphead
comphead marked this pull request as ready for review October 10, 2026 19:41
@comphead

Copy link
Copy Markdown
Contributor Author

run benchmarks tpch tpcds

@codecov-commenter

codecov-commenter commented Oct 10, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.10345% with 42 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.83%. Comparing base (6663e43) to head (f515142).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
datafusion/ffi/src/config/mod.rs 12.50% 7 Missing ⚠️
...afusion/spark/src/function/string/format_string.rs 64.70% 4 Missing and 2 partials ⚠️
datafusion/execution/src/config.rs 0.00% 3 Missing ⚠️
datafusion/physical-plan/src/sorts/partial_sort.rs 78.57% 2 Missing and 1 partial ⚠️
datafusion/common/src/utils/mod.rs 71.42% 0 Missing and 2 partials ⚠️
datafusion/expr/src/window_state.rs 71.42% 0 Missing and 2 partials ⚠️
datafusion/functions/src/string/common.rs 83.33% 1 Missing and 1 partial ⚠️
...hysical-plan/src/aggregates/grouped_hash_stream.rs 60.00% 1 Missing and 1 partial ⚠️
datafusion/physical-plan/src/joins/cross_join.rs 66.66% 0 Missing and 2 partials ⚠️
datafusion/catalog/src/memory/table.rs 50.00% 1 Missing ⚠️
... and 12 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #26192      +/-   ##
==========================================
- Coverage   82.83%   82.83%   -0.01%     
==========================================
  Files        1149     1149              
  Lines      452344   452467     +123     
  Branches   452344   452467     +123     
==========================================
+ Hits       374680   374781     +101     
- Misses      54864    54883      +19     
- Partials    22800    22803       +3     

☔ 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.

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c6101452975-3274-qwhsv 6.12.94+ #1 SMP Fri Aug 21 08:00:16 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 alloc-opt (a511f02) to 3310fd5 (merge-base) diff

Run configuration
run benchmark tpch

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-c6101452975-3275-7wltv 6.12.94+ #1 SMP Fri Aug 21 08:00:16 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 alloc-opt (a511f02) to 3310fd5 (merge-base) diff

Run configuration
run benchmark tpcds

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 alloc-opt (a511f02) to 3310fd5 (merge-base) diff

Run configuration
run benchmark tpch
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 alloc-opt
--------------------
Benchmark tpch_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━━┓
┃ Query     ┃     HEAD ┃ alloc-opt ┃       Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━━━┩
│ QQuery 1  │ 40.89 ms │  42.85 ms │    no change │
│ QQuery 2  │ 18.77 ms │  19.65 ms │    no change │
│ QQuery 3  │ 28.76 ms │  30.51 ms │ 1.06x slower │
│ QQuery 4  │ 17.85 ms │  18.47 ms │    no change │
│ QQuery 5  │ 36.16 ms │  38.57 ms │ 1.07x slower │
│ QQuery 6  │ 13.62 ms │  14.62 ms │ 1.07x slower │
│ QQuery 7  │ 42.02 ms │  45.23 ms │ 1.08x slower │
│ QQuery 8  │ 41.36 ms │  43.95 ms │ 1.06x slower │
│ QQuery 9  │ 50.49 ms │  54.28 ms │ 1.08x slower │
│ QQuery 10 │ 40.86 ms │  43.82 ms │ 1.07x slower │
│ QQuery 11 │ 13.65 ms │  14.98 ms │ 1.10x slower │
│ QQuery 12 │ 17.96 ms │  19.64 ms │ 1.09x slower │
│ QQuery 13 │ 39.85 ms │  45.10 ms │ 1.13x slower │
│ QQuery 14 │ 24.47 ms │  26.74 ms │ 1.09x slower │
│ QQuery 15 │ 30.97 ms │  33.68 ms │ 1.09x slower │
│ QQuery 16 │ 13.80 ms │  14.86 ms │ 1.08x slower │
│ QQuery 17 │ 75.81 ms │  87.24 ms │ 1.15x slower │
│ QQuery 18 │ 47.75 ms │  49.18 ms │    no change │
│ QQuery 19 │ 32.84 ms │  33.76 ms │    no change │
│ QQuery 20 │ 33.31 ms │  34.45 ms │    no change │
│ QQuery 21 │ 59.25 ms │  61.64 ms │    no change │
│ QQuery 22 │ 15.19 ms │  15.10 ms │    no change │
└───────────┴──────────┴───────────┴──────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┓
┃ Benchmark Summary        ┃          ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━┩
│ Total Time (HEAD)        │ 735.63ms │
│ Total Time (alloc-opt)   │ 788.32ms │
│ Average Time (HEAD)      │  33.44ms │
│ Average Time (alloc-opt) │  35.83ms │
│ Queries Faster           │        0 │
│ Queries Slower           │       14 │
│ Queries with No Change   │        8 │
│ Queries with Failure     │        0 │
└──────────────────────────┴──────────┘

Distribution per query (min / mean ±stddev / max):

Comparing HEAD and alloc-opt
--------------------
Benchmark tpch_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┓
┃ Query     ┃                           HEAD ┃                      alloc-opt ┃       Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━┩
│ QQuery 1  │ 40.89 / 43.24 ±2.70 / 48.33 ms │ 42.85 / 44.31 ±1.47 / 46.67 ms │    no change │
│ QQuery 2  │ 18.77 / 19.59 ±0.79 / 21.09 ms │ 19.65 / 19.84 ±0.14 / 20.06 ms │    no change │
│ QQuery 3  │ 28.76 / 29.37 ±0.42 / 30.04 ms │ 30.51 / 30.76 ±0.22 / 31.08 ms │    no change │
│ QQuery 4  │ 17.85 / 18.17 ±0.37 / 18.89 ms │ 18.47 / 18.68 ±0.11 / 18.82 ms │    no change │
│ QQuery 5  │ 36.16 / 36.59 ±0.37 / 37.28 ms │ 38.57 / 38.89 ±0.17 / 39.05 ms │ 1.06x slower │
│ QQuery 6  │ 13.62 / 13.97 ±0.37 / 14.65 ms │ 14.62 / 14.81 ±0.11 / 14.92 ms │ 1.06x slower │
│ QQuery 7  │ 42.02 / 43.51 ±1.32 / 45.40 ms │ 45.23 / 47.04 ±1.15 / 48.21 ms │ 1.08x slower │
│ QQuery 8  │ 41.36 / 42.27 ±1.22 / 44.68 ms │ 43.95 / 44.17 ±0.19 / 44.52 ms │    no change │
│ QQuery 9  │ 50.49 / 52.32 ±1.59 / 54.32 ms │ 54.28 / 55.50 ±0.69 / 56.18 ms │ 1.06x slower │
│ QQuery 10 │ 40.86 / 41.62 ±0.94 / 43.43 ms │ 43.82 / 44.29 ±0.37 / 44.80 ms │ 1.06x slower │
│ QQuery 11 │ 13.65 / 13.83 ±0.10 / 13.92 ms │ 14.98 / 15.44 ±0.58 / 16.58 ms │ 1.12x slower │
│ QQuery 12 │ 17.96 / 18.52 ±0.36 / 19.05 ms │ 19.64 / 20.16 ±0.40 / 20.83 ms │ 1.09x slower │
│ QQuery 13 │ 39.85 / 40.46 ±0.41 / 41.02 ms │ 45.10 / 46.69 ±2.05 / 50.72 ms │ 1.15x slower │
│ QQuery 14 │ 24.47 / 24.72 ±0.17 / 24.98 ms │ 26.74 / 26.87 ±0.12 / 27.07 ms │ 1.09x slower │
│ QQuery 15 │ 30.97 / 31.79 ±0.92 / 33.28 ms │ 33.68 / 33.93 ±0.15 / 34.14 ms │ 1.07x slower │
│ QQuery 16 │ 13.80 / 13.98 ±0.15 / 14.22 ms │ 14.86 / 14.95 ±0.06 / 15.05 ms │ 1.07x slower │
│ QQuery 17 │ 75.81 / 77.47 ±2.35 / 82.11 ms │ 87.24 / 87.88 ±0.41 / 88.47 ms │ 1.13x slower │
│ QQuery 18 │ 47.75 / 48.77 ±0.77 / 50.07 ms │ 49.18 / 50.43 ±0.81 / 51.38 ms │    no change │
│ QQuery 19 │ 32.84 / 33.09 ±0.23 / 33.46 ms │ 33.76 / 34.12 ±0.27 / 34.59 ms │    no change │
│ QQuery 20 │ 33.31 / 33.95 ±0.39 / 34.41 ms │ 34.45 / 34.92 ±0.31 / 35.40 ms │    no change │
│ QQuery 21 │ 59.25 / 61.14 ±1.71 / 63.94 ms │ 61.64 / 62.64 ±0.86 / 63.78 ms │    no change │
│ QQuery 22 │ 15.19 / 15.36 ±0.20 / 15.67 ms │ 15.10 / 16.02 ±0.70 / 16.82 ms │    no change │
└───────────┴────────────────────────────────┴────────────────────────────────┴──────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┓
┃ Benchmark Summary        ┃          ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━┩
│ Total Time (HEAD)        │ 753.74ms │
│ Total Time (alloc-opt)   │ 802.36ms │
│ Average Time (HEAD)      │  34.26ms │
│ Average Time (alloc-opt) │  36.47ms │
│ Queries Faster           │        0 │
│ Queries Slower           │       12 │
│ Queries with No Change   │       10 │
│ Queries with Failure     │        0 │
└──────────────────────────┴──────────┘

Resource Usage

tpch — base (merge-base)

Metric Value
Wall time 5.0s
Peak memory 1.1 GiB
Avg memory 476.7 MiB
CPU user 20.8s
CPU sys 1.8s
Peak spill 0 B

tpch — branch

Metric Value
Wall time 5.0s
Peak memory 1.2 GiB
Avg memory 660.1 MiB
CPU user 22.5s
CPU sys 2.1s
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 alloc-opt (a511f02) to 3310fd5 (merge-base) diff

Run configuration
run benchmark tpcds
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 alloc-opt
--------------------
Benchmark tpcds_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃       HEAD ┃  alloc-opt ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1  │    5.39 ms │    5.20 ms │     no change │
│ QQuery 2  │   79.88 ms │   79.31 ms │     no change │
│ QQuery 3  │   28.71 ms │   28.51 ms │     no change │
│ QQuery 4  │  435.96 ms │  435.95 ms │     no change │
│ QQuery 5  │   49.27 ms │   49.26 ms │     no change │
│ QQuery 6  │   34.52 ms │   34.37 ms │     no change │
│ QQuery 7  │   71.68 ms │   71.69 ms │     no change │
│ QQuery 8  │   36.25 ms │   35.93 ms │     no change │
│ QQuery 9  │   50.70 ms │   52.26 ms │     no change │
│ QQuery 10 │   60.27 ms │   60.37 ms │     no change │
│ QQuery 11 │  270.58 ms │  268.38 ms │     no change │
│ QQuery 12 │   28.31 ms │   28.47 ms │     no change │
│ QQuery 13 │  112.58 ms │  111.98 ms │     no change │
│ QQuery 14 │  385.37 ms │  382.41 ms │     no change │
│ QQuery 15 │   52.24 ms │   52.00 ms │     no change │
│ QQuery 16 │    6.27 ms │    5.92 ms │ +1.06x faster │
│ QQuery 17 │   79.05 ms │   77.75 ms │     no change │
│ QQuery 18 │  103.88 ms │  103.22 ms │     no change │
│ QQuery 19 │   40.94 ms │   41.12 ms │     no change │
│ QQuery 20 │   35.00 ms │   34.45 ms │     no change │
│ QQuery 21 │   16.69 ms │   16.51 ms │     no change │
│ QQuery 22 │   63.84 ms │   63.14 ms │     no change │
│ QQuery 23 │  300.65 ms │  298.94 ms │     no change │
│ QQuery 24 │  192.29 ms │  191.50 ms │     no change │
│ QQuery 25 │  108.61 ms │  107.53 ms │     no change │
│ QQuery 26 │   45.73 ms │   45.14 ms │     no change │
│ QQuery 27 │    5.83 ms │    5.83 ms │     no change │
│ QQuery 28 │   56.10 ms │   56.65 ms │     no change │
│ QQuery 29 │   95.09 ms │   94.58 ms │     no change │
│ QQuery 30 │   33.29 ms │   31.65 ms │     no change │
│ QQuery 31 │  108.60 ms │  107.43 ms │     no change │
│ QQuery 32 │   20.14 ms │   20.11 ms │     no change │
│ QQuery 33 │   37.43 ms │   36.70 ms │     no change │
│ QQuery 34 │   10.58 ms │    9.83 ms │ +1.08x faster │
│ QQuery 35 │   71.74 ms │   71.22 ms │     no change │
│ QQuery 36 │    5.45 ms │    5.46 ms │     no change │
│ QQuery 37 │    6.65 ms │    6.56 ms │     no change │
│ QQuery 38 │   60.64 ms │   59.65 ms │     no change │
│ QQuery 39 │   73.39 ms │   71.98 ms │     no change │
│ QQuery 40 │   23.65 ms │   23.14 ms │     no change │
│ QQuery 41 │   11.22 ms │   11.28 ms │     no change │
│ QQuery 42 │   23.85 ms │   23.43 ms │     no change │
│ QQuery 43 │    4.68 ms │    4.63 ms │     no change │
│ QQuery 44 │    8.49 ms │    8.44 ms │     no change │
│ QQuery 45 │   36.28 ms │   35.08 ms │     no change │
│ QQuery 46 │   11.67 ms │   11.17 ms │     no change │
│ QQuery 47 │  220.61 ms │  215.88 ms │     no change │
│ QQuery 48 │   90.69 ms │   88.94 ms │     no change │
│ QQuery 49 │   70.28 ms │   68.88 ms │     no change │
│ QQuery 50 │   58.78 ms │   58.00 ms │     no change │
│ QQuery 51 │   92.33 ms │   91.15 ms │     no change │
│ QQuery 52 │   24.20 ms │   23.69 ms │     no change │
│ QQuery 53 │   29.79 ms │   29.24 ms │     no change │
│ QQuery 54 │   54.33 ms │   53.49 ms │     no change │
│ QQuery 55 │   24.11 ms │   23.39 ms │     no change │
│ QQuery 56 │   38.07 ms │   37.86 ms │     no change │
│ QQuery 57 │  167.49 ms │  162.87 ms │     no change │
│ QQuery 58 │  105.96 ms │  104.89 ms │     no change │
│ QQuery 59 │  114.34 ms │  114.07 ms │     no change │
│ QQuery 60 │   37.64 ms │   38.48 ms │     no change │
│ QQuery 61 │   10.97 ms │   10.93 ms │     no change │
│ QQuery 62 │   43.07 ms │   42.72 ms │     no change │
│ QQuery 63 │   29.30 ms │   28.91 ms │     no change │
│ QQuery 64 │  355.40 ms │  355.25 ms │     no change │
│ QQuery 65 │  127.69 ms │  128.70 ms │     no change │
│ QQuery 66 │   75.08 ms │   73.73 ms │     no change │
│ QQuery 67 │  244.59 ms │  244.55 ms │     no change │
│ QQuery 68 │   11.94 ms │   11.52 ms │     no change │
│ QQuery 69 │   55.32 ms │   55.52 ms │     no change │
│ QQuery 70 │  102.86 ms │  102.06 ms │     no change │
│ QQuery 71 │   34.67 ms │   34.76 ms │     no change │
│ QQuery 72 │ 1575.56 ms │ 1589.95 ms │     no change │
│ QQuery 73 │    9.55 ms │    9.78 ms │     no change │
│ QQuery 74 │  155.31 ms │  155.22 ms │     no change │
│ QQuery 75 │  138.80 ms │  138.53 ms │     no change │
│ QQuery 76 │   33.75 ms │   34.32 ms │     no change │
│ QQuery 77 │   59.23 ms │   59.23 ms │     no change │
│ QQuery 78 │  157.98 ms │  159.28 ms │     no change │
│ QQuery 79 │   65.49 ms │   65.47 ms │     no change │
│ QQuery 80 │   93.84 ms │   93.36 ms │     no change │
│ QQuery 81 │   25.48 ms │   25.29 ms │     no change │
│ QQuery 82 │   16.54 ms │   16.29 ms │     no change │
│ QQuery 83 │   32.56 ms │   32.29 ms │     no change │
│ QQuery 84 │   29.33 ms │   29.61 ms │     no change │
│ QQuery 85 │   97.21 ms │   96.69 ms │     no change │
│ QQuery 86 │   25.08 ms │   25.19 ms │     no change │
│ QQuery 87 │   60.18 ms │   60.73 ms │     no change │
│ QQuery 88 │   59.34 ms │   59.56 ms │     no change │
│ QQuery 89 │   34.74 ms │   34.11 ms │     no change │
│ QQuery 90 │   16.25 ms │   16.15 ms │     no change │
│ QQuery 91 │   40.45 ms │   40.25 ms │     no change │
│ QQuery 92 │   29.16 ms │   28.97 ms │     no change │
│ QQuery 93 │   49.15 ms │   48.53 ms │     no change │
│ QQuery 94 │   38.38 ms │   37.71 ms │     no change │
│ QQuery 95 │   79.85 ms │   78.91 ms │     no change │
│ QQuery 96 │   23.56 ms │   23.49 ms │     no change │
│ QQuery 97 │   49.78 ms │   50.15 ms │     no change │
│ QQuery 98 │   42.25 ms │   41.34 ms │     no change │
│ QQuery 99 │   63.84 ms │   63.66 ms │     no change │
└───────────┴────────────┴────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Benchmark Summary        ┃           ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ Total Time (HEAD)        │ 8721.56ms │
│ Total Time (alloc-opt)   │ 8689.67ms │
│ Average Time (HEAD)      │   88.10ms │
│ Average Time (alloc-opt) │   87.77ms │
│ Queries Faster           │         2 │
│ Queries Slower           │         0 │
│ Queries with No Change   │        97 │
│ Queries with Failure     │         0 │
└──────────────────────────┴───────────┘

Distribution per query (min / mean ±stddev / max):

Comparing HEAD and alloc-opt
--------------------
Benchmark tpcds_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                  HEAD ┃                             alloc-opt ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1  │           5.39 / 5.99 ±0.99 / 7.95 ms │           5.20 / 5.81 ±0.96 / 7.70 ms │     no change │
│ QQuery 2  │        79.88 / 80.18 ±0.19 / 80.47 ms │        79.31 / 79.61 ±0.28 / 80.11 ms │     no change │
│ QQuery 3  │        28.71 / 29.20 ±0.27 / 29.47 ms │        28.51 / 28.74 ±0.19 / 29.05 ms │     no change │
│ QQuery 4  │     435.96 / 441.82 ±3.13 / 445.10 ms │     435.95 / 440.11 ±3.55 / 446.56 ms │     no change │
│ QQuery 5  │        49.27 / 51.19 ±2.64 / 56.42 ms │        49.26 / 49.62 ±0.27 / 50.02 ms │     no change │
│ QQuery 6  │        34.52 / 35.07 ±0.45 / 35.90 ms │        34.37 / 34.97 ±0.68 / 36.11 ms │     no change │
│ QQuery 7  │        71.68 / 71.98 ±0.35 / 72.64 ms │        71.69 / 72.30 ±0.54 / 73.31 ms │     no change │
│ QQuery 8  │        36.25 / 36.35 ±0.10 / 36.48 ms │        35.93 / 36.11 ±0.22 / 36.51 ms │     no change │
│ QQuery 9  │        50.70 / 52.59 ±1.37 / 54.13 ms │        52.26 / 53.30 ±0.92 / 54.60 ms │     no change │
│ QQuery 10 │        60.27 / 60.73 ±0.25 / 61.00 ms │        60.37 / 62.78 ±3.99 / 70.75 ms │     no change │
│ QQuery 11 │     270.58 / 273.49 ±1.64 / 275.25 ms │     268.38 / 272.66 ±3.80 / 279.50 ms │     no change │
│ QQuery 12 │        28.31 / 28.83 ±0.36 / 29.31 ms │        28.47 / 28.72 ±0.17 / 28.89 ms │     no change │
│ QQuery 13 │     112.58 / 113.24 ±0.48 / 113.76 ms │     111.98 / 112.93 ±0.87 / 114.47 ms │     no change │
│ QQuery 14 │     385.37 / 388.11 ±2.45 / 392.10 ms │     382.41 / 386.84 ±2.78 / 389.80 ms │     no change │
│ QQuery 15 │        52.24 / 52.96 ±0.41 / 53.36 ms │        52.00 / 52.79 ±0.48 / 53.43 ms │     no change │
│ QQuery 16 │           6.27 / 6.47 ±0.27 / 7.01 ms │           5.92 / 6.14 ±0.26 / 6.65 ms │ +1.05x faster │
│ QQuery 17 │        79.05 / 79.47 ±0.38 / 79.93 ms │        77.75 / 78.41 ±0.59 / 79.45 ms │     no change │
│ QQuery 18 │     103.88 / 105.50 ±1.67 / 107.95 ms │     103.22 / 104.74 ±1.40 / 106.91 ms │     no change │
│ QQuery 19 │        40.94 / 41.66 ±0.50 / 42.51 ms │        41.12 / 41.55 ±0.42 / 42.31 ms │     no change │
│ QQuery 20 │        35.00 / 35.46 ±0.37 / 36.10 ms │        34.45 / 34.88 ±0.36 / 35.51 ms │     no change │
│ QQuery 21 │        16.69 / 16.93 ±0.30 / 17.51 ms │        16.51 / 16.83 ±0.25 / 17.16 ms │     no change │
│ QQuery 22 │        63.84 / 64.42 ±0.57 / 65.51 ms │        63.14 / 63.29 ±0.24 / 63.77 ms │     no change │
│ QQuery 23 │     300.65 / 303.45 ±2.81 / 308.85 ms │     298.94 / 304.50 ±4.31 / 309.01 ms │     no change │
│ QQuery 24 │     192.29 / 200.06 ±8.57 / 216.67 ms │     191.50 / 194.19 ±2.94 / 199.87 ms │     no change │
│ QQuery 25 │     108.61 / 109.53 ±0.87 / 111.15 ms │     107.53 / 108.89 ±1.93 / 112.70 ms │     no change │
│ QQuery 26 │        45.73 / 47.44 ±1.86 / 51.04 ms │        45.14 / 45.72 ±0.77 / 47.25 ms │     no change │
│ QQuery 27 │           5.83 / 6.04 ±0.28 / 6.59 ms │           5.83 / 5.97 ±0.12 / 6.16 ms │     no change │
│ QQuery 28 │        56.10 / 60.55 ±2.29 / 62.33 ms │        56.65 / 59.76 ±1.59 / 61.16 ms │     no change │
│ QQuery 29 │        95.09 / 97.05 ±1.24 / 98.39 ms │        94.58 / 96.11 ±1.23 / 98.03 ms │     no change │
│ QQuery 30 │        33.29 / 34.71 ±2.16 / 39.01 ms │        31.65 / 33.87 ±3.41 / 40.63 ms │     no change │
│ QQuery 31 │     108.60 / 109.87 ±0.67 / 110.59 ms │     107.43 / 107.87 ±0.38 / 108.57 ms │     no change │
│ QQuery 32 │        20.14 / 20.41 ±0.17 / 20.60 ms │        20.11 / 20.30 ±0.15 / 20.55 ms │     no change │
│ QQuery 33 │        37.43 / 37.60 ±0.14 / 37.78 ms │        36.70 / 36.95 ±0.37 / 37.68 ms │     no change │
│ QQuery 34 │        10.58 / 12.35 ±2.60 / 17.49 ms │          9.83 / 9.96 ±0.11 / 10.07 ms │ +1.24x faster │
│ QQuery 35 │        71.74 / 72.95 ±0.65 / 73.44 ms │        71.22 / 73.16 ±2.39 / 77.87 ms │     no change │
│ QQuery 36 │           5.45 / 5.66 ±0.25 / 6.15 ms │           5.46 / 5.61 ±0.23 / 6.06 ms │     no change │
│ QQuery 37 │           6.65 / 6.68 ±0.02 / 6.71 ms │           6.56 / 6.65 ±0.06 / 6.71 ms │     no change │
│ QQuery 38 │        60.64 / 61.23 ±0.47 / 61.85 ms │        59.65 / 60.43 ±0.54 / 61.22 ms │     no change │
│ QQuery 39 │        73.39 / 75.07 ±2.78 / 80.60 ms │        71.98 / 73.76 ±2.90 / 79.51 ms │     no change │
│ QQuery 40 │        23.65 / 24.15 ±0.54 / 25.14 ms │        23.14 / 23.80 ±0.53 / 24.73 ms │     no change │
│ QQuery 41 │        11.22 / 11.41 ±0.15 / 11.66 ms │        11.28 / 11.50 ±0.16 / 11.70 ms │     no change │
│ QQuery 42 │        23.85 / 24.34 ±0.45 / 25.04 ms │        23.43 / 23.72 ±0.23 / 24.08 ms │     no change │
│ QQuery 43 │           4.68 / 4.84 ±0.18 / 5.18 ms │           4.63 / 4.78 ±0.17 / 5.11 ms │     no change │
│ QQuery 44 │           8.49 / 8.65 ±0.16 / 8.92 ms │           8.44 / 8.59 ±0.09 / 8.72 ms │     no change │
│ QQuery 45 │        36.28 / 37.40 ±0.66 / 38.31 ms │        35.08 / 36.14 ±1.48 / 39.03 ms │     no change │
│ QQuery 46 │        11.67 / 12.04 ±0.31 / 12.53 ms │        11.17 / 11.81 ±0.57 / 12.81 ms │     no change │
│ QQuery 47 │     220.61 / 225.70 ±4.78 / 233.81 ms │     215.88 / 220.70 ±3.20 / 224.67 ms │     no change │
│ QQuery 48 │        90.69 / 92.46 ±2.37 / 96.87 ms │        88.94 / 90.30 ±1.07 / 92.08 ms │     no change │
│ QQuery 49 │        70.28 / 71.43 ±0.67 / 72.25 ms │        68.88 / 69.36 ±0.50 / 70.14 ms │     no change │
│ QQuery 50 │        58.78 / 59.21 ±0.37 / 59.66 ms │        58.00 / 58.87 ±1.43 / 61.73 ms │     no change │
│ QQuery 51 │       92.33 / 96.32 ±6.65 / 109.59 ms │        91.15 / 93.51 ±1.25 / 94.84 ms │     no change │
│ QQuery 52 │        24.20 / 24.55 ±0.43 / 25.39 ms │        23.69 / 23.96 ±0.20 / 24.30 ms │     no change │
│ QQuery 53 │        29.79 / 29.89 ±0.10 / 30.05 ms │        29.24 / 29.41 ±0.11 / 29.58 ms │     no change │
│ QQuery 54 │        54.33 / 56.06 ±2.88 / 61.79 ms │        53.49 / 53.72 ±0.27 / 54.22 ms │     no change │
│ QQuery 55 │        24.11 / 24.51 ±0.33 / 24.92 ms │        23.39 / 23.49 ±0.09 / 23.63 ms │     no change │
│ QQuery 56 │        38.07 / 38.56 ±0.42 / 39.19 ms │        37.86 / 38.13 ±0.22 / 38.38 ms │     no change │
│ QQuery 57 │     167.49 / 169.80 ±2.98 / 175.48 ms │     162.87 / 164.16 ±0.98 / 165.04 ms │     no change │
│ QQuery 58 │     105.96 / 107.96 ±1.41 / 109.92 ms │     104.89 / 105.93 ±0.83 / 107.25 ms │     no change │
│ QQuery 59 │     114.34 / 115.19 ±1.46 / 118.09 ms │     114.07 / 115.57 ±1.40 / 117.78 ms │     no change │
│ QQuery 60 │        37.64 / 38.49 ±0.78 / 39.95 ms │        38.48 / 39.06 ±0.58 / 40.07 ms │     no change │
│ QQuery 61 │        10.97 / 11.08 ±0.11 / 11.29 ms │        10.93 / 11.07 ±0.16 / 11.34 ms │     no change │
│ QQuery 62 │        43.07 / 43.80 ±0.74 / 45.10 ms │        42.72 / 43.08 ±0.31 / 43.52 ms │     no change │
│ QQuery 63 │        29.30 / 29.50 ±0.21 / 29.79 ms │        28.91 / 29.29 ±0.31 / 29.78 ms │     no change │
│ QQuery 64 │     355.40 / 359.04 ±3.17 / 364.33 ms │     355.25 / 360.84 ±3.43 / 364.90 ms │     no change │
│ QQuery 65 │     127.69 / 130.64 ±1.74 / 132.60 ms │     128.70 / 134.23 ±4.07 / 140.59 ms │     no change │
│ QQuery 66 │        75.08 / 75.43 ±0.32 / 76.00 ms │        73.73 / 74.43 ±0.64 / 75.55 ms │     no change │
│ QQuery 67 │     244.59 / 247.71 ±3.51 / 252.56 ms │     244.55 / 251.76 ±5.86 / 259.86 ms │     no change │
│ QQuery 68 │        11.94 / 12.05 ±0.11 / 12.24 ms │        11.52 / 11.73 ±0.15 / 11.95 ms │     no change │
│ QQuery 69 │        55.32 / 58.63 ±5.07 / 68.71 ms │        55.52 / 57.88 ±3.56 / 64.97 ms │     no change │
│ QQuery 70 │     102.86 / 104.09 ±1.50 / 106.95 ms │     102.06 / 103.54 ±1.17 / 105.58 ms │     no change │
│ QQuery 71 │        34.67 / 34.85 ±0.13 / 35.05 ms │        34.76 / 35.53 ±0.97 / 37.41 ms │     no change │
│ QQuery 72 │ 1575.56 / 1651.14 ±41.38 / 1698.19 ms │ 1589.95 / 1652.47 ±47.58 / 1708.60 ms │     no change │
│ QQuery 73 │         9.55 / 10.00 ±0.38 / 10.45 ms │         9.78 / 10.62 ±0.81 / 12.17 ms │  1.06x slower │
│ QQuery 74 │     155.31 / 157.59 ±1.40 / 159.30 ms │     155.22 / 156.73 ±1.38 / 158.36 ms │     no change │
│ QQuery 75 │     138.80 / 139.96 ±0.83 / 140.93 ms │     138.53 / 140.84 ±2.86 / 146.27 ms │     no change │
│ QQuery 76 │        33.75 / 34.12 ±0.27 / 34.48 ms │        34.32 / 35.13 ±1.13 / 37.32 ms │     no change │
│ QQuery 77 │        59.23 / 59.80 ±0.37 / 60.20 ms │        59.23 / 61.84 ±4.32 / 70.42 ms │     no change │
│ QQuery 78 │     157.98 / 162.33 ±3.46 / 168.23 ms │     159.28 / 162.65 ±3.53 / 168.79 ms │     no change │
│ QQuery 79 │        65.49 / 66.56 ±1.28 / 68.98 ms │        65.47 / 69.59 ±6.08 / 81.58 ms │     no change │
│ QQuery 80 │        93.84 / 94.78 ±0.76 / 96.04 ms │        93.36 / 95.85 ±1.91 / 99.15 ms │     no change │
│ QQuery 81 │        25.48 / 25.66 ±0.10 / 25.75 ms │        25.29 / 25.64 ±0.32 / 26.06 ms │     no change │
│ QQuery 82 │        16.54 / 18.29 ±2.75 / 23.65 ms │        16.29 / 16.58 ±0.24 / 17.02 ms │ +1.10x faster │
│ QQuery 83 │        32.56 / 33.12 ±0.34 / 33.58 ms │        32.29 / 34.10 ±2.42 / 38.90 ms │     no change │
│ QQuery 84 │        29.33 / 29.86 ±0.38 / 30.47 ms │        29.61 / 30.60 ±0.71 / 31.37 ms │     no change │
│ QQuery 85 │        97.21 / 97.98 ±0.63 / 98.88 ms │        96.69 / 98.01 ±1.21 / 99.89 ms │     no change │
│ QQuery 86 │        25.08 / 25.46 ±0.29 / 25.95 ms │        25.19 / 25.74 ±0.60 / 26.85 ms │     no change │
│ QQuery 87 │        60.18 / 62.25 ±2.40 / 66.73 ms │        60.73 / 62.55 ±2.38 / 67.02 ms │     no change │
│ QQuery 88 │        59.34 / 60.10 ±0.57 / 61.01 ms │        59.56 / 60.04 ±0.42 / 60.77 ms │     no change │
│ QQuery 89 │        34.74 / 35.23 ±0.30 / 35.62 ms │        34.11 / 34.96 ±0.92 / 36.73 ms │     no change │
│ QQuery 90 │        16.25 / 16.45 ±0.22 / 16.83 ms │        16.15 / 16.36 ±0.19 / 16.66 ms │     no change │
│ QQuery 91 │        40.45 / 42.15 ±3.03 / 48.20 ms │        40.25 / 40.65 ±0.33 / 41.16 ms │     no change │
│ QQuery 92 │        29.16 / 29.82 ±0.59 / 30.69 ms │        28.97 / 31.71 ±4.18 / 40.00 ms │  1.06x slower │
│ QQuery 93 │        49.15 / 49.51 ±0.48 / 50.44 ms │        48.53 / 49.52 ±0.81 / 50.95 ms │     no change │
│ QQuery 94 │        38.38 / 38.82 ±0.56 / 39.86 ms │        37.71 / 37.83 ±0.11 / 38.02 ms │     no change │
│ QQuery 95 │        79.85 / 81.25 ±1.79 / 84.75 ms │        78.91 / 79.97 ±0.68 / 80.88 ms │     no change │
│ QQuery 96 │        23.56 / 24.15 ±0.41 / 24.82 ms │        23.49 / 25.31 ±2.95 / 31.20 ms │     no change │
│ QQuery 97 │        49.78 / 50.72 ±1.37 / 53.41 ms │        50.15 / 52.06 ±1.29 / 53.49 ms │     no change │
│ QQuery 98 │        42.25 / 42.92 ±0.49 / 43.67 ms │        41.34 / 42.16 ±0.52 / 42.96 ms │     no change │
│ QQuery 99 │        63.84 / 64.39 ±0.47 / 65.23 ms │        63.66 / 64.22 ±0.69 / 65.52 ms │     no change │
└───────────┴───────────────────────────────────────┴───────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Benchmark Summary        ┃           ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ Total Time (HEAD)        │ 8916.44ms │
│ Total Time (alloc-opt)   │ 8880.45ms │
│ Average Time (HEAD)      │   90.07ms │
│ Average Time (alloc-opt) │   89.70ms │
│ Queries Faster           │         3 │
│ Queries Slower           │         2 │
│ Queries with No Change   │        94 │
│ Queries with Failure     │         0 │
└──────────────────────────┴───────────┘

Resource Usage

tpcds — base (merge-base)

Metric Value
Wall time 45.0s
Peak memory 2.1 GiB
Avg memory 1.5 GiB
CPU user 188.4s
CPU sys 5.2s
Peak spill 0 B

tpcds — branch

Metric Value
Wall time 45.0s
Peak memory 2.0 GiB
Avg memory 1.4 GiB
CPU user 188.9s
CPU sys 5.6s
Peak spill 0 B

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-c6101643240-3276-sgcpf 6.12.94+ #1 SMP Fri Aug 21 08:00:16 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 alloc-opt (a511f02) to 3310fd5 (merge-base) diff

Run configuration
run benchmark tpch

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 alloc-opt (a511f02) to 3310fd5 (merge-base) diff

Run configuration
run benchmark tpch
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 alloc-opt
--------------------
Benchmark tpch_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━━┓
┃ Query     ┃     HEAD ┃ alloc-opt ┃       Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━━━┩
│ QQuery 1  │ 40.58 ms │  41.13 ms │    no change │
│ QQuery 2  │ 18.13 ms │  18.20 ms │    no change │
│ QQuery 3  │ 28.59 ms │  28.70 ms │    no change │
│ QQuery 4  │ 17.31 ms │  17.31 ms │    no change │
│ QQuery 5  │ 35.39 ms │  35.26 ms │    no change │
│ QQuery 6  │ 13.55 ms │  13.58 ms │    no change │
│ QQuery 7  │ 40.83 ms │  43.02 ms │ 1.05x slower │
│ QQuery 8  │ 40.64 ms │  40.98 ms │    no change │
│ QQuery 9  │ 50.71 ms │  50.56 ms │    no change │
│ QQuery 10 │ 40.67 ms │  40.74 ms │    no change │
│ QQuery 11 │ 13.19 ms │  13.55 ms │    no change │
│ QQuery 12 │ 18.29 ms │  18.73 ms │    no change │
│ QQuery 13 │ 39.55 ms │  39.45 ms │    no change │
│ QQuery 14 │ 24.43 ms │  24.52 ms │    no change │
│ QQuery 15 │ 30.81 ms │  30.91 ms │    no change │
│ QQuery 16 │ 13.99 ms │  13.98 ms │    no change │
│ QQuery 17 │ 75.34 ms │  74.70 ms │    no change │
│ QQuery 18 │ 45.53 ms │  45.37 ms │    no change │
│ QQuery 19 │ 31.45 ms │  31.50 ms │    no change │
│ QQuery 20 │ 31.84 ms │  31.70 ms │    no change │
│ QQuery 21 │ 57.02 ms │  55.48 ms │    no change │
│ QQuery 22 │ 13.74 ms │  13.93 ms │    no change │
└───────────┴──────────┴───────────┴──────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┓
┃ Benchmark Summary        ┃          ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━┩
│ Total Time (HEAD)        │ 721.57ms │
│ Total Time (alloc-opt)   │ 723.32ms │
│ Average Time (HEAD)      │  32.80ms │
│ Average Time (alloc-opt) │  32.88ms │
│ Queries Faster           │        0 │
│ Queries Slower           │        1 │
│ Queries with No Change   │       21 │
│ Queries with Failure     │        0 │
└──────────────────────────┴──────────┘

Distribution per query (min / mean ±stddev / max):

Comparing HEAD and alloc-opt
--------------------
Benchmark tpch_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Query     ┃                           HEAD ┃                      alloc-opt ┃    Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ QQuery 1  │ 40.58 / 41.40 ±0.95 / 43.17 ms │ 41.13 / 41.99 ±0.81 / 43.29 ms │ no change │
│ QQuery 2  │ 18.13 / 18.95 ±0.65 / 19.93 ms │ 18.20 / 19.77 ±2.06 / 23.73 ms │ no change │
│ QQuery 3  │ 28.59 / 29.20 ±0.87 / 30.91 ms │ 28.70 / 29.32 ±0.90 / 31.11 ms │ no change │
│ QQuery 4  │ 17.31 / 17.79 ±0.60 / 18.93 ms │ 17.31 / 17.72 ±0.49 / 18.68 ms │ no change │
│ QQuery 5  │ 35.39 / 36.35 ±0.99 / 38.13 ms │ 35.26 / 35.74 ±0.58 / 36.84 ms │ no change │
│ QQuery 6  │ 13.55 / 13.92 ±0.55 / 15.01 ms │ 13.58 / 13.91 ±0.46 / 14.82 ms │ no change │
│ QQuery 7  │ 40.83 / 42.35 ±1.48 / 45.17 ms │ 43.02 / 44.39 ±0.86 / 45.38 ms │ no change │
│ QQuery 8  │ 40.64 / 41.42 ±0.80 / 42.94 ms │ 40.98 / 42.39 ±1.31 / 43.95 ms │ no change │
│ QQuery 9  │ 50.71 / 51.24 ±0.47 / 52.04 ms │ 50.56 / 51.01 ±0.30 / 51.36 ms │ no change │
│ QQuery 10 │ 40.67 / 41.71 ±1.07 / 43.21 ms │ 40.74 / 40.98 ±0.20 / 41.33 ms │ no change │
│ QQuery 11 │ 13.19 / 13.57 ±0.25 / 13.96 ms │ 13.55 / 13.76 ±0.11 / 13.86 ms │ no change │
│ QQuery 12 │ 18.29 / 18.82 ±0.53 / 19.69 ms │ 18.73 / 19.10 ±0.32 / 19.61 ms │ no change │
│ QQuery 13 │ 39.55 / 41.01 ±2.24 / 45.46 ms │ 39.45 / 40.21 ±0.98 / 42.14 ms │ no change │
│ QQuery 14 │ 24.43 / 24.61 ±0.16 / 24.89 ms │ 24.52 / 25.17 ±1.11 / 27.38 ms │ no change │
│ QQuery 15 │ 30.81 / 31.67 ±0.86 / 32.71 ms │ 30.91 / 31.69 ±0.75 / 32.74 ms │ no change │
│ QQuery 16 │ 13.99 / 14.09 ±0.07 / 14.17 ms │ 13.98 / 14.09 ±0.10 / 14.28 ms │ no change │
│ QQuery 17 │ 75.34 / 75.96 ±0.45 / 76.54 ms │ 74.70 / 75.52 ±0.56 / 76.25 ms │ no change │
│ QQuery 18 │ 45.53 / 46.47 ±0.96 / 48.25 ms │ 45.37 / 46.55 ±0.86 / 47.82 ms │ no change │
│ QQuery 19 │ 31.45 / 31.58 ±0.13 / 31.77 ms │ 31.50 / 32.28 ±0.78 / 33.41 ms │ no change │
│ QQuery 20 │ 31.84 / 32.15 ±0.33 / 32.76 ms │ 31.70 / 32.09 ±0.31 / 32.62 ms │ no change │
│ QQuery 21 │ 57.02 / 58.24 ±0.67 / 59.05 ms │ 55.48 / 56.39 ±0.68 / 57.47 ms │ no change │
│ QQuery 22 │ 13.74 / 14.07 ±0.26 / 14.38 ms │ 13.93 / 14.12 ±0.12 / 14.30 ms │ no change │
└───────────┴────────────────────────────────┴────────────────────────────────┴───────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┓
┃ Benchmark Summary        ┃          ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━┩
│ Total Time (HEAD)        │ 736.59ms │
│ Total Time (alloc-opt)   │ 738.22ms │
│ Average Time (HEAD)      │  33.48ms │
│ Average Time (alloc-opt) │  33.56ms │
│ 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.1 GiB
Avg memory 479.6 MiB
CPU user 20.1s
CPU sys 1.6s
Peak spill 0 B

tpch — branch

Metric Value
Wall time 5.0s
Peak memory 1.1 GiB
Avg memory 473.8 MiB
CPU user 20.1s
CPU sys 1.7s
Peak spill 0 B

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-c6101643240-3277-lnjnx 6.12.94+ #1 SMP Fri Aug 21 08:00:16 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 alloc-opt (a511f02) to 3310fd5 (merge-base) diff

Run configuration
run benchmark tpcds

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 alloc-opt (a511f02) to 3310fd5 (merge-base) diff

Run configuration
run benchmark tpcds
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 alloc-opt
--------------------
Benchmark tpcds_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃       HEAD ┃  alloc-opt ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1  │    5.57 ms │    5.36 ms │     no change │
│ QQuery 2  │   81.30 ms │   80.11 ms │     no change │
│ QQuery 3  │   29.15 ms │   28.56 ms │     no change │
│ QQuery 4  │  450.39 ms │  442.94 ms │     no change │
│ QQuery 5  │   51.10 ms │   49.82 ms │     no change │
│ QQuery 6  │   35.39 ms │   34.80 ms │     no change │
│ QQuery 7  │   72.59 ms │   71.21 ms │     no change │
│ QQuery 8  │   36.76 ms │   35.75 ms │     no change │
│ QQuery 9  │   54.32 ms │   51.69 ms │     no change │
│ QQuery 10 │   61.54 ms │   60.55 ms │     no change │
│ QQuery 11 │  288.90 ms │  271.31 ms │ +1.06x faster │
│ QQuery 12 │   29.17 ms │   28.36 ms │     no change │
│ QQuery 13 │  114.63 ms │  113.27 ms │     no change │
│ QQuery 14 │  383.82 ms │  387.11 ms │     no change │
│ QQuery 15 │   52.78 ms │   52.61 ms │     no change │
│ QQuery 16 │    6.12 ms │    6.12 ms │     no change │
│ QQuery 17 │   77.46 ms │   78.26 ms │     no change │
│ QQuery 18 │  103.32 ms │  104.15 ms │     no change │
│ QQuery 19 │   40.94 ms │   40.93 ms │     no change │
│ QQuery 20 │   35.19 ms │   34.77 ms │     no change │
│ QQuery 21 │   16.90 ms │   17.06 ms │     no change │
│ QQuery 22 │   64.04 ms │   63.66 ms │     no change │
│ QQuery 23 │  305.40 ms │  301.41 ms │     no change │
│ QQuery 24 │  196.83 ms │  194.65 ms │     no change │
│ QQuery 25 │  108.89 ms │  107.70 ms │     no change │
│ QQuery 26 │   45.05 ms │   45.14 ms │     no change │
│ QQuery 27 │    5.91 ms │    5.71 ms │     no change │
│ QQuery 28 │   60.02 ms │   55.74 ms │ +1.08x faster │
│ QQuery 29 │   96.64 ms │   95.69 ms │     no change │
│ QQuery 30 │   33.02 ms │   32.51 ms │     no change │
│ QQuery 31 │  108.51 ms │  107.96 ms │     no change │
│ QQuery 32 │   20.52 ms │   20.14 ms │     no change │
│ QQuery 33 │   37.13 ms │   36.81 ms │     no change │
│ QQuery 34 │   10.40 ms │    9.99 ms │     no change │
│ QQuery 35 │   72.23 ms │   71.11 ms │     no change │
│ QQuery 36 │    5.87 ms │    5.45 ms │ +1.08x faster │
│ QQuery 37 │    6.95 ms │    6.70 ms │     no change │
│ QQuery 38 │   60.79 ms │   60.88 ms │     no change │
│ QQuery 39 │   73.12 ms │   72.56 ms │     no change │
│ QQuery 40 │   24.07 ms │   23.12 ms │     no change │
│ QQuery 41 │   11.62 ms │   11.10 ms │     no change │
│ QQuery 42 │   24.19 ms │   23.77 ms │     no change │
│ QQuery 43 │    4.89 ms │    4.74 ms │     no change │
│ QQuery 44 │    9.02 ms │    8.70 ms │     no change │
│ QQuery 45 │   39.05 ms │   36.36 ms │ +1.07x faster │
│ QQuery 46 │   12.49 ms │   11.69 ms │ +1.07x faster │
│ QQuery 47 │  233.98 ms │  217.87 ms │ +1.07x faster │
│ QQuery 48 │   90.64 ms │   89.90 ms │     no change │
│ QQuery 49 │   70.01 ms │   69.21 ms │     no change │
│ QQuery 50 │   59.06 ms │   58.36 ms │     no change │
│ QQuery 51 │   92.99 ms │   91.03 ms │     no change │
│ QQuery 52 │   24.30 ms │   24.13 ms │     no change │
│ QQuery 53 │   29.48 ms │   29.13 ms │     no change │
│ QQuery 54 │   53.94 ms │   53.50 ms │     no change │
│ QQuery 55 │   24.02 ms │   23.82 ms │     no change │
│ QQuery 56 │   38.87 ms │   37.47 ms │     no change │
│ QQuery 57 │  167.95 ms │  166.26 ms │     no change │
│ QQuery 58 │  107.47 ms │  106.14 ms │     no change │
│ QQuery 59 │  114.39 ms │  114.32 ms │     no change │
│ QQuery 60 │   38.54 ms │   38.09 ms │     no change │
│ QQuery 61 │   11.24 ms │   11.14 ms │     no change │
│ QQuery 62 │   43.39 ms │   43.17 ms │     no change │
│ QQuery 63 │   29.41 ms │   29.32 ms │     no change │
│ QQuery 64 │  362.16 ms │  360.65 ms │     no change │
│ QQuery 65 │  130.70 ms │  129.13 ms │     no change │
│ QQuery 66 │   76.28 ms │   74.23 ms │     no change │
│ QQuery 67 │  259.24 ms │  248.78 ms │     no change │
│ QQuery 68 │   12.28 ms │   11.61 ms │ +1.06x faster │
│ QQuery 69 │   57.22 ms │   55.70 ms │     no change │
│ QQuery 70 │  103.84 ms │  102.53 ms │     no change │
│ QQuery 71 │   35.30 ms │   34.60 ms │     no change │
│ QQuery 72 │ 1611.84 ms │ 1647.13 ms │     no change │
│ QQuery 73 │    9.98 ms │    9.99 ms │     no change │
│ QQuery 74 │  165.85 ms │  159.77 ms │     no change │
│ QQuery 75 │  140.98 ms │  140.72 ms │     no change │
│ QQuery 76 │   33.99 ms │   34.25 ms │     no change │
│ QQuery 77 │   59.93 ms │   60.44 ms │     no change │
│ QQuery 78 │  160.97 ms │  161.87 ms │     no change │
│ QQuery 79 │   65.82 ms │   66.01 ms │     no change │
│ QQuery 80 │   95.32 ms │   95.54 ms │     no change │
│ QQuery 81 │   25.84 ms │   25.94 ms │     no change │
│ QQuery 82 │   16.31 ms │   16.66 ms │     no change │
│ QQuery 83 │   32.98 ms │   32.93 ms │     no change │
│ QQuery 84 │   30.04 ms │   29.70 ms │     no change │
│ QQuery 85 │   98.42 ms │   98.19 ms │     no change │
│ QQuery 86 │   25.14 ms │   25.27 ms │     no change │
│ QQuery 87 │   61.22 ms │   60.64 ms │     no change │
│ QQuery 88 │   58.75 ms │   59.14 ms │     no change │
│ QQuery 89 │   34.97 ms │   35.10 ms │     no change │
│ QQuery 90 │   16.53 ms │   16.51 ms │     no change │
│ QQuery 91 │   40.53 ms │   40.77 ms │     no change │
│ QQuery 92 │   29.48 ms │   29.22 ms │     no change │
│ QQuery 93 │   48.67 ms │   49.22 ms │     no change │
│ QQuery 94 │   38.95 ms │   38.61 ms │     no change │
│ QQuery 95 │   80.20 ms │   80.02 ms │     no change │
│ QQuery 96 │   23.62 ms │   23.82 ms │     no change │
│ QQuery 97 │   50.92 ms │   50.85 ms │     no change │
│ QQuery 98 │   42.70 ms │   42.80 ms │     no change │
│ QQuery 99 │   64.06 ms │   64.10 ms │     no change │
└───────────┴────────────┴────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Benchmark Summary        ┃           ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ Total Time (HEAD)        │ 8894.74ms │
│ Total Time (alloc-opt)   │ 8823.34ms │
│ Average Time (HEAD)      │   89.85ms │
│ Average Time (alloc-opt) │   89.12ms │
│ Queries Faster           │         7 │
│ Queries Slower           │         0 │
│ Queries with No Change   │        92 │
│ Queries with Failure     │         0 │
└──────────────────────────┴───────────┘

Distribution per query (min / mean ±stddev / max):

Comparing HEAD and alloc-opt
--------------------
Benchmark tpcds_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                  HEAD ┃                             alloc-opt ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1  │           5.57 / 6.15 ±1.02 / 8.19 ms │           5.36 / 5.98 ±1.01 / 7.98 ms │     no change │
│ QQuery 2  │        81.30 / 81.70 ±0.58 / 82.86 ms │        80.11 / 80.50 ±0.29 / 80.94 ms │     no change │
│ QQuery 3  │        29.15 / 29.43 ±0.29 / 29.94 ms │        28.56 / 28.81 ±0.18 / 29.10 ms │     no change │
│ QQuery 4  │     450.39 / 459.27 ±4.46 / 461.88 ms │     442.94 / 446.72 ±3.31 / 451.76 ms │     no change │
│ QQuery 5  │        51.10 / 51.52 ±0.25 / 51.89 ms │        49.82 / 51.81 ±2.84 / 57.32 ms │     no change │
│ QQuery 6  │        35.39 / 35.86 ±0.44 / 36.52 ms │        34.80 / 35.81 ±0.52 / 36.23 ms │     no change │
│ QQuery 7  │        72.59 / 73.04 ±0.24 / 73.24 ms │        71.21 / 71.69 ±0.50 / 72.58 ms │     no change │
│ QQuery 8  │        36.76 / 36.87 ±0.11 / 37.02 ms │        35.75 / 36.49 ±0.39 / 36.88 ms │     no change │
│ QQuery 9  │        54.32 / 55.22 ±0.68 / 56.35 ms │        51.69 / 53.51 ±1.44 / 55.66 ms │     no change │
│ QQuery 10 │        61.54 / 61.84 ±0.21 / 62.17 ms │        60.55 / 60.85 ±0.29 / 61.29 ms │     no change │
│ QQuery 11 │     288.90 / 291.68 ±2.25 / 295.44 ms │     271.31 / 280.27 ±6.06 / 287.07 ms │     no change │
│ QQuery 12 │        29.17 / 31.34 ±3.34 / 37.93 ms │        28.36 / 28.63 ±0.27 / 29.08 ms │ +1.09x faster │
│ QQuery 13 │     114.63 / 116.22 ±1.55 / 118.79 ms │     113.27 / 115.05 ±1.97 / 118.87 ms │     no change │
│ QQuery 14 │     383.82 / 392.65 ±5.70 / 400.76 ms │     387.11 / 390.22 ±1.74 / 392.42 ms │     no change │
│ QQuery 15 │        52.78 / 53.62 ±0.52 / 54.23 ms │        52.61 / 53.17 ±0.52 / 54.15 ms │     no change │
│ QQuery 16 │           6.12 / 6.27 ±0.19 / 6.64 ms │           6.12 / 6.27 ±0.20 / 6.67 ms │     no change │
│ QQuery 17 │        77.46 / 79.41 ±1.20 / 81.20 ms │        78.26 / 79.65 ±1.80 / 82.92 ms │     no change │
│ QQuery 18 │     103.32 / 104.77 ±1.32 / 107.02 ms │     104.15 / 105.63 ±1.95 / 109.47 ms │     no change │
│ QQuery 19 │        40.94 / 41.18 ±0.17 / 41.45 ms │        40.93 / 41.48 ±0.48 / 42.35 ms │     no change │
│ QQuery 20 │        35.19 / 36.24 ±0.53 / 36.62 ms │        34.77 / 35.88 ±0.78 / 37.02 ms │     no change │
│ QQuery 21 │        16.90 / 17.21 ±0.29 / 17.58 ms │        17.06 / 17.21 ±0.15 / 17.48 ms │     no change │
│ QQuery 22 │        64.04 / 64.71 ±0.43 / 65.35 ms │        63.66 / 64.30 ±0.52 / 64.81 ms │     no change │
│ QQuery 23 │     305.40 / 310.53 ±5.40 / 318.05 ms │     301.41 / 308.23 ±6.20 / 318.84 ms │     no change │
│ QQuery 24 │     196.83 / 201.19 ±4.32 / 208.43 ms │     194.65 / 199.13 ±5.86 / 210.63 ms │     no change │
│ QQuery 25 │     108.89 / 111.92 ±2.63 / 116.41 ms │     107.70 / 109.57 ±1.08 / 111.10 ms │     no change │
│ QQuery 26 │        45.05 / 45.77 ±0.53 / 46.57 ms │        45.14 / 45.45 ±0.25 / 45.75 ms │     no change │
│ QQuery 27 │           5.91 / 6.09 ±0.17 / 6.39 ms │           5.71 / 5.94 ±0.30 / 6.52 ms │     no change │
│ QQuery 28 │        60.02 / 60.88 ±0.52 / 61.66 ms │        55.74 / 58.81 ±2.13 / 60.82 ms │     no change │
│ QQuery 29 │       96.64 / 98.19 ±1.79 / 100.40 ms │       95.69 / 99.03 ±2.53 / 102.27 ms │     no change │
│ QQuery 30 │        33.02 / 33.42 ±0.27 / 33.78 ms │        32.51 / 32.99 ±0.58 / 33.73 ms │     no change │
│ QQuery 31 │     108.51 / 111.70 ±3.03 / 117.45 ms │     107.96 / 108.37 ±0.34 / 108.88 ms │     no change │
│ QQuery 32 │        20.52 / 20.86 ±0.27 / 21.22 ms │        20.14 / 20.26 ±0.11 / 20.41 ms │     no change │
│ QQuery 33 │        37.13 / 37.58 ±0.50 / 38.37 ms │        36.81 / 39.14 ±3.89 / 46.88 ms │     no change │
│ QQuery 34 │        10.40 / 10.70 ±0.41 / 11.50 ms │         9.99 / 10.35 ±0.33 / 10.92 ms │     no change │
│ QQuery 35 │        72.23 / 73.75 ±1.33 / 75.73 ms │        71.11 / 71.58 ±0.56 / 72.51 ms │     no change │
│ QQuery 36 │           5.87 / 6.00 ±0.17 / 6.33 ms │           5.45 / 5.61 ±0.28 / 6.17 ms │ +1.07x faster │
│ QQuery 37 │           6.95 / 7.04 ±0.06 / 7.12 ms │           6.70 / 7.20 ±0.82 / 8.84 ms │     no change │
│ QQuery 38 │        60.79 / 62.05 ±0.91 / 63.47 ms │        60.88 / 61.91 ±0.79 / 63.04 ms │     no change │
│ QQuery 39 │        73.12 / 73.72 ±0.45 / 74.44 ms │        72.56 / 74.71 ±3.12 / 80.82 ms │     no change │
│ QQuery 40 │        24.07 / 25.36 ±2.08 / 29.51 ms │        23.12 / 23.80 ±0.39 / 24.24 ms │ +1.07x faster │
│ QQuery 41 │        11.62 / 11.80 ±0.11 / 11.92 ms │        11.10 / 11.30 ±0.14 / 11.53 ms │     no change │
│ QQuery 42 │        24.19 / 24.47 ±0.20 / 24.75 ms │        23.77 / 24.28 ±0.57 / 25.39 ms │     no change │
│ QQuery 43 │           4.89 / 4.99 ±0.12 / 5.21 ms │           4.74 / 5.46 ±1.19 / 7.81 ms │  1.09x slower │
│ QQuery 44 │           9.02 / 9.24 ±0.18 / 9.56 ms │           8.70 / 8.80 ±0.06 / 8.88 ms │     no change │
│ QQuery 45 │        39.05 / 40.43 ±1.71 / 43.78 ms │        36.36 / 36.95 ±0.31 / 37.21 ms │ +1.09x faster │
│ QQuery 46 │        12.49 / 12.66 ±0.09 / 12.74 ms │        11.69 / 12.05 ±0.25 / 12.45 ms │     no change │
│ QQuery 47 │     233.98 / 238.48 ±3.91 / 245.03 ms │     217.87 / 224.47 ±6.02 / 235.36 ms │ +1.06x faster │
│ QQuery 48 │        90.64 / 91.39 ±0.66 / 92.62 ms │        89.90 / 90.21 ±0.19 / 90.40 ms │     no change │
│ QQuery 49 │        70.01 / 73.18 ±3.52 / 79.94 ms │        69.21 / 69.86 ±1.11 / 72.08 ms │     no change │
│ QQuery 50 │        59.06 / 59.48 ±0.25 / 59.71 ms │        58.36 / 60.12 ±2.69 / 65.40 ms │     no change │
│ QQuery 51 │       92.99 / 96.84 ±4.98 / 106.41 ms │        91.03 / 94.47 ±2.88 / 99.79 ms │     no change │
│ QQuery 52 │        24.30 / 26.48 ±3.80 / 34.08 ms │        24.13 / 24.95 ±1.14 / 27.21 ms │ +1.06x faster │
│ QQuery 53 │        29.48 / 29.80 ±0.21 / 30.10 ms │        29.13 / 29.41 ±0.19 / 29.70 ms │     no change │
│ QQuery 54 │        53.94 / 54.35 ±0.33 / 54.88 ms │        53.50 / 56.25 ±3.96 / 64.10 ms │     no change │
│ QQuery 55 │        24.02 / 25.27 ±2.13 / 29.52 ms │        23.82 / 24.06 ±0.29 / 24.62 ms │     no change │
│ QQuery 56 │        38.87 / 39.32 ±0.41 / 39.97 ms │        37.47 / 38.20 ±0.42 / 38.71 ms │     no change │
│ QQuery 57 │     167.95 / 169.88 ±1.45 / 172.27 ms │     166.26 / 167.58 ±1.20 / 169.06 ms │     no change │
│ QQuery 58 │     107.47 / 108.98 ±1.55 / 111.98 ms │     106.14 / 107.56 ±0.94 / 108.45 ms │     no change │
│ QQuery 59 │     114.39 / 115.93 ±1.82 / 119.49 ms │     114.32 / 116.04 ±2.66 / 121.30 ms │     no change │
│ QQuery 60 │        38.54 / 39.31 ±0.59 / 40.21 ms │        38.09 / 38.71 ±0.46 / 39.53 ms │     no change │
│ QQuery 61 │        11.24 / 11.38 ±0.10 / 11.52 ms │        11.14 / 11.71 ±0.96 / 13.61 ms │     no change │
│ QQuery 62 │        43.39 / 44.61 ±1.67 / 47.93 ms │        43.17 / 43.56 ±0.29 / 43.87 ms │     no change │
│ QQuery 63 │        29.41 / 29.84 ±0.26 / 30.18 ms │        29.32 / 31.92 ±4.21 / 40.29 ms │  1.07x slower │
│ QQuery 64 │     362.16 / 368.13 ±4.25 / 374.32 ms │     360.65 / 362.56 ±1.50 / 365.26 ms │     no change │
│ QQuery 65 │     130.70 / 132.17 ±0.80 / 132.88 ms │     129.13 / 133.66 ±4.60 / 141.61 ms │     no change │
│ QQuery 66 │        76.28 / 80.42 ±4.78 / 89.44 ms │        74.23 / 74.87 ±0.50 / 75.69 ms │ +1.07x faster │
│ QQuery 67 │    259.24 / 268.72 ±10.86 / 289.45 ms │     248.78 / 255.85 ±6.94 / 265.04 ms │     no change │
│ QQuery 68 │        12.28 / 12.51 ±0.19 / 12.81 ms │        11.61 / 11.80 ±0.20 / 12.17 ms │ +1.06x faster │
│ QQuery 69 │        57.22 / 57.64 ±0.25 / 58.00 ms │        55.70 / 55.96 ±0.22 / 56.26 ms │     no change │
│ QQuery 70 │     103.84 / 107.87 ±6.53 / 120.88 ms │     102.53 / 103.13 ±0.46 / 103.76 ms │     no change │
│ QQuery 71 │        35.30 / 36.37 ±1.55 / 39.44 ms │        34.60 / 38.51 ±6.38 / 51.22 ms │  1.06x slower │
│ QQuery 72 │ 1611.84 / 1685.05 ±46.94 / 1749.01 ms │ 1647.13 / 1707.72 ±55.32 / 1812.25 ms │     no change │
│ QQuery 73 │         9.98 / 11.16 ±0.78 / 12.18 ms │         9.99 / 10.28 ±0.28 / 10.76 ms │ +1.09x faster │
│ QQuery 74 │     165.85 / 171.46 ±5.63 / 180.98 ms │     159.77 / 161.88 ±1.96 / 165.00 ms │ +1.06x faster │
│ QQuery 75 │     140.98 / 141.58 ±0.58 / 142.54 ms │     140.72 / 144.38 ±5.81 / 155.97 ms │     no change │
│ QQuery 76 │        33.99 / 34.58 ±0.52 / 35.54 ms │        34.25 / 34.60 ±0.28 / 34.98 ms │     no change │
│ QQuery 77 │        59.93 / 60.98 ±0.65 / 61.92 ms │        60.44 / 61.39 ±1.26 / 63.86 ms │     no change │
│ QQuery 78 │     160.97 / 163.37 ±2.57 / 167.32 ms │     161.87 / 167.36 ±6.71 / 179.34 ms │     no change │
│ QQuery 79 │        65.82 / 68.08 ±2.42 / 72.66 ms │        66.01 / 66.61 ±0.45 / 67.28 ms │     no change │
│ QQuery 80 │        95.32 / 97.40 ±1.40 / 99.32 ms │      95.54 / 100.16 ±5.57 / 110.65 ms │     no change │
│ QQuery 81 │        25.84 / 26.18 ±0.31 / 26.67 ms │        25.94 / 26.14 ±0.19 / 26.41 ms │     no change │
│ QQuery 82 │        16.31 / 16.61 ±0.17 / 16.85 ms │        16.66 / 17.25 ±0.86 / 18.91 ms │     no change │
│ QQuery 83 │        32.98 / 34.71 ±3.19 / 41.07 ms │        32.93 / 33.39 ±0.34 / 33.85 ms │     no change │
│ QQuery 84 │        30.04 / 30.26 ±0.28 / 30.80 ms │        29.70 / 29.88 ±0.18 / 30.20 ms │     no change │
│ QQuery 85 │        98.42 / 99.08 ±0.52 / 99.98 ms │      98.19 / 101.87 ±4.40 / 110.29 ms │     no change │
│ QQuery 86 │        25.14 / 25.80 ±0.35 / 26.11 ms │        25.27 / 25.85 ±0.38 / 26.36 ms │     no change │
│ QQuery 87 │        61.22 / 63.95 ±2.20 / 67.39 ms │        60.64 / 62.21 ±0.91 / 63.42 ms │     no change │
│ QQuery 88 │        58.75 / 60.49 ±1.30 / 62.72 ms │        59.14 / 62.02 ±4.85 / 71.70 ms │     no change │
│ QQuery 89 │        34.97 / 35.65 ±0.50 / 36.20 ms │        35.10 / 35.71 ±0.40 / 36.29 ms │     no change │
│ QQuery 90 │        16.53 / 16.75 ±0.15 / 16.99 ms │        16.51 / 16.67 ±0.15 / 16.92 ms │     no change │
│ QQuery 91 │        40.53 / 41.07 ±0.30 / 41.43 ms │        40.77 / 41.48 ±0.54 / 42.37 ms │     no change │
│ QQuery 92 │        29.48 / 31.47 ±2.89 / 37.09 ms │        29.22 / 29.99 ±0.42 / 30.46 ms │     no change │
│ QQuery 93 │        48.67 / 49.85 ±0.90 / 50.98 ms │        49.22 / 50.12 ±0.61 / 51.00 ms │     no change │
│ QQuery 94 │        38.95 / 40.28 ±2.16 / 44.58 ms │        38.61 / 38.86 ±0.33 / 39.50 ms │     no change │
│ QQuery 95 │        80.20 / 81.05 ±0.87 / 82.39 ms │        80.02 / 80.78 ±0.66 / 81.64 ms │     no change │
│ QQuery 96 │        23.62 / 25.03 ±2.35 / 29.70 ms │        23.82 / 23.99 ±0.23 / 24.43 ms │     no change │
│ QQuery 97 │        50.92 / 51.98 ±1.20 / 54.32 ms │        50.85 / 52.64 ±1.57 / 55.17 ms │     no change │
│ QQuery 98 │        42.70 / 43.94 ±1.28 / 46.39 ms │        42.80 / 43.27 ±0.35 / 43.67 ms │     no change │
│ QQuery 99 │        64.06 / 64.29 ±0.15 / 64.49 ms │        64.10 / 64.38 ±0.37 / 65.11 ms │     no change │
└───────────┴───────────────────────────────────────┴───────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Benchmark Summary        ┃           ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ Total Time (HEAD)        │ 9117.01ms │
│ Total Time (alloc-opt)   │ 9027.15ms │
│ Average Time (HEAD)      │   92.09ms │
│ Average Time (alloc-opt) │   91.18ms │
│ Queries Faster           │        10 │
│ Queries Slower           │         3 │
│ Queries with No Change   │        86 │
│ Queries with Failure     │         0 │
└──────────────────────────┴───────────┘

Resource Usage

tpcds — base (merge-base)

Metric Value
Wall time 50.0s
Peak memory 2.0 GiB
Avg memory 1.3 GiB
CPU user 194.4s
CPU sys 5.9s
Peak spill 0 B

tpcds — branch

Metric Value
Wall time 50.0s
Peak memory 2.1 GiB
Avg memory 1.4 GiB
CPU user 192.8s
CPU sys 5.8s
Peak spill 0 B

File an issue against this benchmark runner

@kosiew kosiew left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@comphead,

Thanks for working on these allocation optimizations. I reviewed the buffer ownership, scratch-state reset behavior, and loop-hoisting changes and did not find any blocking correctness issues.

The focused validation also passed 3,221 tests. I have one optional suggestion for additional array-slicing coverage, but it is not a merge blocker.

let mut offsets = vec![O::usize_as(0)];
let mut offsets = Vec::with_capacity(array.len() + 1);
offsets.push(O::usize_as(0));
let mut indices = Vec::new();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could we add a test that mixes indexed slicing, contiguous slicing, empty and null rows, and negative strides within the same batch, for both List and ListView? This would help verify that reusing the indices buffer works correctly when switching between slicing modes, even though I haven't found a correctness issue.

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.

Thanks, added in b67eecd. The new array_slice.slt case mixes strided, contiguous, empty, NULL and negative-stride rows in one batch for both List and ListView. It fails if the indices.clear() calls are removed.

@github-actions github-actions Bot added the sqllogictest SQL Logic Tests (.slt) label Oct 12, 2026
@comphead
comphead added this pull request to the merge queue Oct 12, 2026
Merged via the queue into apache:main with commit 9551051 Oct 12, 2026
42 checks passed
@comphead
comphead deleted the alloc-opt branch October 12, 2026 19:31
jayzhan211 added a commit to jayzhan211/datafusion that referenced this pull request Oct 14, 2026
bvolpato pushed a commit to bvolpato/datafusion that referenced this pull request Oct 16, 2026
## Which issue does this PR close?

- N/A

## Rationale for this change

For input arrays with at least one non-ASCII string, apache#23588 changed
`upper` on `Utf8` and `LargeUtf8` to convert each value one character at
a time, writing straight into the output instead of calling
`str::to_uppercase`, to avoid allocating a `String` per row. apache#26192 did
the same for `Utf8View`. However, `str::to_uppercase` has a fast-path
for inputs with leading ASCII bytes, so inputs with a mix of ASCII and
non-ASCII characters got slower: for example, 128-byte ASCII `Utf8View`
values with one non-ASCII value in the array became 19x slower.

This PR reverts that change, but in the course of doing so, we also add
several related optimizations to `upper`, `lower`, and the optimized
string builders; details below.

Benchmarks: (x86, AMD EPYC Milan)

upper
- Some non-ASCII rows:
  - Utf8View, 4096 rows: 952.7 µs → 254.5 µs (−73.3%)
  - Utf8View, 4096 rows, 10% nulls: 881.7 µs → 270.6 µs (−69.3%)
  - Utf8View, 8192 rows: 1.94 ms → 539.7 µs (−72.2%)
  - Utf8View, 8192 rows, 10% nulls: 1.79 ms → 559.4 µs (−68.7%)
- Non-ASCII words:
  - Utf8: 825.5 µs → 726.6 µs (−12.0%)
  - LargeUtf8: 824.7 µs → 726.3 µs (−11.9%)
  - Utf8View: 759.5 µs → 727.6 µs (−4.2%)
- Mostly ASCII:
  - Utf8, len 8: 204.0 µs → 19.6 µs (−90.4%)
  - Utf8View, len 8: 214.6 µs → 36.5 µs (−83.0%)
  - Utf8, len 32: 789.6 µs → 23.2 µs (−97.1%)
  - Utf8View, len 32: 757.4 µs → 36.2 µs (−95.2%)
  - Utf8, len 128: 3.13 ms → 51.7 µs (−98.3%)
  - Utf8View, len 128: 2.89 ms → 47.5 µs (−98.4%)
- Late non-ASCII:
  - Utf8, len 8: 268.2 µs → 154.1 µs (−42.5%)
  - Utf8View, len 8: 259.4 µs → 156.5 µs (−39.7%)
  - Utf8, len 32: 881.8 µs → 136.4 µs (−84.5%)
  - Utf8View, len 32: 798.5 µs → 138.1 µs (−82.7%)
  - Utf8, len 128: 3.20 ms → 164.5 µs (−94.9%)
  - Utf8View, len 128: 2.95 ms → 163.9 µs (−94.4%)

lower
- Some non-ASCII rows:
  - Utf8View, 4096 rows: 270.3 µs → 232.8 µs (−13.9%)
  - Utf8View, 4096 rows, 10% nulls: 271.0 µs → 235.8 µs (−13.0%)
  - Utf8View, 8192 rows: 568.8 µs → 495.8 µs (−12.8%)
  - Utf8View, 8192 rows, 10% nulls: 572.5 µs → 502.4 µs (−12.3%)
- Non-ASCII words:
  - Utf8: 514.2 µs → 511.0 µs (−0.6%)
  - LargeUtf8: 507.8 µs → 516.4 µs (+1.7%)
  - Utf8View: 510.2 µs → 509.4 µs (−0.2%)
- Mostly ASCII:
  - Utf8, len 8: 67.8 µs → 18.6 µs (−72.5%)
  - Utf8View, len 8: 73.9 µs → 36.5 µs (−50.7%)
  - Utf8, len 32: 60.5 µs → 22.9 µs (−62.2%)
  - Utf8View, len 32: 68.4 µs → 36.5 µs (−46.6%)
  - Utf8, len 128: 76.7 µs → 52.1 µs (−32.1%)
  - Utf8View, len 128: 82.6 µs → 46.8 µs (−43.3%)
- Late non-ASCII:
  - Utf8, len 8: 136.9 µs → 138.8 µs (+1.4%)
  - Utf8View, len 8: 140.0 µs → 139.8 µs (−0.1%)
  - Utf8, len 32: 115.3 µs → 124.8 µs (+8.2%)
  - Utf8View, len 32: 117.4 µs → 125.5 µs (+6.9%)
  - Utf8, len 128: 138.9 µs → 150.0 µs (+8.0%)
  - Utf8View, len 128: 142.4 µs → 152.3 µs (+7.0%)

translate (ASCII scalar from/to, no deletions)
- Utf8:
  - 1024 rows, len 8: 10.1 µs → 9.1 µs (−9.8%)
  - 1024 rows, len 32: 17.9 µs → 15.9 µs (−11.2%)
  - 1024 rows, len 128: 48.8 µs → 39.2 µs (−19.6%)
  - 1024 rows, len 1024: 363.8 µs → 270.7 µs (−25.6%)
  - 4096 rows, len 8: 37.5 µs → 33.7 µs (−10.1%)
  - 4096 rows, len 32: 68.6 µs → 62.8 µs (−8.5%)
  - 4096 rows, len 128: 195.8 µs → 154.6 µs (−21.1%)
  - 4096 rows, len 1024: 1.42 ms → 1.07 ms (−24.7%)
- Utf8View:
  - 1024 rows, len 8: 9.1 µs → 8.4 µs (−8.2%)
  - 1024 rows, len 32: 14.5 µs → 13.8 µs (−4.6%)
  - 1024 rows, len 128: 36.2 µs → 35.0 µs (−3.3%)
  - 1024 rows, len 1024: 236.2 µs → 235.4 µs (−0.3%)
  - 4096 rows, len 8: 34.4 µs → 31.1 µs (−9.5%)
  - 4096 rows, len 32: 55.4 µs → 52.5 µs (−5.2%)
  - 4096 rows, len 128: 142.2 µs → 137.0 µs (−3.7%)
  - 4096 rows, len 1024: 937.7 µs → 940.8 µs (+0.3%)

replace (single ASCII byte, Utf8)
- 1024 rows, len 32: 26.2 µs → 9.0 µs (−65.6%)
- 1024 rows, len 128: 92.6 µs → 16.4 µs (−82.3%)
- 1024 rows, len 32, 20% nulls: 22.8 µs → 9.1 µs (−60.3%)
- 1024 rows, len 128, 20% nulls: 76.5 µs → 14.6 µs (−80.9%)
- 4096 rows, len 32: 103.2 µs → 31.2 µs (−69.7%)
- 4096 rows, len 128: 372.6 µs → 61.9 µs (−83.4%)
- 4096 rows, len 32, 20% nulls: 89.9 µs → 33.5 µs (−62.7%)
- 4096 rows, len 128, 20% nulls: 316.5 µs → 56.8 µs (−82.1%)

## What changes are included in this PR?

* Add `StringViewArrayBuilder::try_append_byte_map`, a fallible variant
of the existing `append_byte_map`. (We need this to avoid regressing
error handling behavior on overflow when we use this method below.)
* `lower`, `upper`, for non-ASCII input arrays: we now check if each row
is ASCII. If it is, we construct the result value directly via the
string builder's `try_append_byte_map` method, which vectorizes.
Non-ASCII rows are converted via `std::to_uppercase /
std::to_lowercase`.
* Make `GenericStringArrayBuilder::try_append_byte_map` copy the bytes
into the value buffer and then map them in place, instead of calling
Arrow's `MutableBuffer::extend` with a mapping iterator. The compiler
turns the in-place loop into vector code, while the `extend` loop stayed
scalar. This also speeds up `translate` and `replace`, which call this
method.
* Comment cleanups / improvements
* Test consolidation: remove redundant tests, move more tests to SLT,
improve test coverage
* Benchmark consolidation: move `upper` and `lower` benchmarks to the
same place, add benchmarks for `upper` and `lower` on mixed ASCII and
non-ASCII inputs, add benchmark for `translate` on `Utf8View`

## What is the testing strategy for this PR?

Existing tests pass; new tests added.

## Are there any user-facing changes?

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

Labels

catalog Related to the catalog crate common Related to common crate core Core DataFusion crate datasource Changes to the datasource crate execution Related to the execution crate ffi Changes to the ffi crate functions Changes to functions implementation logical-expr Logical plan and expressions optimizer Optimizer rules physical-expr Changes to the physical-expr crates physical-plan Changes to the physical-plan crate proto Related to proto crate spark Changes to datafusion-spark crate sql SQL Planner sqllogictest SQL Logic Tests (.slt) substrait Changes to the substrait crate v56.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants