Skip to content

perf(NullBuffer::Exapand) optimize 8 byte chunks - #10976

Merged
Jefffrey merged 5 commits into
apache:mainfrom
Rich-T-kid:rich-T-kid/optimize-NullBuff-expand
Sep 4, 2026
Merged

perf(NullBuffer::Exapand) optimize 8 byte chunks #10976
Jefffrey merged 5 commits into
apache:mainfrom
Rich-T-kid:rich-T-kid/optimize-NullBuff-expand

Conversation

@Rich-T-kid

@Rich-T-kid Rich-T-kid commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

see #10883.

NullBuffer::expand repeats each validity bit count times, used whenever a parent null must be propagated to a fixed-size group of child elements. The previous implementation set output bits one at a time regardless of count, which is unnecessarily slow for common sizes.

What changes are included in this PR?

Three tiered fast paths are added to try_expand, checked in order:

  • count % 8 == 0 : each expanded run is byte-aligned, so contiguous runs of valid bits are filled with memset(0xFF) via BitSliceIterator rather than setting bits individually.
  • count % 4 == 0 : each bit's range starts and ends on a nibble boundary. Full interior bytes are filled with 0xFF; the one partial boundary byte is set with |= 0x0F or |= 0xF0 depending on alignment. No inner loop.
  • General case : unchanged bit-by-bit path.

Are these changes tested?

yes, existing test cover this as well as 1 new test

Are there any user-facing changes?

no

@github-actions github-actions Bot added arrow Changes to the arrow crate arrow-buffer labels Sep 3, 2026
@Rich-T-kid

Copy link
Copy Markdown
Contributor Author

run benchmark boolean_kernels
env:
BENCH_FILTER: null_buffer_expand

@adriangbot

Copy link
Copy Markdown

🤖 Arrow criterion benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c5530777736-2122-dtsdj 6.12.94+ #1 SMP Fri Jul 17 09:42:57 UTC 2026 aarch64 GNU/Linux

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

Comparing rich-T-kid/optimize-NullBuff-expand (704c4c9) to ec21627 (merge-base) diff

Run configuration
run benchmark boolean_kernels
env:
  BENCH_FILTER: "null_buffer_expand"

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


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Arrow criterion benchmark completed (GKE) | trigger

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

Comparing rich-T-kid/optimize-NullBuff-expand (704c4c9) to ec21627 (merge-base) diff

Run configuration
run benchmark boolean_kernels
env:
  BENCH_FILTER: "null_buffer_expand"
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                                    rich-T-kid_optimize-NullBuff-expand
-----                                    ----                                    -----------------------------------
null_buffer_expand/len=1024/count=128    80.07    47.5±0.13µs        ? ?/sec     1.00    592.8±3.30ns        ? ?/sec
null_buffer_expand/len=1024/count=96     61.55    34.2±0.05µs        ? ?/sec     1.00    555.7±0.99ns        ? ?/sec
null_buffer_expand/len=2048/count=192    118.66   138.9±0.27µs        ? ?/sec    1.00   1170.7±6.19ns        ? ?/sec
null_buffer_expand/len=2048/count=256    144.62   184.1±0.15µs        ? ?/sec    1.00   1272.7±3.87ns        ? ?/sec
null_buffer_expand/len=512/count=12      1.00      2.3±0.01µs        ? ?/sec     1.01      2.3±0.00µs        ? ?/sec
null_buffer_expand/len=512/count=16      9.60      3.0±0.01µs        ? ?/sec     1.00    316.2±0.85ns        ? ?/sec

Resource Usage

base (merge-base)

Metric Value
Wall time 60.0s
Peak memory 10.5 MiB
Avg memory 8.8 MiB
CPU user 55.8s
CPU sys 0.0s
Peak spill 0 B

branch

Metric Value
Wall time 65.0s
Peak memory 10.5 MiB
Avg memory 8.2 MiB
CPU user 60.1s
CPU sys 0.0s
Peak spill 0 B

File an issue against this benchmark runner

@Rich-T-kid

Copy link
Copy Markdown
Contributor Author
null_buffer_expand/len=1024/count=128    80.07    47.5±0.13µs        ? ?/sec     1.00    592.8±3.30ns        ? ?/sec
null_buffer_expand/len=1024/count=96     61.55    34.2±0.05µs        ? ?/sec     1.00    555.7±0.99ns        ? ?/sec
null_buffer_expand/len=2048/count=192    118.66   138.9±0.27µs        ? ?/sec    1.00   1170.7±6.19ns        ? ?/sec
null_buffer_expand/len=2048/count=256    144.62   184.1±0.15µs        ? ?/sec    1.00   1272.7±3.87ns        ? ?/sec
null_buffer_expand/len=512/count=12      1.00      2.3±0.01µs        ? ?/sec     1.01      2.3±0.00µs        ? ?/sec
null_buffer_expand/len=512/count=16      9.60      3.0±0.01µs        ? ?/sec     1.00    316.2±0.85ns        ? ?/sec

144x 😄

@Rich-T-kid

Copy link
Copy Markdown
Contributor Author

run benchmark boolean_kernels
env:
BENCH_FILTER: null_buffer_expand

1 similar comment
@Rich-T-kid

Copy link
Copy Markdown
Contributor Author

run benchmark boolean_kernels
env:
BENCH_FILTER: null_buffer_expand

Comment thread arrow-buffer/src/buffer/null.rs Outdated
@adriangbot

Copy link
Copy Markdown

🤖 Arrow criterion benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c5531008622-2123-hkwrl 6.12.94+ #1 SMP Fri Jul 17 09:42:57 UTC 2026 aarch64 GNU/Linux

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

Comparing rich-T-kid/optimize-NullBuff-expand (3395a25) to ec21627 (merge-base) diff

Run configuration
run benchmark boolean_kernels
env:
  BENCH_FILTER: "null_buffer_expand"

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


File an issue against this benchmark runner

@Rich-T-kid
Rich-T-kid marked this pull request as ready for review September 3, 2026 19:31
@adriangbot

Copy link
Copy Markdown

🤖 Arrow criterion benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c5531010377-2124-f8hr8 6.12.94+ #1 SMP Fri Jul 17 09:42:57 UTC 2026 aarch64 GNU/Linux

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

Comparing rich-T-kid/optimize-NullBuff-expand (4272daa) to ec21627 (merge-base) diff

Run configuration
run benchmark boolean_kernels
env:
  BENCH_FILTER: "null_buffer_expand"

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


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Arrow criterion benchmark completed (GKE) | trigger

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

Comparing rich-T-kid/optimize-NullBuff-expand (3395a25) to ec21627 (merge-base) diff

Run configuration
run benchmark boolean_kernels
env:
  BENCH_FILTER: "null_buffer_expand"
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                                    rich-T-kid_optimize-NullBuff-expand
-----                                    ----                                    -----------------------------------
null_buffer_expand/len=1024/count=128    80.16    47.4±0.09µs        ? ?/sec     1.00    591.4±3.68ns        ? ?/sec
null_buffer_expand/len=1024/count=96     61.26    34.2±0.03µs        ? ?/sec     1.00    558.2±1.83ns        ? ?/sec
null_buffer_expand/len=2048/count=192    118.37   138.8±0.17µs        ? ?/sec    1.00   1172.5±8.27ns        ? ?/sec
null_buffer_expand/len=2048/count=256    144.35   184.1±0.11µs        ? ?/sec    1.00   1275.2±6.43ns        ? ?/sec
null_buffer_expand/len=512/count=12      2.00      2.3±0.00µs        ? ?/sec     1.00   1141.7±1.45ns        ? ?/sec
null_buffer_expand/len=512/count=16      9.53      3.0±0.01µs        ? ?/sec     1.00    318.1±2.00ns        ? ?/sec

Resource Usage

base (merge-base)

Metric Value
Wall time 60.0s
Peak memory 10.5 MiB
Avg memory 8.6 MiB
CPU user 54.8s
CPU sys 0.0s
Peak spill 0 B

branch

Metric Value
Wall time 65.0s
Peak memory 10.5 MiB
Avg memory 8.1 MiB
CPU user 60.1s
CPU sys 0.0s
Peak spill 0 B

File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Arrow criterion benchmark completed (GKE) | trigger

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

Comparing rich-T-kid/optimize-NullBuff-expand (4272daa) to ec21627 (merge-base) diff

Run configuration
run benchmark boolean_kernels
env:
  BENCH_FILTER: "null_buffer_expand"
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                                    rich-T-kid_optimize-NullBuff-expand
-----                                    ----                                    -----------------------------------
null_buffer_expand/len=1024/count=128    80.45    47.4±0.08µs        ? ?/sec     1.00    589.4±2.36ns        ? ?/sec
null_buffer_expand/len=1024/count=96     61.45    34.2±0.03µs        ? ?/sec     1.00    556.3±1.32ns        ? ?/sec
null_buffer_expand/len=2048/count=192    117.53   138.9±0.26µs        ? ?/sec    1.00   1181.9±5.35ns        ? ?/sec
null_buffer_expand/len=2048/count=256    143.13   184.0±0.15µs        ? ?/sec    1.00   1285.7±7.63ns        ? ?/sec
null_buffer_expand/len=512/count=12      2.00      2.3±0.01µs        ? ?/sec     1.00   1141.0±0.76ns        ? ?/sec
null_buffer_expand/len=512/count=16      9.57      3.0±0.00µs        ? ?/sec     1.00    317.2±1.84ns        ? ?/sec

Resource Usage

base (merge-base)

Metric Value
Wall time 60.0s
Peak memory 10.5 MiB
Avg memory 8.6 MiB
CPU user 54.8s
CPU sys 0.0s
Peak spill 0 B

branch

Metric Value
Wall time 65.0s
Peak memory 10.5 MiB
Avg memory 8.1 MiB
CPU user 60.1s
CPU sys 0.0s
Peak spill 0 B

File an issue against this benchmark runner

@Rich-T-kid

Copy link
Copy Markdown
Contributor Author

run benchmark take_kernels
env:
BENCH_FILTER: fixed_size_list

@adriangbot

Copy link
Copy Markdown

🤖 Arrow criterion benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c5531187008-2125-lp7t5 6.12.94+ #1 SMP Fri Jul 17 09:42:57 UTC 2026 aarch64 GNU/Linux

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

Comparing rich-T-kid/optimize-NullBuff-expand (4272daa) to ec21627 (merge-base) diff

Run configuration
run benchmark take_kernels
env:
  BENCH_FILTER: "fixed_size_list"

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


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Arrow criterion benchmark completed (GKE) | trigger

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

Comparing rich-T-kid/optimize-NullBuff-expand (4272daa) to ec21627 (merge-base) diff

Run configuration
run benchmark take_kernels
env:
  BENCH_FILTER: "fixed_size_list"
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                                   rich-T-kid_optimize-NullBuff-expand
-----                                              ----                                   -----------------------------------
take fixed_size_list<i32>[22] 1024                 1.00      3.5±0.00µs        ? ?/sec    1.00      3.4±0.01µs        ? ?/sec
take fixed_size_list<i32>[22] null indices 1024    1.05     20.8±0.02µs        ? ?/sec    1.00     19.7±0.01µs        ? ?/sec
take fixed_size_list<i32>[22] null values 1024     1.05     21.7±0.01µs        ? ?/sec    1.00     20.7±0.01µs        ? ?/sec
take fixed_size_list<i32>[8] 1024                  1.01      2.8±0.01µs        ? ?/sec    1.00      2.8±0.00µs        ? ?/sec
take fixed_size_list<i32>[8] null indices 1024     2.32      9.4±0.01µs        ? ?/sec    1.00      4.1±0.00µs        ? ?/sec
take fixed_size_list<i32>[8] null values 1024      1.90     10.5±0.01µs        ? ?/sec    1.00      5.5±0.01µs        ? ?/sec

Resource Usage

base (merge-base)

Metric Value
Wall time 65.0s
Peak memory 16.4 MiB
Avg memory 13.9 MiB
CPU user 61.8s
CPU sys 0.0s
Peak spill 0 B

branch

Metric Value
Wall time 65.0s
Peak memory 16.4 MiB
Avg memory 13.8 MiB
CPU user 60.1s
CPU sys 0.0s
Peak spill 0 B

File an issue against this benchmark runner

@Jefffrey
Jefffrey merged commit 128d200 into apache:main Sep 4, 2026
41 checks passed
@Jefffrey

Jefffrey commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

thanks for this @Rich-T-kid

good numbers on the benchmarks 🚀

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-buffer performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Optimize NullBuffer::expand

3 participants