Skip to content

perf(physical-plan): optimize byte view append#21586

Open
kumarUjjawal wants to merge 2 commits intoapache:mainfrom
kumarUjjawal:feat/vectorized_append
Open

perf(physical-plan): optimize byte view append#21586
kumarUjjawal wants to merge 2 commits intoapache:mainfrom
kumarUjjawal:feat/vectorized_append

Conversation

@kumarUjjawal
Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

ByteViewGroupValueBuilder::vectorized_append did extraper-value work. It rebuilt views and copied long values one by one even when the input already had reusable byte views.

What changes are included in this PR?

  • Reuse input views in vectorized_append
  • Use extend on the no-null fast path
  • Batch-copy long values from source buffers when rows are contiguous in the same input buffer
  • Keep correct handling for nulls, repeated rows, and out-of-order rows
  • Add tests for:
    • subset and repeated rows
    • take_n after vectorized append
    • multiple long batches across calls
    • mid-append flushes
    • oversized values

Are these changes tested?

Yes

Are there any user-facing changes?

No

@github-actions github-actions bot added the physical-plan Changes to the physical-plan crate label Apr 13, 2026
}

let start_idx = self.views.len();
self.views.extend(rows.iter().map(|&row| source_views[row]));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This could be moved at line 202 and this will re-use the iteration over rows.

let start_idx = self.views.len();
self.views.extend(rows.iter().map(|&row| source_views[row]));

let mut pending = Vec::with_capacity(rows.len());
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This most probably will over-allocate because only the rows with more than 12 bytes will be appended. Maybe use half of the rows length as initial capacity and let it grow if needed ?!

rows: &[usize],
) {
let source_views = array.views();
let mut pending = Vec::with_capacity(rows.len());
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same - consider using a smaller initial capacity.

Copy link
Copy Markdown
Contributor Author

@kumarUjjawal kumarUjjawal Apr 13, 2026

Choose a reason for hiding this comment

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

I think half or rows.len() would be good as you said.

@alamb
Copy link
Copy Markdown
Contributor

alamb commented Apr 14, 2026

run benchmarks

@adriangbot
Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4245837048-1238-tdztk 6.12.55+ #1 SMP Sun Feb 1 08:59:41 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 feat/vectorized_append (bd0a959) to 98d280f (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-c4245837048-1240-z7x9b 6.12.55+ #1 SMP Sun Feb 1 08:59:41 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 feat/vectorized_append (bd0a959) to 98d280f (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 running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4245837048-1239-gz9pg 6.12.55+ #1 SMP Sun Feb 1 08:59:41 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 feat/vectorized_append (bd0a959) to 98d280f (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 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 feat_vectorized_append
--------------------
Benchmark tpcds_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                     HEAD ┃                   feat_vectorized_append ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1  │              6.68 / 7.12 ±0.76 / 8.65 ms │              6.74 / 7.17 ±0.75 / 8.67 ms │     no change │
│ QQuery 2  │        144.26 / 144.86 ±0.54 / 145.76 ms │        144.87 / 146.12 ±1.21 / 147.61 ms │     no change │
│ QQuery 3  │        113.84 / 114.32 ±0.33 / 114.78 ms │        114.28 / 115.37 ±0.99 / 116.92 ms │     no change │
│ QQuery 4  │    1348.67 / 1368.09 ±15.10 / 1395.04 ms │     1391.82 / 1400.33 ±7.04 / 1411.65 ms │     no change │
│ QQuery 5  │        172.85 / 174.30 ±0.82 / 175.12 ms │        172.87 / 174.69 ±1.54 / 176.91 ms │     no change │
│ QQuery 6  │       829.48 / 851.16 ±18.61 / 876.60 ms │       833.06 / 873.20 ±24.07 / 902.36 ms │     no change │
│ QQuery 7  │        341.83 / 345.00 ±2.19 / 348.56 ms │        345.07 / 346.25 ±0.88 / 347.61 ms │     no change │
│ QQuery 8  │        117.12 / 118.05 ±0.69 / 119.03 ms │        116.17 / 117.85 ±1.20 / 119.25 ms │     no change │
│ QQuery 9  │        102.29 / 105.58 ±2.65 / 108.17 ms │        101.66 / 107.46 ±5.27 / 117.39 ms │     no change │
│ QQuery 10 │        106.03 / 107.59 ±1.01 / 108.75 ms │        106.63 / 107.86 ±0.91 / 109.10 ms │     no change │
│ QQuery 11 │        944.89 / 954.49 ±6.50 / 962.68 ms │        972.30 / 983.33 ±9.16 / 994.97 ms │     no change │
│ QQuery 12 │           46.18 / 47.93 ±1.33 / 50.03 ms │           45.40 / 46.34 ±0.80 / 47.41 ms │     no change │
│ QQuery 13 │        398.57 / 405.40 ±3.52 / 408.32 ms │        403.84 / 406.63 ±3.03 / 411.95 ms │     no change │
│ QQuery 14 │      995.40 / 1008.02 ±6.73 / 1013.02 ms │      996.66 / 1003.12 ±6.75 / 1014.80 ms │     no change │
│ QQuery 15 │           15.74 / 16.84 ±0.68 / 17.58 ms │           16.31 / 17.01 ±0.63 / 18.00 ms │     no change │
│ QQuery 16 │              7.91 / 8.62 ±0.67 / 9.53 ms │              7.20 / 7.48 ±0.21 / 7.76 ms │ +1.15x faster │
│ QQuery 17 │        230.17 / 232.73 ±2.26 / 236.43 ms │        228.44 / 229.80 ±1.59 / 232.90 ms │     no change │
│ QQuery 18 │        128.39 / 129.07 ±0.70 / 130.02 ms │        128.96 / 129.58 ±0.56 / 130.45 ms │     no change │
│ QQuery 19 │        155.88 / 156.99 ±1.16 / 159.19 ms │        157.87 / 158.97 ±1.04 / 160.59 ms │     no change │
│ QQuery 20 │           14.10 / 14.59 ±0.55 / 15.62 ms │           14.05 / 14.35 ±0.28 / 14.78 ms │     no change │
│ QQuery 21 │           19.44 / 20.03 ±0.30 / 20.25 ms │           19.62 / 20.27 ±0.40 / 20.76 ms │     no change │
│ QQuery 22 │        486.48 / 493.69 ±5.68 / 501.89 ms │        488.06 / 492.57 ±3.01 / 496.32 ms │     no change │
│ QQuery 23 │        884.34 / 898.84 ±8.32 / 910.30 ms │        867.73 / 873.81 ±4.04 / 879.91 ms │     no change │
│ QQuery 24 │        380.67 / 385.25 ±3.13 / 389.12 ms │        383.39 / 385.30 ±1.87 / 388.85 ms │     no change │
│ QQuery 25 │        341.73 / 342.63 ±0.65 / 343.20 ms │        341.77 / 342.78 ±0.53 / 343.23 ms │     no change │
│ QQuery 26 │           80.20 / 82.59 ±1.34 / 84.33 ms │           81.80 / 82.76 ±0.55 / 83.37 ms │     no change │
│ QQuery 27 │              6.93 / 7.32 ±0.59 / 8.49 ms │              7.02 / 7.59 ±0.42 / 8.11 ms │     no change │
│ QQuery 28 │        149.22 / 150.62 ±0.87 / 151.92 ms │        150.44 / 152.31 ±1.09 / 153.46 ms │     no change │
│ QQuery 29 │        279.95 / 283.12 ±1.99 / 285.31 ms │        282.52 / 284.64 ±1.71 / 287.12 ms │     no change │
│ QQuery 30 │           44.42 / 46.34 ±1.29 / 48.21 ms │           43.14 / 44.44 ±0.99 / 45.62 ms │     no change │
│ QQuery 31 │        170.48 / 172.78 ±1.61 / 175.36 ms │        169.70 / 172.81 ±2.69 / 176.47 ms │     no change │
│ QQuery 32 │           56.43 / 57.53 ±0.57 / 58.07 ms │           57.12 / 58.18 ±0.95 / 59.74 ms │     no change │
│ QQuery 33 │        142.02 / 143.32 ±1.05 / 144.97 ms │        141.94 / 143.79 ±1.65 / 146.47 ms │     no change │
│ QQuery 34 │              7.02 / 7.28 ±0.29 / 7.67 ms │              7.10 / 7.51 ±0.74 / 9.00 ms │     no change │
│ QQuery 35 │        107.27 / 108.59 ±1.42 / 111.25 ms │        105.87 / 108.89 ±1.60 / 110.08 ms │     no change │
│ QQuery 36 │              6.76 / 6.90 ±0.09 / 7.03 ms │              6.56 / 6.74 ±0.16 / 6.96 ms │     no change │
│ QQuery 37 │              8.41 / 8.95 ±0.36 / 9.38 ms │              8.63 / 9.20 ±0.49 / 9.80 ms │     no change │
│ QQuery 38 │           84.52 / 87.56 ±3.97 / 94.93 ms │           85.64 / 89.35 ±3.44 / 95.49 ms │     no change │
│ QQuery 39 │        126.70 / 130.06 ±2.65 / 134.74 ms │        127.71 / 129.20 ±1.39 / 131.27 ms │     no change │
│ QQuery 40 │        109.50 / 115.81 ±7.02 / 129.16 ms │        110.40 / 115.63 ±4.42 / 123.10 ms │     no change │
│ QQuery 41 │           14.63 / 15.55 ±0.85 / 17.07 ms │           14.33 / 15.67 ±1.39 / 17.44 ms │     no change │
│ QQuery 42 │        108.18 / 109.93 ±1.40 / 112.24 ms │        108.49 / 110.38 ±1.57 / 112.40 ms │     no change │
│ QQuery 43 │              6.01 / 6.19 ±0.18 / 6.54 ms │              6.03 / 6.24 ±0.14 / 6.46 ms │     no change │
│ QQuery 44 │           12.22 / 12.47 ±0.23 / 12.82 ms │           12.15 / 12.98 ±0.73 / 13.96 ms │     no change │
│ QQuery 45 │           49.73 / 51.66 ±1.14 / 52.99 ms │           50.12 / 51.95 ±1.19 / 53.74 ms │     no change │
│ QQuery 46 │              8.31 / 8.88 ±0.32 / 9.29 ms │             8.76 / 9.30 ±0.47 / 10.19 ms │     no change │
│ QQuery 47 │        738.43 / 746.36 ±6.36 / 756.60 ms │        714.98 / 724.71 ±6.49 / 730.40 ms │     no change │
│ QQuery 48 │        292.02 / 299.57 ±5.41 / 308.42 ms │        283.82 / 291.06 ±6.05 / 300.72 ms │     no change │
│ QQuery 49 │        250.25 / 252.14 ±2.03 / 255.64 ms │        252.87 / 255.63 ±1.72 / 257.79 ms │     no change │
│ QQuery 50 │        225.85 / 228.30 ±2.02 / 231.55 ms │        221.88 / 224.27 ±2.07 / 227.20 ms │     no change │
│ QQuery 51 │        180.57 / 183.08 ±1.33 / 184.40 ms │        181.22 / 183.93 ±2.01 / 186.02 ms │     no change │
│ QQuery 52 │        107.57 / 109.40 ±1.27 / 110.77 ms │        108.57 / 110.98 ±2.64 / 116.05 ms │     no change │
│ QQuery 53 │        103.03 / 104.88 ±1.43 / 107.17 ms │        103.62 / 105.05 ±0.90 / 106.37 ms │     no change │
│ QQuery 54 │        145.60 / 148.09 ±1.47 / 149.83 ms │        145.93 / 147.76 ±1.12 / 149.29 ms │     no change │
│ QQuery 55 │        106.69 / 108.19 ±1.20 / 110.14 ms │        108.03 / 109.02 ±1.11 / 111.07 ms │     no change │
│ QQuery 56 │        141.70 / 142.89 ±1.14 / 144.53 ms │        141.62 / 142.50 ±0.54 / 143.21 ms │     no change │
│ QQuery 57 │        174.17 / 176.28 ±1.61 / 179.06 ms │        172.27 / 175.02 ±2.07 / 177.33 ms │     no change │
│ QQuery 58 │        287.50 / 297.59 ±7.03 / 308.11 ms │        287.34 / 297.53 ±6.78 / 304.80 ms │     no change │
│ QQuery 59 │        197.43 / 198.92 ±1.18 / 200.21 ms │        199.58 / 200.63 ±0.99 / 202.45 ms │     no change │
│ QQuery 60 │        143.76 / 146.39 ±1.66 / 148.58 ms │        143.61 / 145.28 ±1.01 / 146.40 ms │     no change │
│ QQuery 61 │           13.07 / 13.34 ±0.22 / 13.59 ms │           13.36 / 13.53 ±0.18 / 13.87 ms │     no change │
│ QQuery 62 │       903.60 / 930.61 ±22.46 / 961.96 ms │       911.00 / 945.06 ±28.62 / 975.64 ms │     no change │
│ QQuery 63 │        105.12 / 106.10 ±1.14 / 108.29 ms │        103.94 / 108.58 ±4.25 / 115.16 ms │     no change │
│ QQuery 64 │        683.26 / 691.35 ±4.56 / 696.11 ms │        684.31 / 693.76 ±7.42 / 702.13 ms │     no change │
│ QQuery 65 │        253.65 / 255.07 ±1.90 / 258.80 ms │        260.37 / 263.35 ±3.53 / 270.23 ms │     no change │
│ QQuery 66 │        236.84 / 250.31 ±9.63 / 265.49 ms │        247.10 / 256.10 ±5.59 / 261.32 ms │     no change │
│ QQuery 67 │        308.21 / 316.67 ±8.18 / 331.64 ms │       314.69 / 322.39 ±10.08 / 341.97 ms │     no change │
│ QQuery 68 │            8.77 / 10.18 ±1.83 / 13.73 ms │            9.23 / 11.10 ±1.32 / 12.76 ms │  1.09x slower │
│ QQuery 69 │        102.01 / 105.38 ±3.10 / 110.86 ms │        102.70 / 106.12 ±2.75 / 111.07 ms │     no change │
│ QQuery 70 │        343.11 / 354.48 ±7.14 / 363.79 ms │       345.43 / 355.04 ±11.79 / 378.08 ms │     no change │
│ QQuery 71 │        136.17 / 139.64 ±2.65 / 143.67 ms │        135.31 / 137.97 ±3.27 / 143.87 ms │     no change │
│ QQuery 72 │       616.55 / 631.06 ±11.32 / 645.55 ms │        616.92 / 625.87 ±5.49 / 631.93 ms │     no change │
│ QQuery 73 │              6.99 / 8.00 ±0.76 / 8.78 ms │             7.27 / 8.84 ±1.57 / 11.68 ms │  1.11x slower │
│ QQuery 74 │        620.84 / 629.23 ±5.58 / 635.44 ms │        613.96 / 622.66 ±5.37 / 629.64 ms │     no change │
│ QQuery 75 │        278.24 / 280.80 ±2.71 / 285.78 ms │        276.64 / 280.44 ±2.44 / 283.49 ms │     no change │
│ QQuery 76 │        132.39 / 133.82 ±1.26 / 136.15 ms │        131.90 / 133.59 ±1.29 / 135.06 ms │     no change │
│ QQuery 77 │        189.78 / 191.60 ±1.25 / 192.93 ms │        190.60 / 192.82 ±1.69 / 195.18 ms │     no change │
│ QQuery 78 │        335.10 / 344.12 ±5.82 / 352.77 ms │        335.10 / 343.94 ±6.27 / 354.20 ms │     no change │
│ QQuery 79 │        240.40 / 244.48 ±2.61 / 248.08 ms │        235.31 / 238.50 ±2.43 / 241.67 ms │     no change │
│ QQuery 80 │        322.05 / 322.89 ±1.01 / 324.80 ms │        322.55 / 324.05 ±1.03 / 325.31 ms │     no change │
│ QQuery 81 │           26.72 / 27.64 ±0.85 / 28.93 ms │           26.48 / 27.90 ±1.07 / 29.51 ms │     no change │
│ QQuery 82 │        200.25 / 202.83 ±2.04 / 206.13 ms │        198.84 / 202.54 ±2.16 / 204.83 ms │     no change │
│ QQuery 83 │           38.80 / 40.94 ±1.78 / 44.10 ms │           39.03 / 40.24 ±0.96 / 41.69 ms │     no change │
│ QQuery 84 │           48.46 / 49.54 ±0.86 / 51.02 ms │           49.25 / 50.80 ±0.98 / 51.70 ms │     no change │
│ QQuery 85 │        148.18 / 149.71 ±1.33 / 151.68 ms │        148.14 / 148.90 ±0.71 / 150.23 ms │     no change │
│ QQuery 86 │           39.92 / 40.45 ±0.42 / 41.19 ms │           39.46 / 40.39 ±0.74 / 41.59 ms │     no change │
│ QQuery 87 │           87.45 / 90.35 ±2.73 / 95.11 ms │           84.13 / 89.13 ±4.29 / 96.70 ms │     no change │
│ QQuery 88 │        100.78 / 101.88 ±0.92 / 103.10 ms │        100.53 / 101.46 ±0.87 / 103.10 ms │     no change │
│ QQuery 89 │        119.84 / 120.52 ±0.66 / 121.77 ms │        118.82 / 120.35 ±1.14 / 122.00 ms │     no change │
│ QQuery 90 │           23.35 / 24.26 ±0.70 / 25.07 ms │           24.02 / 24.51 ±0.32 / 24.98 ms │     no change │
│ QQuery 91 │           62.90 / 64.03 ±0.78 / 65.09 ms │           63.48 / 65.40 ±2.11 / 69.29 ms │     no change │
│ QQuery 92 │           57.87 / 59.24 ±1.21 / 61.43 ms │           57.49 / 58.42 ±0.91 / 59.92 ms │     no change │
│ QQuery 93 │        187.92 / 189.30 ±0.88 / 190.69 ms │        188.24 / 189.00 ±0.70 / 190.22 ms │     no change │
│ QQuery 94 │           60.97 / 61.64 ±0.75 / 62.81 ms │           60.53 / 61.52 ±0.57 / 62.21 ms │     no change │
│ QQuery 95 │        126.70 / 127.86 ±0.83 / 128.86 ms │        127.91 / 129.16 ±0.92 / 130.76 ms │     no change │
│ QQuery 96 │           71.40 / 73.78 ±2.07 / 76.51 ms │           71.79 / 73.75 ±1.38 / 76.08 ms │     no change │
│ QQuery 97 │        125.36 / 128.66 ±1.91 / 130.86 ms │        123.46 / 126.35 ±2.75 / 130.67 ms │     no change │
│ QQuery 98 │        151.46 / 156.05 ±2.72 / 159.15 ms │        154.33 / 156.02 ±1.57 / 158.63 ms │     no change │
│ QQuery 99 │ 10810.78 / 10851.71 ±24.57 / 10886.95 ms │ 10829.16 / 10865.31 ±33.76 / 10913.14 ms │     no change │
└───────────┴──────────────────────────────────────────┴──────────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                     ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                     │ 31726.27ms │
│ Total Time (feat_vectorized_append)   │ 31795.37ms │
│ Average Time (HEAD)                   │   320.47ms │
│ Average Time (feat_vectorized_append) │   321.17ms │
│ Queries Faster                        │          1 │
│ Queries Slower                        │          2 │
│ Queries with No Change                │         96 │
│ Queries with Failure                  │          0 │
└───────────────────────────────────────┴────────────┘

Resource Usage

tpcds — base (merge-base)

Metric Value
Wall time 159.0s
Peak memory 5.3 GiB
Avg memory 4.5 GiB
CPU user 262.6s
CPU sys 17.6s
Peak spill 0 B

tpcds — branch

Metric Value
Wall time 159.3s
Peak memory 5.7 GiB
Avg memory 4.8 GiB
CPU user 261.7s
CPU sys 17.5s
Peak spill 0 B

File an issue against this benchmark runner

@adriangbot
Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

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

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 feat_vectorized_append
--------------------
Benchmark clickbench_partitioned.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                  HEAD ┃                feat_vectorized_append ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 0  │          1.21 / 4.50 ±6.43 / 17.37 ms │          1.21 / 4.51 ±6.44 / 17.38 ms │     no change │
│ QQuery 1  │        14.18 / 14.68 ±0.28 / 14.92 ms │        14.20 / 14.52 ±0.17 / 14.66 ms │     no change │
│ QQuery 2  │        43.75 / 44.36 ±0.42 / 44.97 ms │        44.50 / 44.69 ±0.18 / 44.93 ms │     no change │
│ QQuery 3  │        43.67 / 45.99 ±1.34 / 47.67 ms │        40.60 / 40.85 ±0.26 / 41.19 ms │ +1.13x faster │
│ QQuery 4  │    289.34 / 301.81 ±12.41 / 324.33 ms │    282.81 / 298.96 ±12.31 / 315.36 ms │     no change │
│ QQuery 5  │     341.49 / 346.53 ±4.65 / 352.31 ms │     349.58 / 356.22 ±7.72 / 371.36 ms │     no change │
│ QQuery 6  │           5.73 / 6.07 ±0.31 / 6.59 ms │           5.54 / 7.40 ±1.34 / 8.84 ms │  1.22x slower │
│ QQuery 7  │        16.77 / 17.56 ±1.24 / 20.02 ms │        16.57 / 16.89 ±0.25 / 17.26 ms │     no change │
│ QQuery 8  │     421.87 / 426.56 ±4.44 / 434.33 ms │     432.02 / 443.04 ±9.75 / 457.42 ms │     no change │
│ QQuery 9  │    659.33 / 691.45 ±51.91 / 794.86 ms │    658.84 / 669.90 ±11.19 / 690.41 ms │     no change │
│ QQuery 10 │        90.27 / 93.59 ±2.91 / 98.46 ms │        90.31 / 93.11 ±2.72 / 97.92 ms │     no change │
│ QQuery 11 │     104.24 / 105.16 ±0.60 / 105.98 ms │     105.22 / 106.19 ±1.00 / 108.10 ms │     no change │
│ QQuery 12 │     340.28 / 347.71 ±4.84 / 353.16 ms │     339.87 / 349.16 ±7.73 / 361.01 ms │     no change │
│ QQuery 13 │    461.70 / 475.06 ±10.06 / 487.85 ms │    453.89 / 467.90 ±16.19 / 491.54 ms │     no change │
│ QQuery 14 │     349.04 / 358.56 ±8.96 / 373.50 ms │     350.81 / 357.64 ±5.25 / 364.79 ms │     no change │
│ QQuery 15 │    359.99 / 377.29 ±14.35 / 400.67 ms │    351.78 / 364.76 ±11.61 / 385.86 ms │     no change │
│ QQuery 16 │    724.24 / 734.73 ±10.98 / 755.58 ms │    704.62 / 744.94 ±29.11 / 773.09 ms │     no change │
│ QQuery 17 │     715.41 / 723.59 ±6.88 / 732.61 ms │     700.82 / 708.48 ±4.41 / 714.04 ms │     no change │
│ QQuery 18 │ 1440.18 / 1506.27 ±45.72 / 1574.28 ms │ 1418.49 / 1463.10 ±35.57 / 1503.91 ms │     no change │
│ QQuery 19 │       36.12 / 49.15 ±14.43 / 74.08 ms │        37.32 / 38.56 ±0.96 / 39.75 ms │ +1.27x faster │
│ QQuery 20 │    722.90 / 740.47 ±19.10 / 764.02 ms │    723.17 / 734.67 ±18.95 / 772.10 ms │     no change │
│ QQuery 21 │     763.87 / 770.39 ±5.72 / 778.93 ms │     766.41 / 771.58 ±4.01 / 777.11 ms │     no change │
│ QQuery 22 │  1135.27 / 1138.87 ±3.80 / 1145.53 ms │  1136.79 / 1142.66 ±6.58 / 1155.11 ms │     no change │
│ QQuery 23 │ 3091.45 / 3116.91 ±26.26 / 3160.56 ms │ 3096.26 / 3120.12 ±23.73 / 3162.51 ms │     no change │
│ QQuery 24 │      98.09 / 102.74 ±2.42 / 104.52 ms │     101.46 / 103.09 ±2.27 / 107.56 ms │     no change │
│ QQuery 25 │     138.39 / 139.66 ±1.12 / 141.36 ms │     140.92 / 142.95 ±1.53 / 145.60 ms │     no change │
│ QQuery 26 │      97.55 / 101.18 ±2.12 / 104.10 ms │     100.59 / 103.70 ±2.63 / 107.07 ms │     no change │
│ QQuery 27 │     849.00 / 858.18 ±8.70 / 874.20 ms │     851.45 / 855.65 ±3.17 / 858.67 ms │     no change │
│ QQuery 28 │ 3283.02 / 3322.18 ±21.36 / 3342.20 ms │ 3267.02 / 3294.23 ±18.44 / 3319.54 ms │     no change │
│ QQuery 29 │        50.05 / 55.06 ±5.81 / 66.34 ms │        50.38 / 55.70 ±6.65 / 68.40 ms │     no change │
│ QQuery 30 │     367.70 / 377.05 ±6.27 / 386.97 ms │     359.07 / 366.24 ±6.30 / 377.06 ms │     no change │
│ QQuery 31 │     379.12 / 397.34 ±9.96 / 408.07 ms │     381.50 / 388.63 ±5.26 / 397.19 ms │     no change │
│ QQuery 32 │ 1148.83 / 1322.72 ±93.62 / 1427.62 ms │ 1218.43 / 1264.90 ±33.64 / 1305.74 ms │     no change │
│ QQuery 33 │ 1482.92 / 1531.16 ±55.39 / 1636.70 ms │ 1541.82 / 1599.86 ±37.65 / 1641.77 ms │     no change │
│ QQuery 34 │ 1498.55 / 1524.76 ±19.32 / 1558.07 ms │ 1600.48 / 1629.27 ±34.32 / 1696.11 ms │  1.07x slower │
│ QQuery 35 │    392.27 / 408.45 ±13.49 / 426.15 ms │    404.88 / 419.90 ±12.74 / 441.12 ms │     no change │
│ QQuery 36 │     114.22 / 122.28 ±4.36 / 126.51 ms │     120.42 / 125.44 ±2.65 / 128.01 ms │     no change │
│ QQuery 37 │        49.12 / 50.59 ±1.38 / 52.97 ms │        51.84 / 54.65 ±2.17 / 56.62 ms │  1.08x slower │
│ QQuery 38 │        75.77 / 78.05 ±2.07 / 81.26 ms │        79.88 / 82.48 ±4.56 / 91.59 ms │  1.06x slower │
│ QQuery 39 │     215.81 / 224.76 ±5.79 / 232.14 ms │     217.51 / 225.12 ±5.60 / 231.75 ms │     no change │
│ QQuery 40 │        24.11 / 25.48 ±1.43 / 27.74 ms │        23.17 / 26.86 ±4.10 / 34.69 ms │  1.05x slower │
│ QQuery 41 │        20.05 / 22.53 ±1.63 / 25.00 ms │        22.48 / 23.30 ±0.70 / 24.51 ms │     no change │
│ QQuery 42 │        19.26 / 20.35 ±0.94 / 22.10 ms │        20.21 / 21.55 ±1.16 / 23.61 ms │  1.06x slower │
└───────────┴───────────────────────────────────────┴───────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                     ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                     │ 23121.80ms │
│ Total Time (feat_vectorized_append)   │ 23143.38ms │
│ Average Time (HEAD)                   │   537.72ms │
│ Average Time (feat_vectorized_append) │   538.22ms │
│ Queries Faster                        │          2 │
│ Queries Slower                        │          6 │
│ Queries with No Change                │         35 │
│ Queries with Failure                  │          0 │
└───────────────────────────────────────┴────────────┘

Resource Usage

clickbench_partitioned — base (merge-base)

Metric Value
Wall time 116.8s
Peak memory 39.0 GiB
Avg memory 30.4 GiB
CPU user 1084.8s
CPU sys 99.3s
Peak spill 0 B

clickbench_partitioned — branch

Metric Value
Wall time 116.7s
Peak memory 34.7 GiB
Avg memory 27.5 GiB
CPU user 1083.1s
CPU sys 101.2s
Peak spill 0 B

File an issue against this benchmark runner

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

Labels

physical-plan Changes to the physical-plan crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Optimize ByteViewGroupValueBuilder vectorized_append

4 participants