Skip to content

perf: bypass values.value(i) for inline strings in ArrowBytesViewMap#22172

Open
RyanJamesStewart wants to merge 2 commits into
apache:mainfrom
RyanJamesStewart:perf/binary-view-map-inline-bypass
Open

perf: bypass values.value(i) for inline strings in ArrowBytesViewMap#22172
RyanJamesStewart wants to merge 2 commits into
apache:mainfrom
RyanJamesStewart:perf/binary-view-map-inline-bypass

Conversation

@RyanJamesStewart
Copy link
Copy Markdown

Which issue does this PR close?

Closes #20054.

Rationale for this change

ArrowBytesViewMap::insert_if_new_inner is the hot loop behind COUNT DISTINCT and GROUP BY over StringViewArray and BinaryViewArray columns. The new-value branch calls values.value(i) to reconstruct bytes from the views buffer, but for inline strings (len <= 12) those bytes are already packed in the local view_u128. The Arrow inline ByteView format stores [len:u32 LE][data:12 bytes zero-padded] inside the u128, so values.value(i) performs an avoidable buffer deref per first-seen distinct inline value.

Dandandan flagged the same gap in the PR #19975 review thread that spawned this issue: "We should avoid this for inlined values (and it's the same as above input_value, so now it does it twice." The fix has not landed in the five months since.

The equivalence is bit-level: for an inline input, make_view(value, 0, 0) produces a u128 byte-identical to the input view_u128 (same length in low 4 bytes, same data in high 12 bytes, zero-padded the same way). Pushing view_u128 directly into self.views produces the same stored state as the round trip through values.value(i) and append_value.

AI-assistance disclosure: this PR was developed with AI assistance. The equivalence argument, the choice to defer the non-inline K-collision case to a separate PR, and the decision to add a path-specific bench (since the existing aggregate_vectorized.rs exercises ByteViewGroupValueBuilder, not this map) are decisions I understand end-to-end and can justify in review. No unknowns are masked.

What changes are included in this PR?

  • New helper fn append_inline_view(&mut self, view: u128) -> u128 in binary_view_map.rs.
  • insert_if_new_inner new-value path branches on len <= 12: inline case extracts bytes from view_u128.to_le_bytes()[4..4 + len as usize], calls the new helper, and skips the values.value(i) plus make_view round trip. The non-inline path is unchanged.
  • New bench at datafusion/physical-expr-common/benches/binary_view_map_insert.rs exercising the patched code path on StringViewArray with all-distinct inline strings, plus a registration entry in the crate's Cargo.toml.

The non-inline K-collision case (where values.value(i) is called K+1 times when there are K hash and prefix collisions) is a separate concern and is deferred to a future PR if it proves worth pursuing.

Are these changes tested?

cargo test -p datafusion-physical-expr-common --lib binary_view_map: 8 of 8 existing tests pass. The existing suite covers inline, non-inline, binary, and non-UTF-8 paths; any byte-order or off-by-one error in the inline view extraction would surface as a wrong hash bucket or a wrong lookup result.

cargo clippy -p datafusion-physical-expr-common --all-targets -- -D warnings: clean.

The new bench measures ArrowBytesViewSet_insert_if_new on all-distinct StringViewArray inputs at len=8 (worst case: every row hits the new-value branch). Results on a Ryzen 9 9950X:

n baseline patched delta
1,000 11.73 µs 10.53 µs -8.9%
10,000 150.6 µs 135.4 µs -10.1%
100,000 1697.6 µs 1620.1 µs -4.6%

Criterion reports "Performance has improved" at all three sizes with p = 0.00. The delta narrows at 100K because the hash map itself starts dominating when all values are distinct; production workloads with repeated values benefit proportionally to the first-seen-distinct count.

Are there any user-facing changes?

No public API changes. append_inline_view is private to the crate; insert_if_new_inner keeps its signature. The api change label is not required.

For inline strings (len <= 12), insert_if_new_inner called values.value(i)
in the new-value branch even though the same bytes are already packed in
view_u128 (the ByteView inline format is [len:u32 LE][data:12 bytes
zero-padded]). Add append_inline_view helper and branch on len <= 12 to
push view_u128 directly, skipping the views-buffer round-trip.

The stored view is byte-identical to make_view(value, 0, 0) for inline
inputs; the existing test suite confirms correctness.

Closes apache#20054
@github-actions github-actions Bot added the physical-expr Changes to the physical-expr crates label May 14, 2026
@alamb alamb added the performance Make DataFusion faster label May 14, 2026
Copy link
Copy Markdown
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you @RyanJamesStewart -- this looks like a nice find and the code looks good to me. I had a few suggestions. Let me know what you think

The unsafe bit I think we need to do before merging this in. I also think the benchmark is probably not worth checking in

@@ -0,0 +1,91 @@
// Licensed to the Apache Software Foundation (ASF) under one
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.

While this benchmark is cool, I am not sure we need to commit it to the repo as I think its utility will be low after this PR has been merged (I think it is unlikely to get run regularly)

/// ByteView (length field in the low 32 bits is <= 12).
///
/// Returns the view that was stored (identical to the argument).
fn append_inline_view(&mut self, view: u128) -> u128 {
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.

Given this assumption I think this function should be marked as unsafe (I think it is correct, but the compiler can't verify it)

Suggested change
fn append_inline_view(&mut self, view: u128) -> u128 {
unsafe fn append_inline_view(&mut self, view: u128) -> u128 {

Then this will force us to annotate the callsite with unsafe as well where it can be more easily verified that the input was a valid inline view so this function is safe

@alamb
Copy link
Copy Markdown
Contributor

alamb commented May 14, 2026

FYI @Dandandan

@alamb
Copy link
Copy Markdown
Contributor

alamb commented May 14, 2026

run benchmarks

@adriangbot
Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4453991269-105-h75vk 6.12.68+ #1 SMP Wed Apr 1 02:23:28 UTC 2026 aarch64 GNU/Linux

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

Comparing perf/binary-view-map-inline-bypass (1364643) to 18a219c (merge-base) diff using: tpcds
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-c4453991269-104-fn27b 6.12.68+ #1 SMP Wed Apr 1 02:23:28 UTC 2026 aarch64 GNU/Linux

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

Comparing perf/binary-view-map-inline-bypass (1364643) to 18a219c (merge-base) diff using: clickbench_partitioned
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-c4453991269-106-6fmpv 6.12.68+ #1 SMP Wed Apr 1 02:23:28 UTC 2026 aarch64 GNU/Linux

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

Comparing perf/binary-view-map-inline-bypass (1364643) to 18a219c (merge-base) diff using: 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)

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 perf_binary-view-map-inline-bypass
--------------------
Benchmark tpch_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                           HEAD ┃ perf_binary-view-map-inline-bypass ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1  │ 38.27 / 39.31 ±1.18 / 41.37 ms │     38.19 / 39.05 ±1.11 / 41.06 ms │     no change │
│ QQuery 2  │ 20.40 / 20.54 ±0.13 / 20.76 ms │     20.68 / 21.21 ±0.44 / 21.92 ms │     no change │
│ QQuery 3  │ 34.98 / 37.17 ±1.14 / 38.18 ms │     34.32 / 36.82 ±1.27 / 37.86 ms │     no change │
│ QQuery 4  │ 16.95 / 17.38 ±0.59 / 18.54 ms │     16.97 / 17.18 ±0.14 / 17.40 ms │     no change │
│ QQuery 5  │ 45.62 / 48.21 ±1.47 / 49.65 ms │     42.08 / 45.84 ±2.62 / 49.78 ms │     no change │
│ QQuery 6  │ 16.17 / 16.55 ±0.55 / 17.63 ms │     16.06 / 16.56 ±0.48 / 17.44 ms │     no change │
│ QQuery 7  │ 49.53 / 51.17 ±2.17 / 55.27 ms │     48.25 / 49.66 ±1.10 / 51.64 ms │     no change │
│ QQuery 8  │ 44.62 / 44.96 ±0.21 / 45.22 ms │     44.79 / 45.94 ±0.93 / 47.46 ms │     no change │
│ QQuery 9  │ 49.88 / 51.50 ±1.56 / 53.96 ms │     50.55 / 51.39 ±0.77 / 52.41 ms │     no change │
│ QQuery 10 │ 63.45 / 65.43 ±1.19 / 66.92 ms │     63.70 / 64.96 ±1.52 / 67.37 ms │     no change │
│ QQuery 11 │ 13.51 / 14.40 ±0.70 / 15.38 ms │     13.61 / 13.81 ±0.19 / 14.10 ms │     no change │
│ QQuery 12 │ 24.75 / 25.26 ±0.73 / 26.71 ms │     24.45 / 24.90 ±0.25 / 25.22 ms │     no change │
│ QQuery 13 │ 35.16 / 35.77 ±0.48 / 36.34 ms │     34.66 / 35.86 ±0.66 / 36.53 ms │     no change │
│ QQuery 14 │ 25.27 / 25.56 ±0.21 / 25.92 ms │     25.18 / 25.65 ±0.67 / 26.97 ms │     no change │
│ QQuery 15 │ 30.58 / 31.45 ±1.33 / 34.11 ms │     30.66 / 31.06 ±0.47 / 31.93 ms │     no change │
│ QQuery 16 │ 15.44 / 15.66 ±0.19 / 15.98 ms │     15.79 / 16.00 ±0.17 / 16.25 ms │     no change │
│ QQuery 17 │ 78.63 / 82.23 ±3.96 / 89.86 ms │     74.57 / 77.79 ±3.77 / 83.46 ms │ +1.06x faster │
│ QQuery 18 │ 71.26 / 72.41 ±0.69 / 73.27 ms │     68.80 / 69.69 ±0.72 / 70.98 ms │     no change │
│ QQuery 19 │ 35.85 / 36.54 ±0.79 / 37.89 ms │     35.20 / 35.34 ±0.12 / 35.57 ms │     no change │
│ QQuery 20 │ 39.28 / 39.37 ±0.08 / 39.49 ms │     38.52 / 39.63 ±0.57 / 40.12 ms │     no change │
│ QQuery 21 │ 61.34 / 62.94 ±1.39 / 65.25 ms │     57.13 / 58.16 ±1.01 / 59.81 ms │ +1.08x faster │
│ QQuery 22 │ 23.68 / 24.33 ±0.38 / 24.72 ms │     23.39 / 24.05 ±0.74 / 25.32 ms │     no change │
└───────────┴────────────────────────────────┴────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┓
┃ Benchmark Summary                                 ┃          ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━┩
│ Total Time (HEAD)                                 │ 858.11ms │
│ Total Time (perf_binary-view-map-inline-bypass)   │ 840.54ms │
│ Average Time (HEAD)                               │  39.01ms │
│ Average Time (perf_binary-view-map-inline-bypass) │  38.21ms │
│ Queries Faster                                    │        2 │
│ Queries Slower                                    │        0 │
│ Queries with No Change                            │       20 │
│ Queries with Failure                              │        0 │
└───────────────────────────────────────────────────┴──────────┘

Resource Usage

tpch — base (merge-base)

Metric Value
Wall time 5.0s
Peak memory 5.5 GiB
Avg memory 5.0 GiB
CPU user 31.8s
CPU sys 1.9s
Peak spill 0 B

tpch — branch

Metric Value
Wall time 5.0s
Peak memory 5.5 GiB
Avg memory 5.0 GiB
CPU user 31.3s
CPU sys 1.8s
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 perf_binary-view-map-inline-bypass
--------------------
Benchmark tpcds_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┓
┃ Query     ┃                                  HEAD ┃    perf_binary-view-map-inline-bypass ┃       Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━┩
│ QQuery 1  │           6.43 / 7.18 ±0.89 / 8.82 ms │           6.43 / 6.90 ±0.87 / 8.65 ms │    no change │
│ QQuery 2  │        82.04 / 82.39 ±0.20 / 82.67 ms │        82.33 / 82.57 ±0.27 / 82.94 ms │    no change │
│ QQuery 3  │        29.20 / 29.44 ±0.24 / 29.81 ms │        28.87 / 29.23 ±0.21 / 29.46 ms │    no change │
│ QQuery 4  │     532.84 / 536.24 ±3.80 / 543.44 ms │     524.40 / 531.46 ±5.64 / 538.58 ms │    no change │
│ QQuery 5  │        52.93 / 53.29 ±0.29 / 53.67 ms │        52.82 / 53.36 ±0.38 / 53.97 ms │    no change │
│ QQuery 6  │        36.11 / 36.55 ±0.25 / 36.85 ms │        35.59 / 35.93 ±0.34 / 36.51 ms │    no change │
│ QQuery 7  │     111.33 / 113.24 ±1.81 / 116.49 ms │     111.03 / 113.57 ±3.28 / 119.99 ms │    no change │
│ QQuery 8  │        39.48 / 39.93 ±0.23 / 40.11 ms │        40.06 / 40.35 ±0.27 / 40.71 ms │    no change │
│ QQuery 9  │        53.47 / 56.22 ±1.80 / 58.48 ms │        54.64 / 56.53 ±1.24 / 58.56 ms │    no change │
│ QQuery 10 │        81.15 / 82.17 ±1.21 / 84.40 ms │        82.42 / 83.73 ±1.50 / 86.46 ms │    no change │
│ QQuery 11 │     325.31 / 329.38 ±4.24 / 337.07 ms │     328.19 / 331.92 ±3.88 / 339.10 ms │    no change │
│ QQuery 12 │        29.31 / 29.58 ±0.22 / 29.96 ms │        29.07 / 29.53 ±0.30 / 29.85 ms │    no change │
│ QQuery 13 │     129.31 / 129.95 ±0.47 / 130.76 ms │     129.93 / 130.24 ±0.17 / 130.43 ms │    no change │
│ QQuery 14 │     519.35 / 521.56 ±1.97 / 525.24 ms │     518.44 / 519.17 ±0.46 / 519.88 ms │    no change │
│ QQuery 15 │        62.89 / 64.51 ±1.83 / 68.08 ms │        62.52 / 62.94 ±0.39 / 63.53 ms │    no change │
│ QQuery 16 │           7.17 / 7.29 ±0.20 / 7.68 ms │           6.99 / 7.15 ±0.21 / 7.57 ms │    no change │
│ QQuery 17 │        84.88 / 85.45 ±0.36 / 85.92 ms │        84.01 / 85.35 ±1.63 / 88.44 ms │    no change │
│ QQuery 18 │     155.74 / 156.34 ±0.67 / 157.55 ms │     156.53 / 157.30 ±0.53 / 157.98 ms │    no change │
│ QQuery 19 │        41.49 / 41.75 ±0.24 / 42.08 ms │        41.84 / 42.07 ±0.24 / 42.52 ms │    no change │
│ QQuery 20 │        35.65 / 36.01 ±0.34 / 36.62 ms │        35.96 / 36.26 ±0.34 / 36.88 ms │    no change │
│ QQuery 21 │        18.10 / 18.34 ±0.16 / 18.55 ms │        18.19 / 18.45 ±0.33 / 19.09 ms │    no change │
│ QQuery 22 │        62.33 / 63.19 ±0.76 / 64.23 ms │        62.50 / 62.85 ±0.36 / 63.46 ms │    no change │
│ QQuery 23 │     484.33 / 486.13 ±2.07 / 489.09 ms │     485.58 / 487.16 ±1.24 / 489.33 ms │    no change │
│ QQuery 24 │     245.74 / 246.27 ±0.48 / 247.08 ms │     242.97 / 247.33 ±5.12 / 256.51 ms │    no change │
│ QQuery 25 │     117.66 / 119.20 ±1.36 / 121.07 ms │     117.48 / 119.95 ±1.73 / 122.74 ms │    no change │
│ QQuery 26 │        71.49 / 72.04 ±0.58 / 73.10 ms │        71.38 / 72.78 ±0.83 / 73.73 ms │    no change │
│ QQuery 27 │           7.29 / 7.49 ±0.19 / 7.85 ms │           7.23 / 7.35 ±0.22 / 7.78 ms │    no change │
│ QQuery 28 │        58.78 / 62.65 ±2.41 / 66.27 ms │        58.09 / 62.29 ±2.13 / 64.08 ms │    no change │
│ QQuery 29 │     102.22 / 103.17 ±0.77 / 104.10 ms │     101.73 / 102.63 ±0.54 / 103.34 ms │    no change │
│ QQuery 30 │        30.34 / 30.81 ±0.30 / 31.10 ms │        30.53 / 31.05 ±0.27 / 31.30 ms │    no change │
│ QQuery 31 │     113.35 / 114.05 ±0.38 / 114.39 ms │     112.60 / 113.34 ±0.59 / 114.19 ms │    no change │
│ QQuery 32 │        20.90 / 21.05 ±0.11 / 21.21 ms │        20.61 / 20.95 ±0.36 / 21.64 ms │    no change │
│ QQuery 33 │        40.63 / 41.25 ±0.75 / 42.69 ms │        39.57 / 40.30 ±0.63 / 41.42 ms │    no change │
│ QQuery 34 │         9.88 / 10.58 ±0.48 / 11.28 ms │         9.99 / 10.19 ±0.20 / 10.56 ms │    no change │
│ QQuery 35 │        81.35 / 82.66 ±1.07 / 84.52 ms │        81.67 / 82.55 ±0.85 / 83.94 ms │    no change │
│ QQuery 36 │           6.54 / 6.73 ±0.19 / 7.04 ms │           6.59 / 6.72 ±0.17 / 7.04 ms │    no change │
│ QQuery 37 │           7.25 / 7.31 ±0.08 / 7.46 ms │           7.30 / 7.47 ±0.15 / 7.67 ms │    no change │
│ QQuery 38 │        68.74 / 69.31 ±0.34 / 69.66 ms │        68.87 / 69.37 ±0.51 / 70.20 ms │    no change │
│ QQuery 39 │     101.62 / 102.51 ±1.04 / 104.39 ms │     100.60 / 101.21 ±0.47 / 101.92 ms │    no change │
│ QQuery 40 │        23.81 / 24.28 ±0.34 / 24.77 ms │        24.05 / 24.28 ±0.19 / 24.56 ms │    no change │
│ QQuery 41 │        14.35 / 14.49 ±0.17 / 14.79 ms │        14.31 / 14.54 ±0.18 / 14.84 ms │    no change │
│ QQuery 42 │        24.42 / 24.59 ±0.12 / 24.78 ms │        24.30 / 24.75 ±0.29 / 25.10 ms │    no change │
│ QQuery 43 │           5.31 / 5.45 ±0.13 / 5.70 ms │           5.62 / 5.73 ±0.10 / 5.93 ms │ 1.05x slower │
│ QQuery 44 │        11.15 / 11.38 ±0.26 / 11.88 ms │        11.39 / 11.62 ±0.12 / 11.74 ms │    no change │
│ QQuery 45 │        41.28 / 42.29 ±0.69 / 43.41 ms │        41.71 / 42.01 ±0.22 / 42.27 ms │    no change │
│ QQuery 46 │        13.64 / 13.73 ±0.08 / 13.85 ms │        13.86 / 14.02 ±0.17 / 14.34 ms │    no change │
│ QQuery 47 │     235.75 / 237.76 ±1.60 / 240.32 ms │     232.83 / 234.91 ±1.67 / 237.33 ms │    no change │
│ QQuery 48 │     104.59 / 105.18 ±0.45 / 105.70 ms │     105.14 / 106.15 ±0.70 / 107.01 ms │    no change │
│ QQuery 49 │        82.24 / 83.31 ±0.61 / 83.92 ms │        82.58 / 83.68 ±0.92 / 85.25 ms │    no change │
│ QQuery 50 │        62.28 / 63.09 ±0.61 / 63.63 ms │        62.95 / 65.16 ±1.75 / 67.81 ms │    no change │
│ QQuery 51 │        93.19 / 95.49 ±1.54 / 97.89 ms │        94.27 / 95.69 ±0.88 / 96.91 ms │    no change │
│ QQuery 52 │        24.38 / 24.93 ±0.33 / 25.26 ms │        24.51 / 24.87 ±0.39 / 25.48 ms │    no change │
│ QQuery 53 │        30.65 / 30.76 ±0.11 / 30.96 ms │        30.69 / 30.77 ±0.09 / 30.93 ms │    no change │
│ QQuery 54 │        54.41 / 54.93 ±0.40 / 55.63 ms │        54.70 / 56.30 ±1.62 / 59.28 ms │    no change │
│ QQuery 55 │        23.77 / 24.13 ±0.28 / 24.59 ms │        23.94 / 24.19 ±0.23 / 24.58 ms │    no change │
│ QQuery 56 │        40.01 / 40.45 ±0.61 / 41.65 ms │        39.99 / 40.29 ±0.32 / 40.92 ms │    no change │
│ QQuery 57 │     179.32 / 180.91 ±1.13 / 182.70 ms │     178.91 / 179.69 ±0.49 / 180.43 ms │    no change │
│ QQuery 58 │     119.30 / 120.05 ±0.78 / 121.54 ms │     117.69 / 118.44 ±0.52 / 119.17 ms │    no change │
│ QQuery 59 │     119.17 / 119.64 ±0.34 / 120.11 ms │     119.23 / 120.00 ±0.55 / 120.88 ms │    no change │
│ QQuery 60 │        40.13 / 40.48 ±0.31 / 40.94 ms │        40.38 / 41.39 ±1.14 / 43.47 ms │    no change │
│ QQuery 61 │        14.18 / 14.50 ±0.35 / 15.18 ms │        14.03 / 14.17 ±0.16 / 14.48 ms │    no change │
│ QQuery 62 │        47.85 / 48.16 ±0.24 / 48.50 ms │        47.92 / 48.71 ±0.91 / 50.43 ms │    no change │
│ QQuery 63 │        30.71 / 30.99 ±0.16 / 31.17 ms │        30.95 / 31.32 ±0.19 / 31.50 ms │    no change │
│ QQuery 64 │     477.78 / 480.90 ±3.94 / 488.59 ms │     475.01 / 481.72 ±4.37 / 486.55 ms │    no change │
│ QQuery 65 │     143.82 / 147.20 ±2.81 / 151.58 ms │     146.34 / 150.86 ±3.30 / 156.27 ms │    no change │
│ QQuery 66 │        84.84 / 86.39 ±2.11 / 90.52 ms │        84.21 / 86.22 ±2.52 / 91.19 ms │    no change │
│ QQuery 67 │     245.95 / 253.95 ±6.28 / 263.43 ms │     251.09 / 255.63 ±4.52 / 263.65 ms │    no change │
│ QQuery 68 │        13.71 / 13.90 ±0.23 / 14.35 ms │        13.97 / 14.16 ±0.13 / 14.31 ms │    no change │
│ QQuery 69 │        76.47 / 76.87 ±0.28 / 77.28 ms │        78.39 / 78.66 ±0.23 / 79.08 ms │    no change │
│ QQuery 70 │     105.19 / 109.06 ±1.99 / 110.84 ms │     106.67 / 109.89 ±3.16 / 115.71 ms │    no change │
│ QQuery 71 │        36.02 / 36.36 ±0.26 / 36.82 ms │        36.10 / 36.44 ±0.27 / 36.87 ms │    no change │
│ QQuery 72 │ 2224.40 / 2266.49 ±33.90 / 2307.52 ms │ 2244.62 / 2305.70 ±48.74 / 2371.92 ms │    no change │
│ QQuery 73 │          9.61 / 9.82 ±0.22 / 10.22 ms │         9.85 / 10.03 ±0.15 / 10.28 ms │    no change │
│ QQuery 74 │     183.56 / 184.34 ±0.49 / 184.84 ms │     183.07 / 186.48 ±2.51 / 190.86 ms │    no change │
│ QQuery 75 │     151.09 / 153.93 ±2.54 / 157.78 ms │     150.04 / 150.91 ±0.48 / 151.30 ms │    no change │
│ QQuery 76 │        35.87 / 36.30 ±0.40 / 36.99 ms │        36.26 / 37.76 ±2.09 / 41.90 ms │    no change │
│ QQuery 77 │        62.34 / 63.94 ±1.42 / 66.59 ms │        62.54 / 63.91 ±1.80 / 67.42 ms │    no change │
│ QQuery 78 │     195.36 / 198.04 ±2.06 / 201.72 ms │     194.36 / 197.73 ±2.56 / 200.98 ms │    no change │
│ QQuery 79 │        67.18 / 67.92 ±0.49 / 68.68 ms │        68.07 / 68.29 ±0.13 / 68.43 ms │    no change │
│ QQuery 80 │     104.73 / 106.77 ±1.62 / 108.90 ms │     105.89 / 107.12 ±1.14 / 108.85 ms │    no change │
│ QQuery 81 │        24.87 / 25.16 ±0.25 / 25.57 ms │        25.14 / 25.22 ±0.05 / 25.30 ms │    no change │
│ QQuery 82 │        17.00 / 17.44 ±0.47 / 18.26 ms │        17.30 / 17.51 ±0.28 / 18.06 ms │    no change │
│ QQuery 83 │        38.10 / 38.41 ±0.20 / 38.70 ms │        38.09 / 38.56 ±0.36 / 39.07 ms │    no change │
│ QQuery 84 │        43.33 / 43.83 ±0.36 / 44.18 ms │        43.94 / 44.14 ±0.14 / 44.29 ms │    no change │
│ QQuery 85 │     137.12 / 137.85 ±0.83 / 139.46 ms │     138.49 / 140.03 ±1.31 / 141.83 ms │    no change │
│ QQuery 86 │        25.59 / 25.80 ±0.18 / 26.02 ms │        25.64 / 26.05 ±0.27 / 26.43 ms │    no change │
│ QQuery 87 │        69.29 / 69.98 ±0.70 / 71.31 ms │        70.19 / 70.48 ±0.21 / 70.74 ms │    no change │
│ QQuery 88 │        65.35 / 65.90 ±0.38 / 66.51 ms │        65.66 / 66.51 ±0.77 / 67.91 ms │    no change │
│ QQuery 89 │        36.72 / 37.32 ±0.70 / 38.66 ms │        36.65 / 36.89 ±0.15 / 37.12 ms │    no change │
│ QQuery 90 │        17.54 / 17.81 ±0.20 / 18.08 ms │        17.63 / 17.75 ±0.10 / 17.86 ms │    no change │
│ QQuery 91 │        52.43 / 52.91 ±0.39 / 53.35 ms │        52.45 / 52.88 ±0.40 / 53.59 ms │    no change │
│ QQuery 92 │        29.92 / 30.17 ±0.32 / 30.79 ms │        29.75 / 30.35 ±0.52 / 31.24 ms │    no change │
│ QQuery 93 │        54.19 / 55.33 ±0.97 / 56.81 ms │        54.40 / 55.28 ±0.63 / 56.36 ms │    no change │
│ QQuery 94 │        37.83 / 38.75 ±0.76 / 40.12 ms │        38.01 / 38.53 ±0.38 / 38.96 ms │    no change │
│ QQuery 95 │        89.06 / 90.68 ±1.50 / 93.39 ms │        90.30 / 90.67 ±0.33 / 91.23 ms │    no change │
│ QQuery 96 │        24.46 / 24.69 ±0.18 / 24.92 ms │        24.50 / 24.71 ±0.22 / 25.14 ms │    no change │
│ QQuery 97 │        46.59 / 47.15 ±0.43 / 47.80 ms │        46.62 / 47.10 ±0.55 / 48.14 ms │    no change │
│ QQuery 98 │        42.39 / 43.38 ±0.67 / 44.25 ms │        43.30 / 43.57 ±0.18 / 43.82 ms │    no change │
│ QQuery 99 │        71.68 / 72.23 ±0.35 / 72.67 ms │        71.59 / 72.02 ±0.24 / 72.27 ms │    no change │
└───────────┴───────────────────────────────────────┴───────────────────────────────────────┴──────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                                 ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                                 │ 10781.14ms │
│ Total Time (perf_binary-view-map-inline-bypass)   │ 10831.96ms │
│ Average Time (HEAD)                               │   108.90ms │
│ Average Time (perf_binary-view-map-inline-bypass) │   109.41ms │
│ Queries Faster                                    │          0 │
│ Queries Slower                                    │          1 │
│ Queries with No Change                            │         98 │
│ Queries with Failure                              │          0 │
└───────────────────────────────────────────────────┴────────────┘

Resource Usage

tpcds — base (merge-base)

Metric Value
Wall time 55.0s
Peak memory 6.6 GiB
Avg memory 6.0 GiB
CPU user 247.1s
CPU sys 6.3s
Peak spill 0 B

tpcds — branch

Metric Value
Wall time 55.0s
Peak memory 6.7 GiB
Avg memory 6.0 GiB
CPU user 249.4s
CPU sys 6.3s
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 perf_binary-view-map-inline-bypass
--------------------
Benchmark clickbench_partitioned.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                  HEAD ┃    perf_binary-view-map-inline-bypass ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 0  │          1.21 / 4.54 ±6.61 / 17.76 ms │          1.22 / 4.58 ±6.66 / 17.89 ms │     no change │
│ QQuery 1  │        12.51 / 12.66 ±0.18 / 13.02 ms │        12.67 / 12.74 ±0.06 / 12.85 ms │     no change │
│ QQuery 2  │        35.12 / 35.69 ±0.51 / 36.50 ms │        35.20 / 35.41 ±0.19 / 35.71 ms │     no change │
│ QQuery 3  │        30.72 / 31.19 ±0.65 / 32.46 ms │        30.64 / 30.84 ±0.11 / 30.97 ms │     no change │
│ QQuery 4  │     226.22 / 233.31 ±6.51 / 243.59 ms │     227.15 / 232.17 ±3.60 / 237.80 ms │     no change │
│ QQuery 5  │     275.41 / 277.22 ±1.70 / 280.11 ms │     274.05 / 275.30 ±1.51 / 278.06 ms │     no change │
│ QQuery 6  │           6.76 / 7.49 ±0.38 / 7.88 ms │           6.55 / 7.26 ±0.58 / 8.14 ms │     no change │
│ QQuery 7  │        13.37 / 13.53 ±0.09 / 13.63 ms │        13.40 / 13.59 ±0.12 / 13.77 ms │     no change │
│ QQuery 8  │     311.36 / 317.82 ±4.32 / 324.55 ms │     312.10 / 315.05 ±2.05 / 317.63 ms │     no change │
│ QQuery 9  │    428.67 / 447.16 ±10.90 / 462.58 ms │     435.22 / 444.52 ±5.16 / 448.92 ms │     no change │
│ QQuery 10 │        67.86 / 69.08 ±0.92 / 70.22 ms │        70.02 / 73.65 ±5.19 / 83.66 ms │  1.07x slower │
│ QQuery 11 │        78.26 / 79.96 ±1.78 / 83.38 ms │        80.70 / 81.69 ±0.73 / 82.73 ms │     no change │
│ QQuery 12 │     268.33 / 273.33 ±5.10 / 282.45 ms │     267.56 / 272.79 ±4.04 / 279.39 ms │     no change │
│ QQuery 13 │     376.79 / 383.35 ±5.05 / 389.23 ms │     376.74 / 382.83 ±4.27 / 389.45 ms │     no change │
│ QQuery 14 │     276.50 / 279.56 ±2.85 / 284.49 ms │     279.15 / 282.42 ±3.04 / 287.34 ms │     no change │
│ QQuery 15 │     275.15 / 279.50 ±2.69 / 283.55 ms │     277.86 / 280.67 ±2.33 / 283.64 ms │     no change │
│ QQuery 16 │     595.18 / 601.69 ±6.10 / 609.53 ms │     600.18 / 608.20 ±7.95 / 623.29 ms │     no change │
│ QQuery 17 │    593.05 / 607.65 ±12.52 / 624.51 ms │     598.59 / 608.60 ±7.31 / 618.34 ms │     no change │
│ QQuery 18 │  1192.34 / 1200.96 ±9.40 / 1218.04 ms │ 1183.13 / 1208.72 ±13.67 / 1221.22 ms │     no change │
│ QQuery 19 │        27.80 / 29.87 ±2.31 / 34.21 ms │       28.07 / 36.93 ±14.06 / 64.82 ms │  1.24x slower │
│ QQuery 20 │     516.73 / 524.71 ±8.99 / 542.08 ms │     520.05 / 524.28 ±3.59 / 530.11 ms │     no change │
│ QQuery 21 │     590.42 / 600.53 ±7.82 / 612.85 ms │     596.46 / 599.65 ±4.00 / 607.32 ms │     no change │
│ QQuery 22 │  1057.15 / 1067.32 ±9.50 / 1085.37 ms │  1058.63 / 1063.28 ±3.72 / 1067.32 ms │     no change │
│ QQuery 23 │ 3146.82 / 3165.37 ±28.75 / 3222.31 ms │ 3176.76 / 3198.47 ±15.16 / 3223.76 ms │     no change │
│ QQuery 24 │        41.42 / 44.20 ±5.07 / 54.34 ms │        41.65 / 44.09 ±3.37 / 50.67 ms │     no change │
│ QQuery 25 │     110.84 / 112.29 ±1.11 / 114.17 ms │    111.62 / 118.83 ±12.64 / 144.08 ms │  1.06x slower │
│ QQuery 26 │        42.00 / 43.00 ±1.07 / 45.04 ms │        42.18 / 45.27 ±3.63 / 52.09 ms │  1.05x slower │
│ QQuery 27 │     668.85 / 673.32 ±4.00 / 679.47 ms │     665.11 / 676.66 ±9.30 / 688.14 ms │     no change │
│ QQuery 28 │ 2983.34 / 2999.21 ±16.73 / 3029.49 ms │ 2974.33 / 2996.18 ±12.89 / 3010.94 ms │     no change │
│ QQuery 29 │        41.06 / 44.21 ±3.87 / 50.84 ms │       41.17 / 50.46 ±11.11 / 66.72 ms │  1.14x slower │
│ QQuery 30 │     297.74 / 301.25 ±2.43 / 305.10 ms │     295.20 / 302.45 ±5.52 / 309.82 ms │     no change │
│ QQuery 31 │     287.77 / 295.56 ±7.07 / 307.70 ms │     288.66 / 292.67 ±2.36 / 295.89 ms │     no change │
│ QQuery 32 │     905.83 / 918.45 ±9.18 / 933.37 ms │    901.75 / 914.97 ±12.18 / 935.14 ms │     no change │
│ QQuery 33 │ 1413.53 / 1432.15 ±10.72 / 1443.36 ms │ 1405.24 / 1424.86 ±13.38 / 1443.86 ms │     no change │
│ QQuery 34 │ 1434.43 / 1464.61 ±30.36 / 1522.38 ms │  1421.53 / 1430.95 ±6.11 / 1440.63 ms │     no change │
│ QQuery 35 │    280.24 / 298.82 ±19.37 / 332.28 ms │    276.55 / 291.89 ±12.95 / 313.71 ms │     no change │
│ QQuery 36 │        62.62 / 68.10 ±3.41 / 72.65 ms │        61.97 / 67.34 ±3.19 / 70.88 ms │     no change │
│ QQuery 37 │        35.40 / 39.04 ±6.47 / 51.97 ms │        34.61 / 38.16 ±3.79 / 45.24 ms │     no change │
│ QQuery 38 │        39.85 / 44.61 ±3.57 / 49.45 ms │        42.98 / 46.89 ±4.52 / 55.38 ms │  1.05x slower │
│ QQuery 39 │     125.36 / 133.13 ±5.62 / 138.48 ms │     126.58 / 132.76 ±6.63 / 145.47 ms │     no change │
│ QQuery 40 │        13.62 / 13.77 ±0.20 / 14.13 ms │        13.96 / 14.89 ±1.48 / 17.83 ms │  1.08x slower │
│ QQuery 41 │        13.27 / 15.13 ±3.32 / 21.77 ms │        13.38 / 13.84 ±0.52 / 14.81 ms │ +1.09x faster │
│ QQuery 42 │        13.07 / 14.70 ±3.04 / 20.78 ms │        12.77 / 14.89 ±3.69 / 22.27 ms │     no change │
└───────────┴───────────────────────────────────────┴───────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                                 ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                                 │ 19499.03ms │
│ Total Time (perf_binary-view-map-inline-bypass)   │ 19511.72ms │
│ Average Time (HEAD)                               │   453.47ms │
│ Average Time (perf_binary-view-map-inline-bypass) │   453.76ms │
│ Queries Faster                                    │          1 │
│ Queries Slower                                    │          7 │
│ Queries with No Change                            │         35 │
│ Queries with Failure                              │          0 │
└───────────────────────────────────────────────────┴────────────┘

Resource Usage

clickbench_partitioned — base (merge-base)

Metric Value
Wall time 100.0s
Peak memory 30.6 GiB
Avg memory 23.0 GiB
CPU user 1024.2s
CPU sys 64.5s
Peak spill 0 B

clickbench_partitioned — branch

Metric Value
Wall time 100.0s
Peak memory 29.7 GiB
Avg memory 22.9 GiB
CPU user 1025.9s
CPU sys 64.4s
Peak spill 0 B

File an issue against this benchmark runner

@alamb
Copy link
Copy Markdown
Contributor

alamb commented May 14, 2026

run benchmark clickbench_partitioned

@alamb
Copy link
Copy Markdown
Contributor

alamb commented May 14, 2026

(I am trying to see if the last run was noise)

@adriangbot
Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4454535344-108-f4fng 6.12.68+ #1 SMP Wed Apr 1 02:23:28 UTC 2026 aarch64 GNU/Linux

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

Comparing perf/binary-view-map-inline-bypass (1364643) to 18a219c (merge-base) diff using: clickbench_partitioned
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)

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 perf_binary-view-map-inline-bypass
--------------------
Benchmark clickbench_partitioned.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                  HEAD ┃    perf_binary-view-map-inline-bypass ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 0  │          1.20 / 4.70 ±6.85 / 18.39 ms │          1.22 / 4.67 ±6.81 / 18.29 ms │     no change │
│ QQuery 1  │        12.68 / 12.86 ±0.12 / 13.00 ms │        12.82 / 13.08 ±0.22 / 13.46 ms │     no change │
│ QQuery 2  │        35.80 / 36.36 ±0.46 / 37.18 ms │        35.45 / 35.90 ±0.40 / 36.64 ms │     no change │
│ QQuery 3  │        31.42 / 32.07 ±0.55 / 33.08 ms │        31.44 / 32.42 ±0.90 / 33.95 ms │     no change │
│ QQuery 4  │     236.22 / 243.19 ±4.08 / 248.68 ms │     235.46 / 239.66 ±2.23 / 241.30 ms │     no change │
│ QQuery 5  │     287.36 / 288.95 ±2.41 / 293.71 ms │     279.62 / 283.44 ±4.41 / 291.78 ms │     no change │
│ QQuery 6  │           6.41 / 7.41 ±0.59 / 7.96 ms │           5.96 / 6.90 ±0.61 / 7.79 ms │ +1.08x faster │
│ QQuery 7  │        14.06 / 14.22 ±0.10 / 14.37 ms │        13.79 / 15.71 ±3.50 / 22.70 ms │  1.10x slower │
│ QQuery 8  │     320.99 / 323.09 ±1.79 / 326.36 ms │     320.63 / 323.46 ±2.26 / 326.96 ms │     no change │
│ QQuery 9  │     459.62 / 466.85 ±6.91 / 479.98 ms │     461.58 / 466.24 ±5.18 / 474.73 ms │     no change │
│ QQuery 10 │        69.50 / 70.11 ±0.54 / 71.09 ms │        70.31 / 71.21 ±0.79 / 72.64 ms │     no change │
│ QQuery 11 │        79.64 / 80.67 ±0.67 / 81.34 ms │        81.91 / 82.49 ±0.55 / 83.54 ms │     no change │
│ QQuery 12 │     274.33 / 280.92 ±4.71 / 285.28 ms │     277.33 / 284.95 ±7.39 / 297.65 ms │     no change │
│ QQuery 13 │     386.74 / 392.53 ±4.19 / 399.77 ms │    385.19 / 401.17 ±13.21 / 423.85 ms │     no change │
│ QQuery 14 │     282.37 / 288.07 ±5.31 / 297.42 ms │     280.14 / 284.57 ±3.09 / 289.25 ms │     no change │
│ QQuery 15 │     278.64 / 284.85 ±4.44 / 292.22 ms │     283.77 / 286.69 ±1.79 / 289.26 ms │     no change │
│ QQuery 16 │     603.53 / 611.47 ±5.27 / 617.90 ms │     610.33 / 614.36 ±2.02 / 615.58 ms │     no change │
│ QQuery 17 │     602.50 / 614.26 ±7.09 / 622.37 ms │     609.08 / 618.30 ±6.99 / 626.74 ms │     no change │
│ QQuery 18 │ 1209.09 / 1225.32 ±12.60 / 1240.40 ms │ 1227.81 / 1240.94 ±12.37 / 1263.73 ms │     no change │
│ QQuery 19 │        28.35 / 32.70 ±5.64 / 43.33 ms │        28.70 / 33.84 ±5.79 / 42.10 ms │     no change │
│ QQuery 20 │     524.15 / 531.09 ±7.87 / 545.67 ms │    522.70 / 533.59 ±10.52 / 551.35 ms │     no change │
│ QQuery 21 │     598.87 / 611.82 ±7.03 / 619.95 ms │     599.68 / 604.12 ±4.89 / 612.58 ms │     no change │
│ QQuery 22 │  1062.03 / 1078.33 ±9.28 / 1088.27 ms │  1076.43 / 1084.75 ±5.40 / 1092.62 ms │     no change │
│ QQuery 23 │ 3193.94 / 3233.91 ±27.72 / 3276.75 ms │ 3230.54 / 3242.94 ±12.42 / 3259.18 ms │     no change │
│ QQuery 24 │        42.66 / 43.77 ±1.15 / 45.78 ms │        42.43 / 44.68 ±4.19 / 53.07 ms │     no change │
│ QQuery 25 │     112.63 / 116.69 ±4.42 / 123.97 ms │     114.67 / 115.83 ±1.41 / 118.55 ms │     no change │
│ QQuery 26 │        42.93 / 43.39 ±0.42 / 43.94 ms │        43.10 / 45.11 ±2.51 / 50.08 ms │     no change │
│ QQuery 27 │     673.39 / 676.85 ±4.03 / 684.43 ms │     674.62 / 680.90 ±5.02 / 689.98 ms │     no change │
│ QQuery 28 │  3003.24 / 3017.22 ±9.51 / 3031.94 ms │ 3015.41 / 3036.19 ±14.77 / 3053.74 ms │     no change │
│ QQuery 29 │        41.42 / 42.20 ±0.63 / 43.23 ms │        42.98 / 53.36 ±9.94 / 70.11 ms │  1.26x slower │
│ QQuery 30 │     302.15 / 308.34 ±9.56 / 327.28 ms │     301.20 / 309.22 ±7.39 / 323.02 ms │     no change │
│ QQuery 31 │     289.28 / 298.78 ±6.82 / 310.45 ms │    292.70 / 304.60 ±14.68 / 333.28 ms │     no change │
│ QQuery 32 │    933.47 / 956.35 ±15.58 / 971.72 ms │   950.58 / 976.82 ±19.78 / 1009.55 ms │     no change │
│ QQuery 33 │  1467.27 / 1477.75 ±8.19 / 1488.30 ms │  1460.77 / 1469.61 ±6.76 / 1479.08 ms │     no change │
│ QQuery 34 │ 1459.79 / 1481.28 ±16.73 / 1497.67 ms │ 1437.00 / 1466.24 ±20.58 / 1491.86 ms │     no change │
│ QQuery 35 │    292.63 / 309.02 ±26.25 / 361.37 ms │    298.04 / 318.47 ±34.84 / 387.88 ms │     no change │
│ QQuery 36 │        62.64 / 70.12 ±8.56 / 84.14 ms │       62.69 / 69.67 ±11.53 / 92.66 ms │     no change │
│ QQuery 37 │        35.95 / 37.61 ±1.76 / 40.78 ms │        36.27 / 38.63 ±3.14 / 44.85 ms │     no change │
│ QQuery 38 │        41.72 / 44.48 ±2.24 / 47.64 ms │        43.31 / 43.97 ±0.73 / 45.22 ms │     no change │
│ QQuery 39 │     130.36 / 139.42 ±8.01 / 152.94 ms │     133.24 / 140.65 ±7.11 / 153.56 ms │     no change │
│ QQuery 40 │        14.55 / 16.10 ±1.49 / 18.92 ms │        14.54 / 15.64 ±1.75 / 19.13 ms │     no change │
│ QQuery 41 │        14.16 / 14.48 ±0.28 / 15.01 ms │        14.07 / 16.95 ±5.31 / 27.57 ms │  1.17x slower │
│ QQuery 42 │        13.49 / 15.51 ±3.74 / 22.99 ms │        13.79 / 14.86 ±1.81 / 18.47 ms │     no change │
└───────────┴───────────────────────────────────────┴───────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                                 ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                                 │ 19875.10ms │
│ Total Time (perf_binary-view-map-inline-bypass)   │ 19966.80ms │
│ Average Time (HEAD)                               │   462.21ms │
│ Average Time (perf_binary-view-map-inline-bypass) │   464.34ms │
│ Queries Faster                                    │          1 │
│ Queries Slower                                    │          3 │
│ Queries with No Change                            │         39 │
│ Queries with Failure                              │          0 │
└───────────────────────────────────────────────────┴────────────┘

Resource Usage

clickbench_partitioned — base (merge-base)

Metric Value
Wall time 100.0s
Peak memory 30.3 GiB
Avg memory 23.4 GiB
CPU user 1041.9s
CPU sys 68.1s
Peak spill 0 B

clickbench_partitioned — branch

Metric Value
Wall time 105.0s
Peak memory 30.4 GiB
Avg memory 22.8 GiB
CPU user 1044.0s
CPU sys 69.1s
Peak spill 0 B

File an issue against this benchmark runner

Addresses alamb's review on PR apache#22172:

* Mark `append_inline_view` as `unsafe fn` (binary_view_map.rs:411). The
  function relies on the caller passing a valid inline ByteView
  (len <= 12 in the low 32 bits + 12 zero-padded value bytes); the
  compiler can't verify that invariant from the signature. Marking it
  unsafe makes the safety contract explicit and forces the single
  call site in `insert_if_new_inner` to annotate, where the
  `if len <= 12` branch establishes the invariant. # Safety paragraph
  on the function spells out what goes wrong if a non-inline view is
  passed (downstream `views` consumers interpret the high 96 bits as
  [buffer_index, offset], which is unsound).

* Drop benches/binary_view_map_insert.rs and its [[bench]] entry in
  the crate's Cargo.toml. alamb's note: the bench is unlikely to be
  run regularly post-merge and its utility drops after the fix lands.

Behavior unchanged. 8/8 binary_view_map tests pass; clippy +
fmt clean.
@RyanJamesStewart
Copy link
Copy Markdown
Author

v2 pushed (72bea57):

  1. append_inline_view is now unsafe fn with a # Safety paragraph spelling out what goes wrong if a non-inline view is passed (downstream views consumers interpret the high 96 bits as [buffer_index, offset] into the completed/in_progress buffers, which is unsound). The single call site in insert_if_new_inner is annotated with a SAFETY: comment pointing at the enclosing if len <= 12 branch that establishes the invariant.

  2. benches/binary_view_map_insert.rs removed along with the [[bench]] entry in the crate's Cargo.toml.

Behavior unchanged. 8/8 binary_view_map tests pass; clippy + fmt clean.

@alamb
Copy link
Copy Markdown
Contributor

alamb commented May 15, 2026

(I am trying to see if the last run was noise)

The run was noise

Copy link
Copy Markdown
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you @RyanJamesStewart

Comment on lines +353 to +357
// SAFETY: the enclosing `if len <= 12` branch establishes
// that view_u128 is a valid inline ByteView. Its low 32
// bits encode `len` (<= 12) and the next 12 bytes are the
// value bytes the source array produced for this row, so
// every required invariant of `append_inline_view` holds.
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.

this seems overly verbose -- I think the justification is that view_u128 was a valid view and len <= 12

Suggested change
// SAFETY: the enclosing `if len <= 12` branch establishes
// that view_u128 is a valid inline ByteView. Its low 32
// bits encode `len` (<= 12) and the next 12 bytes are the
// value bytes the source array produced for this row, so
// every required invariant of `append_inline_view` holds.
// SAFETY: view_u128 was a valid view, and the encosing`len <= 12`
// ensures it is inline

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.

💯

@alamb
Copy link
Copy Markdown
Contributor

alamb commented May 15, 2026

Will plan to merge this in the next day or two to give some others time to review if they want

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

Labels

performance Make DataFusion faster physical-expr Changes to the physical-expr crates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Avoid extra memory access in ArrowByteViewMap

4 participants