Skip to content

Replace OffsetBufferBuilder with Vec in byte-array zip - #10913

Open
yashkuceriya wants to merge 1 commit into
apache:mainfrom
yashkuceriya:optimize-zip-offsets
Open

Replace OffsetBufferBuilder with Vec in byte-array zip#10913
yashkuceriya wants to merge 1 commit into
apache:mainfrom
yashkuceriya:optimize-zip-offsets

Conversation

@yashkuceriya

Copy link
Copy Markdown

Which issue does this PR close?

Rationale for this change

The byte-array scalar zip path is one of the remaining OffsetBufferBuilder callsites listed in #10245. Constructing the offsets directly in a Vec also allows each truthy or falsy run to validate its total length once before extending the cumulative offsets.

A temporary release-mode microbenchmark exercised a mixed 4,096-row mask with two UTF-8 scalars for 10,000 iterations. In three alternating runs, the median was 3.18 ns/row for this change and 3.38 ns/row for current main, an improvement of about 5.9%. The temporary benchmark was not committed.

What changes are included in this PR?

BytesScalarImpl::create_output_on_non_nulls now builds offsets with Vec<T::Offset>. It preserves the existing capacity, cumulative-offset, overflow, and monotonicity behavior.

Are these changes tested?

Yes:

  • cargo +stable fmt --all -- --check
  • cargo test -p arrow-select - 417 unit tests and 17 documentation tests passed
  • cargo clippy -p arrow-select --all-targets --all-features -- -D warnings

Existing zip tests cover regular and large byte arrays, mixed masks, fragmented masks, nulls, and one-sided scalar paths.

Are there any user-facing changes?

No.

Automated assistance

Automated assistance was used to identify the requested callsite and draft the initial refactor. I reviewed the implementation, fixed compiler findings, rejected a slower first version after benchmarking, verified the final offset and overflow behavior against OffsetBufferBuilder, and ran all checks listed above.

@github-actions github-actions Bot added arrow Changes to the arrow crate arrow-select labels Aug 29, 2026
@Rich-T-kid

Copy link
Copy Markdown
Contributor

run benchmark zip_kernels

@adriangbot

Copy link
Copy Markdown

🤖 Arrow criterion benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c5465529064-2039-b98lq 6.12.85+ #1 SMP Sat Jun 27 09:31:30 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 optimize-zip-offsets (4829c8f) to cbbb56b (merge-base) diff

Run configuration
run benchmark zip_kernels

BENCH_COMMAND=cargo bench --features=arrow,async,test_common,experimental,object_store --bench zip_kernels
Results will be posted here when complete


File an issue against this benchmark runner

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This PR looks good.
we should return errors instead of panicking on overflows. I outlined one place but the same idea applies to all call sites in the PR

Comment thread arrow-select/src/zip.rs
offset_buffer_builder.push_length(falsy_len)
}
let start_offset = current_offset;
let added = falsy_len.checked_mul(false_repeat_count).expect("overflow");

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.

we should avoid panicking here. return an error

@adriangbot

This comment was marked as outdated.

@Jefffrey

Copy link
Copy Markdown
Contributor

zip generally takes too long, you'll need to run with specific bench filters @Rich-T-kid

@Rich-T-kid

Copy link
Copy Markdown
Contributor

run benchmark zip_kernels

env:
BENCH_FILTER: non_nulls_scalars

@adriangbot

This comment was marked as duplicate.

@adriangbot

Copy link
Copy Markdown

🤖 Arrow criterion benchmark completed (GKE) | trigger

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

Comparing optimize-zip-offsets (4829c8f) to cbbb56b (merge-base) diff

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

group                                                                          main                                   optimize-zip-offsets
-----                                                                          ----                                   --------------------
zip_8192_from_i32/non_nulls_scalars/10pct_true                                 1.00      6.8±0.00µs        ? ?/sec    1.04      7.0±0.01µs        ? ?/sec
zip_8192_from_i32/non_nulls_scalars/1pct_true                                  1.00      6.9±0.00µs        ? ?/sec    1.07      7.4±0.02µs        ? ?/sec
zip_8192_from_i32/non_nulls_scalars/50pct_nulls                                1.00      7.6±0.02µs        ? ?/sec    1.03      7.9±0.01µs        ? ?/sec
zip_8192_from_i32/non_nulls_scalars/50pct_true                                 1.64     14.8±0.27µs        ? ?/sec    1.00      9.0±0.02µs        ? ?/sec
zip_8192_from_i32/non_nulls_scalars/90pct_true                                 1.00      6.6±0.03µs        ? ?/sec    1.33      8.9±0.00µs        ? ?/sec
zip_8192_from_i32/non_nulls_scalars/99pct_true                                 1.00      6.5±0.00µs        ? ?/sec    1.35      8.8±0.01µs        ? ?/sec
zip_8192_from_i32/non_nulls_scalars/all_false                                  1.00      6.7±0.00µs        ? ?/sec    1.07      7.1±0.01µs        ? ?/sec
zip_8192_from_i32/non_nulls_scalars/all_true                                   1.00      6.2±0.36µs        ? ?/sec    1.36      8.4±0.01µs        ? ?/sec
zip_8192_from_i32/non_nulls_scalars/true_then_false                            1.00      6.4±0.00µs        ? ?/sec    1.22      7.9±0.01µs        ? ?/sec
zip_8192_from_long bytes (100..400)/non_nulls_scalars/10pct_true               1.17     50.4±0.16µs        ? ?/sec    1.00     43.2±0.22µs        ? ?/sec
zip_8192_from_long bytes (100..400)/non_nulls_scalars/1pct_true                1.47     38.8±0.04µs        ? ?/sec    1.00     26.3±0.15µs        ? ?/sec
zip_8192_from_long bytes (100..400)/non_nulls_scalars/50pct_nulls              1.09     58.9±0.17µs        ? ?/sec    1.00     54.0±0.26µs        ? ?/sec
zip_8192_from_long bytes (100..400)/non_nulls_scalars/50pct_true               1.03     66.5±0.16µs        ? ?/sec    1.00     64.7±0.22µs        ? ?/sec
zip_8192_from_long bytes (100..400)/non_nulls_scalars/90pct_true               1.13     60.7±0.12µs        ? ?/sec    1.00     53.9±0.25µs        ? ?/sec
zip_8192_from_long bytes (100..400)/non_nulls_scalars/99pct_true               1.37     49.9±0.06µs        ? ?/sec    1.00     36.4±0.09µs        ? ?/sec
zip_8192_from_long bytes (100..400)/non_nulls_scalars/all_false                1.00     23.9±0.03µs        ? ?/sec    1.00     24.0±0.05µs        ? ?/sec
zip_8192_from_long bytes (100..400)/non_nulls_scalars/all_true                 1.04     33.9±0.08µs        ? ?/sec    1.00     32.4±0.15µs        ? ?/sec
zip_8192_from_long bytes (100..400)/non_nulls_scalars/true_then_false          1.50     41.1±0.07µs        ? ?/sec    1.00     27.4±0.14µs        ? ?/sec
zip_8192_from_long strings (100..400)/non_nulls_scalars/10pct_true             1.10     80.7±0.15µs        ? ?/sec    1.00     73.4±0.26µs        ? ?/sec
zip_8192_from_long strings (100..400)/non_nulls_scalars/1pct_true              1.27     65.0±0.16µs        ? ?/sec    1.00     51.3±0.24µs        ? ?/sec
zip_8192_from_long strings (100..400)/non_nulls_scalars/50pct_nulls            1.02     89.3±0.19µs        ? ?/sec    1.00     87.2±0.61µs        ? ?/sec
zip_8192_from_long strings (100..400)/non_nulls_scalars/50pct_true             1.01     88.7±0.15µs        ? ?/sec    1.00     87.4±0.35µs        ? ?/sec
zip_8192_from_long strings (100..400)/non_nulls_scalars/90pct_true             1.16     66.1±0.14µs        ? ?/sec    1.00     56.9±0.24µs        ? ?/sec
zip_8192_from_long strings (100..400)/non_nulls_scalars/99pct_true             1.40     50.6±0.11µs        ? ?/sec    1.00     36.3±0.09µs        ? ?/sec
zip_8192_from_long strings (100..400)/non_nulls_scalars/all_false              1.00     48.5±0.13µs        ? ?/sec    1.04     50.4±0.25µs        ? ?/sec
zip_8192_from_long strings (100..400)/non_nulls_scalars/all_true               1.04     33.4±0.06µs        ? ?/sec    1.00     32.2±0.05µs        ? ?/sec
zip_8192_from_long strings (100..400)/non_nulls_scalars/true_then_false        1.41     55.0±0.51µs        ? ?/sec    1.00     38.9±0.30µs        ? ?/sec
zip_8192_from_short bytes (3..10)/non_nulls_scalars/10pct_true                 1.58     24.7±0.07µs        ? ?/sec    1.00     15.6±0.03µs        ? ?/sec
zip_8192_from_short bytes (3..10)/non_nulls_scalars/1pct_true                  3.19     19.1±0.03µs        ? ?/sec    1.00      6.0±0.08µs        ? ?/sec
zip_8192_from_short bytes (3..10)/non_nulls_scalars/50pct_nulls                1.21     30.5±0.07µs        ? ?/sec    1.00     25.3±0.07µs        ? ?/sec
zip_8192_from_short bytes (3..10)/non_nulls_scalars/50pct_true                 1.10     36.3±0.10µs        ? ?/sec    1.00     33.1±0.15µs        ? ?/sec
zip_8192_from_short bytes (3..10)/non_nulls_scalars/90pct_true                 1.59     24.9±0.08µs        ? ?/sec    1.00     15.7±0.07µs        ? ?/sec
zip_8192_from_short bytes (3..10)/non_nulls_scalars/99pct_true                 3.75     19.8±0.02µs        ? ?/sec    1.00      5.3±0.14µs        ? ?/sec
zip_8192_from_short bytes (3..10)/non_nulls_scalars/all_false                  1.05      3.9±0.09µs        ? ?/sec    1.00      3.7±0.00µs        ? ?/sec
zip_8192_from_short bytes (3..10)/non_nulls_scalars/all_true                   1.00      3.9±0.00µs        ? ?/sec    1.00      3.9±0.01µs        ? ?/sec
zip_8192_from_short bytes (3..10)/non_nulls_scalars/true_then_false            4.29     17.6±0.01µs        ? ?/sec    1.00      4.1±0.14µs        ? ?/sec
zip_8192_from_short strings (3..10)/non_nulls_scalars/10pct_true               1.52     25.5±0.09µs        ? ?/sec    1.00     16.8±0.05µs        ? ?/sec
zip_8192_from_short strings (3..10)/non_nulls_scalars/1pct_true                3.03     19.5±0.02µs        ? ?/sec    1.00      6.4±0.11µs        ? ?/sec
zip_8192_from_short strings (3..10)/non_nulls_scalars/50pct_nulls              1.13     29.5±0.07µs        ? ?/sec    1.00     26.1±0.12µs        ? ?/sec
zip_8192_from_short strings (3..10)/non_nulls_scalars/50pct_true               1.02     35.4±0.11µs        ? ?/sec    1.00     34.6±0.12µs        ? ?/sec
zip_8192_from_short strings (3..10)/non_nulls_scalars/90pct_true               1.53     24.9±0.08µs        ? ?/sec    1.00     16.3±0.11µs        ? ?/sec
zip_8192_from_short strings (3..10)/non_nulls_scalars/99pct_true               3.68     19.7±0.02µs        ? ?/sec    1.00      5.4±0.15µs        ? ?/sec
zip_8192_from_short strings (3..10)/non_nulls_scalars/all_false                1.00      3.8±0.00µs        ? ?/sec    1.00      3.8±0.01µs        ? ?/sec
zip_8192_from_short strings (3..10)/non_nulls_scalars/all_true                 1.00      4.0±0.01µs        ? ?/sec    1.00      4.0±0.01µs        ? ?/sec
zip_8192_from_short strings (3..10)/non_nulls_scalars/true_then_false          4.21     17.6±0.02µs        ? ?/sec    1.00      4.2±0.14µs        ? ?/sec
zip_8192_from_string_views size (10..100)/non_nulls_scalars/10pct_true         1.00     12.2±0.10µs        ? ?/sec    1.00     12.1±0.08µs        ? ?/sec
zip_8192_from_string_views size (10..100)/non_nulls_scalars/1pct_true          1.00      4.0±0.05µs        ? ?/sec    1.02      4.1±0.15µs        ? ?/sec
zip_8192_from_string_views size (10..100)/non_nulls_scalars/50pct_nulls        1.00     19.4±0.12µs        ? ?/sec    1.00     19.4±0.11µs        ? ?/sec
zip_8192_from_string_views size (10..100)/non_nulls_scalars/50pct_true         1.00     25.9±0.19µs        ? ?/sec    1.00     26.0±0.16µs        ? ?/sec
zip_8192_from_string_views size (10..100)/non_nulls_scalars/90pct_true         1.00     11.4±0.14µs        ? ?/sec    1.00     11.4±0.14µs        ? ?/sec
zip_8192_from_string_views size (10..100)/non_nulls_scalars/99pct_true         1.00      4.1±0.03µs        ? ?/sec    1.02      4.2±0.17µs        ? ?/sec
zip_8192_from_string_views size (10..100)/non_nulls_scalars/all_false          1.00   1796.4±5.35ns        ? ?/sec    1.00   1792.5±7.05ns        ? ?/sec
zip_8192_from_string_views size (10..100)/non_nulls_scalars/all_true           1.08      2.1±0.01µs        ? ?/sec    1.00  1915.5±11.85ns        ? ?/sec
zip_8192_from_string_views size (10..100)/non_nulls_scalars/true_then_false    1.00      2.2±0.00µs        ? ?/sec    1.04      2.2±0.14µs        ? ?/sec
zip_8192_from_string_views size (3..10)/non_nulls_scalars/10pct_true           1.00     12.1±0.10µs        ? ?/sec    1.00     12.1±0.09µs        ? ?/sec
zip_8192_from_string_views size (3..10)/non_nulls_scalars/1pct_true            1.00      4.0±0.04µs        ? ?/sec    1.01      4.0±0.16µs        ? ?/sec
zip_8192_from_string_views size (3..10)/non_nulls_scalars/50pct_nulls          1.00     19.2±0.13µs        ? ?/sec    1.00     19.3±0.10µs        ? ?/sec
zip_8192_from_string_views size (3..10)/non_nulls_scalars/50pct_true           1.00     25.8±0.16µs        ? ?/sec    1.02     26.1±0.16µs        ? ?/sec
zip_8192_from_string_views size (3..10)/non_nulls_scalars/90pct_true           1.00     11.4±0.14µs        ? ?/sec    1.00     11.3±0.14µs        ? ?/sec
zip_8192_from_string_views size (3..10)/non_nulls_scalars/99pct_true           1.00      4.0±0.03µs        ? ?/sec    1.01      4.1±0.16µs        ? ?/sec
zip_8192_from_string_views size (3..10)/non_nulls_scalars/all_false            1.00   1754.7±6.40ns        ? ?/sec    1.02   1781.6±6.10ns        ? ?/sec
zip_8192_from_string_views size (3..10)/non_nulls_scalars/all_true             1.00   1926.8±9.45ns        ? ?/sec    1.11      2.1±0.01µs        ? ?/sec
zip_8192_from_string_views size (3..10)/non_nulls_scalars/true_then_false      1.00      2.1±0.01µs        ? ?/sec    1.04      2.2±0.14µs        ? ?/sec

Resource Usage

base (merge-base)

Metric Value
Wall time 600.1s
Peak memory 16.1 MiB
Avg memory 14.5 MiB
CPU user 595.5s
CPU sys 0.0s
Peak spill 0 B

branch

Metric Value
Wall time 605.1s
Peak memory 31.4 MiB
Avg memory 19.5 MiB
CPU user 599.6s
CPU sys 0.1s
Peak spill 0 B

File an issue against this benchmark runner

@Jefffrey

Copy link
Copy Markdown
Contributor

run benchmark zip_kernels
env:
BENCH_FILTER: zip_8192_from_(long|short).+non_nulls_scalars

@adriangbot

This comment was marked as duplicate.

@adriangbot

Copy link
Copy Markdown

🤖 Arrow criterion benchmark completed (GKE) | trigger

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

Comparing optimize-zip-offsets (4829c8f) to cbbb56b (merge-base) diff

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

group                                                                      main                                   optimize-zip-offsets
-----                                                                      ----                                   --------------------
zip_8192_from_long bytes (100..400)/non_nulls_scalars/10pct_true           1.15     48.3±0.14µs        ? ?/sec    1.00     42.0±0.11µs        ? ?/sec
zip_8192_from_long bytes (100..400)/non_nulls_scalars/1pct_true            1.42     37.6±0.05µs        ? ?/sec    1.00     26.4±0.04µs        ? ?/sec
zip_8192_from_long bytes (100..400)/non_nulls_scalars/50pct_nulls          1.03     56.7±0.24µs        ? ?/sec    1.00     55.1±0.15µs        ? ?/sec
zip_8192_from_long bytes (100..400)/non_nulls_scalars/50pct_true           1.00     65.4±0.18µs        ? ?/sec    1.00     65.3±0.12µs        ? ?/sec
zip_8192_from_long bytes (100..400)/non_nulls_scalars/90pct_true           1.13     61.2±0.16µs        ? ?/sec    1.00     54.0±0.16µs        ? ?/sec
zip_8192_from_long bytes (100..400)/non_nulls_scalars/99pct_true           1.38     50.9±0.09µs        ? ?/sec    1.00     36.8±0.06µs        ? ?/sec
zip_8192_from_long bytes (100..400)/non_nulls_scalars/all_false            1.00     22.9±0.02µs        ? ?/sec    1.03     23.6±0.14µs        ? ?/sec
zip_8192_from_long bytes (100..400)/non_nulls_scalars/all_true             1.00     33.5±0.41µs        ? ?/sec    1.01     33.7±0.16µs        ? ?/sec
zip_8192_from_long bytes (100..400)/non_nulls_scalars/true_then_false      1.48     40.7±0.17µs        ? ?/sec    1.00     27.5±0.04µs        ? ?/sec
zip_8192_from_long strings (100..400)/non_nulls_scalars/10pct_true         1.13     85.2±0.27µs        ? ?/sec    1.00     75.4±0.18µs        ? ?/sec
zip_8192_from_long strings (100..400)/non_nulls_scalars/1pct_true          1.27     65.9±0.19µs        ? ?/sec    1.00     51.8±0.09µs        ? ?/sec
zip_8192_from_long strings (100..400)/non_nulls_scalars/50pct_nulls        1.08     96.0±0.44µs        ? ?/sec    1.00     88.9±0.22µs        ? ?/sec
zip_8192_from_long strings (100..400)/non_nulls_scalars/50pct_true         1.04     93.2±0.28µs        ? ?/sec    1.00     89.8±0.22µs        ? ?/sec
zip_8192_from_long strings (100..400)/non_nulls_scalars/90pct_true         1.18     69.2±0.13µs        ? ?/sec    1.00     58.9±0.15µs        ? ?/sec
zip_8192_from_long strings (100..400)/non_nulls_scalars/99pct_true         1.40     51.4±0.13µs        ? ?/sec    1.00     36.6±0.04µs        ? ?/sec
zip_8192_from_long strings (100..400)/non_nulls_scalars/all_false          1.00     49.7±0.46µs        ? ?/sec    1.00     49.8±0.17µs        ? ?/sec
zip_8192_from_long strings (100..400)/non_nulls_scalars/all_true           1.00     33.8±0.19µs        ? ?/sec    1.02     34.6±0.14µs        ? ?/sec
zip_8192_from_long strings (100..400)/non_nulls_scalars/true_then_false    1.31     52.8±0.63µs        ? ?/sec    1.00     40.1±0.79µs        ? ?/sec
zip_8192_from_short bytes (3..10)/non_nulls_scalars/10pct_true             1.59     24.7±0.06µs        ? ?/sec    1.00     15.5±0.02µs        ? ?/sec
zip_8192_from_short bytes (3..10)/non_nulls_scalars/1pct_true              3.22     19.1±0.03µs        ? ?/sec    1.00      5.9±0.00µs        ? ?/sec
zip_8192_from_short bytes (3..10)/non_nulls_scalars/50pct_nulls            1.21     30.6±0.08µs        ? ?/sec    1.00     25.2±0.11µs        ? ?/sec
zip_8192_from_short bytes (3..10)/non_nulls_scalars/50pct_true             1.09     36.1±0.11µs        ? ?/sec    1.00     33.2±0.13µs        ? ?/sec
zip_8192_from_short bytes (3..10)/non_nulls_scalars/90pct_true             1.59     24.9±0.08µs        ? ?/sec    1.00     15.6±0.03µs        ? ?/sec
zip_8192_from_short bytes (3..10)/non_nulls_scalars/99pct_true             3.81     19.8±0.02µs        ? ?/sec    1.00      5.2±0.01µs        ? ?/sec
zip_8192_from_short bytes (3..10)/non_nulls_scalars/all_false              1.00      3.6±0.00µs        ? ?/sec    1.00      3.6±0.00µs        ? ?/sec
zip_8192_from_short bytes (3..10)/non_nulls_scalars/all_true               1.00      3.9±0.00µs        ? ?/sec    1.00      3.9±0.01µs        ? ?/sec
zip_8192_from_short bytes (3..10)/non_nulls_scalars/true_then_false        4.36     17.6±0.02µs        ? ?/sec    1.00      4.0±0.00µs        ? ?/sec
zip_8192_from_short strings (3..10)/non_nulls_scalars/10pct_true           1.52     25.5±0.08µs        ? ?/sec    1.00     16.7±0.02µs        ? ?/sec
zip_8192_from_short strings (3..10)/non_nulls_scalars/1pct_true            3.06     19.4±0.02µs        ? ?/sec    1.00      6.3±0.01µs        ? ?/sec
zip_8192_from_short strings (3..10)/non_nulls_scalars/50pct_nulls          1.12     29.4±0.08µs        ? ?/sec    1.00     26.2±0.10µs        ? ?/sec
zip_8192_from_short strings (3..10)/non_nulls_scalars/50pct_true           1.01     35.2±0.12µs        ? ?/sec    1.00     34.8±0.13µs        ? ?/sec
zip_8192_from_short strings (3..10)/non_nulls_scalars/90pct_true           1.54     24.8±0.07µs        ? ?/sec    1.00     16.2±0.03µs        ? ?/sec
zip_8192_from_short strings (3..10)/non_nulls_scalars/99pct_true           3.74     19.7±0.02µs        ? ?/sec    1.00      5.3±0.01µs        ? ?/sec
zip_8192_from_short strings (3..10)/non_nulls_scalars/all_false            1.00      3.8±0.01µs        ? ?/sec    1.00      3.8±0.00µs        ? ?/sec
zip_8192_from_short strings (3..10)/non_nulls_scalars/all_true             1.01      3.9±0.01µs        ? ?/sec    1.00      3.9±0.01µs        ? ?/sec
zip_8192_from_short strings (3..10)/non_nulls_scalars/true_then_false      4.32     17.6±0.03µs        ? ?/sec    1.00      4.1±0.00µs        ? ?/sec

Resource Usage

base (merge-base)

Metric Value
Wall time 345.1s
Peak memory 19.5 MiB
Avg memory 13.6 MiB
CPU user 339.2s
CPU sys 0.0s
Peak spill 0 B

branch

Metric Value
Wall time 345.1s
Peak memory 20.4 MiB
Avg memory 14.4 MiB
CPU user 343.4s
CPU sys 0.0s
Peak spill 0 B

File an issue against this benchmark runner

@Rich-T-kid

Copy link
Copy Markdown
Contributor

run benchmark zip_kernels env: BENCH_FILTER: zip_8192_from_(long|short).+non_nulls_scalars

@Jefffrey I wouldn't expect there to be a 4x speed up from this PR. are the zip benchmarks usually this noisy?

@Jefffrey

Copy link
Copy Markdown
Contributor

im able to reproduce the results locally. maybe because its a scalar path the optimization has a larger effect

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

Labels

arrow Changes to the arrow crate arrow-select performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants