Skip to content

perf(arrow-select): add take_record_batch_unchecked to skip redundant bounds checks - #10945

Open
Rich-T-kid wants to merge 7 commits into
apache:mainfrom
Rich-T-kid:rich-T-kid/introduce-take_record_batch_unchecked
Open

perf(arrow-select): add take_record_batch_unchecked to skip redundant bounds checks#10945
Rich-T-kid wants to merge 7 commits into
apache:mainfrom
Rich-T-kid:rich-T-kid/introduce-take_record_batch_unchecked

Conversation

@Rich-T-kid

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

Copy link
Copy Markdown
Contributor

#10945 <- here, this PR is stacked on top of #10944
#10944

Which issue does this PR close?

Rationale for this change

take_record_batch previously called take per column, which always runs a bounds check on every index even when the caller already knows the indices are valid. For workloads doing repeated record batch takes with pre-validated indices — such as sort, merge, or filter pipelines — this check is redundant and measurable overhead. Benchmarks show ~13% speedup on primitive-column batches at 1024 rows when the check is skipped.
Image 9-1-26 at 2 28 PM

What changes are included in this PR?

  • Introduces pub unsafe fn take_record_batch_unchecked which bypasses index bounds checking by dispatching through take_impl::<_, false> directly

Are these changes tested?

yes, existing test + miri

Are there any user-facing changes?

new take_record_batch_unchecked() method.

@github-actions github-actions Bot added arrow Changes to the arrow crate arrow-select labels Sep 1, 2026
@Rich-T-kid Rich-T-kid changed the title Rich t kid/introduce take record batch unchecked perf(arrow-select): add take_record_batch_unchecked to skip redundant bounds checks Sep 1, 2026
@Rich-T-kid

Copy link
Copy Markdown
Contributor Author

run benchmark take_kernel

@adriangbot

Copy link
Copy Markdown

🤖 Arrow criterion benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c5498580695-2065-v7jf2 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/introduce-take_record_batch_unchecked (47e2de0) to 27a6a40 (merge-base) diff

Run configuration
run benchmark take_kernel

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


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

Benchmark for this request failed before finishing (Kubernetes reason: BackoffLimitExceeded).

Benchmarks requested: take_kernel

Kubernetes message
Job has reached the specified backoff limit

File an issue against this benchmark runner

@Rich-T-kid

Copy link
Copy Markdown
Contributor Author

run benchmark take_kernel

@adriangbot

Copy link
Copy Markdown

🤖 Arrow criterion benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c5499301598-2066-x9drv 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/introduce-take_record_batch_unchecked (47e2de0) to 27a6a40 (merge-base) diff

Run configuration
run benchmark take_kernel

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


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

Benchmark for this request failed before finishing (Kubernetes reason: BackoffLimitExceeded).

Benchmarks requested: take_kernel

Kubernetes message
Job has reached the specified backoff limit

File an issue against this benchmark runner

Comment thread arrow-select/src/take.rs
.map(|c| take(c, indices, None))
.collect::<Result<Vec<_>, _>>()?;
RecordBatch::try_new(record_batch.schema(), columns)
unsafe { take_record_batch_unchecked(record_batch, indices) }

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.

i think this is only safe when doing it on subsequent columns after the first column; the idea being that after doing (checked) take on the first column, we know for the next columns all indices are within bounds (otherwise wouldve panicked) since invariant of record batch is all columns are of same length

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ah this is my mistake, was rushing when I pushed this and forgot to revert this. this was only placed here to compare the existing benchmarks.

the point of introducing the unsafe take_record_batch_unchecked was to allow users to opt into the unsafe code clearly, forcing them to add in unsafe blocks to their code.

will remove

@Rich-T-kid Rich-T-kid Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ill push the update after we can view the benchmark results, from @adriangbot

@Jefffrey

Jefffrey commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

seems like take kernels are too big by now to run all at once; we'll need to run with filters 🤔

@Rich-T-kid

Copy link
Copy Markdown
Contributor Author

run benchmark take_kernel
env:
BENCH_FILTER: record batch

@adriangbot

Copy link
Copy Markdown

🤖 Arrow criterion benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c5503165150-2075-25gpc 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/introduce-take_record_batch_unchecked (47e2de0) to 27a6a40 (merge-base) diff

Run configuration
run benchmark take_kernel
env:
  BENCH_FILTER: "record batch"

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


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

Benchmark for this request failed before finishing (Kubernetes reason: BackoffLimitExceeded).

Benchmarks requested: take_kernel

Kubernetes message
Job has reached the specified backoff limit

File an issue against this benchmark runner

@Rich-T-kid

Copy link
Copy Markdown
Contributor Author

run benchmark take_kernel
env:
BENCH_FILTER: take_record_batch

@adriangbot

Copy link
Copy Markdown

Hi @Rich-T-kid, your benchmark configuration could not be parsed (#10945 (comment)).

Error: invalid configuration: unknown field BENCH_FILTER, expected one of env, baseline, changed at line 2 column 1

Usage:

run benchmark <name>           # run specific benchmark(s)
run benchmarks                 # run default suite
run benchmarks <name1> <name2> # run specific benchmarks

Any benchmark name is accepted: bench.sh suite names (e.g. tpch, clickbench_partitioned, wide_schema) and Criterion bench targets (e.g. sql_planner) are resolved automatically. A name that matches neither fails on the runner.

Per-side configuration (run benchmark tpch followed by):

env:
# shared env is inherited by BOTH the build and the run, so build
# flags go here. Builds default to no debuginfo for speed; opt back
# in for hung-job gdb dumps and cap jobs to stay within memory:
CARGO_PROFILE_RELEASE_DEBUG: "1"
CARGO_BUILD_JOBS: "1"
baseline:
ref: v45.0.0
env:
# per-side env only reaches the benchmark run, not the build
DATAFUSION_RUNTIME_MEMORY_LIMIT: 1G
changed:
ref: v46.0.0
env:
DATAFUSION_RUNTIME_MEMORY_LIMIT: 2G

File an issue against this benchmark runner

@Rich-T-kid

Copy link
Copy Markdown
Contributor Author

run benchmark take_kernel
env:
BENCH_FILTER: take_record_batch

@adriangbot

Copy link
Copy Markdown

🤖 Arrow criterion benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c5503236972-2076-csjjw 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/introduce-take_record_batch_unchecked (47e2de0) to 27a6a40 (merge-base) diff

Run configuration
run benchmark take_kernel
env:
  BENCH_FILTER: "take_record_batch"

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


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

Benchmark for this request failed before finishing (Kubernetes reason: BackoffLimitExceeded).

Benchmarks requested: take_kernel

Kubernetes message
Job has reached the specified backoff limit

File an issue against this benchmark runner

@Rich-T-kid

Copy link
Copy Markdown
Contributor Author

run benchmark take_kernel
env:
BENCH_FILTER: take_record_batch

@adriangbot

Copy link
Copy Markdown

🤖 Arrow criterion benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c5503740178-2077-gghns 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/introduce-take_record_batch_unchecked (47e2de0) to 27a6a40 (merge-base) diff

Run configuration
run benchmark take_kernel
env:
  BENCH_FILTER: "take_record_batch"

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


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

Benchmark for this request failed before finishing (Kubernetes reason: BackoffLimitExceeded).

Benchmarks requested: take_kernel

Kubernetes message
Job has reached the specified backoff limit

File an issue against this benchmark runner

@Rich-T-kid
Rich-T-kid force-pushed the rich-T-kid/introduce-take_record_batch_unchecked branch from 47e2de0 to 176446c Compare September 2, 2026 03:13
@Rich-T-kid

Copy link
Copy Markdown
Contributor Author

show benchmark queue

@adriangbot

Copy link
Copy Markdown

Hi @Rich-T-kid, you asked to view the benchmark queue (#10945 (comment)).

No pending jobs.


File an issue against this benchmark runner

@Rich-T-kid

Copy link
Copy Markdown
Contributor Author

run benchmark take_kernel
env:
BENCH_FILTER: take_record_batch

@adriangbot

Copy link
Copy Markdown

🤖 Arrow criterion benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c5504289314-2078-znlns 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/introduce-take_record_batch_unchecked (176446c) to 6e728ce (merge-base) diff

Run configuration
run benchmark take_kernel
env:
  BENCH_FILTER: "take_record_batch"

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


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

Benchmark for this request failed before finishing (Kubernetes reason: BackoffLimitExceeded).

Benchmarks requested: take_kernel

Kubernetes message
Job has reached the specified backoff limit

File an issue against this benchmark runner

@Rich-T-kid

Copy link
Copy Markdown
Contributor Author

run benchmark take_kernel
env:
BENCH_FILTER: take_record_batch

@adriangbot

Copy link
Copy Markdown

🤖 Arrow criterion benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c5510098487-2081-zx4gw 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/introduce-take_record_batch_unchecked (03d57b2) to 027b45f (merge-base) diff

Run configuration
run benchmark take_kernel
env:
  BENCH_FILTER: "take_record_batch"

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


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

Benchmark for this request failed before finishing (Kubernetes reason: BackoffLimitExceeded).

Benchmarks requested: take_kernel

Kubernetes message
Job has reached the specified backoff limit

File an issue against this benchmark runner

@Rich-T-kid

Copy link
Copy Markdown
Contributor Author

wow Ive been forgetting the s this whole time

@Rich-T-kid
Rich-T-kid force-pushed the rich-T-kid/introduce-take_record_batch_unchecked branch from 03d57b2 to fc38b7d Compare September 2, 2026 17:46
@Rich-T-kid

Copy link
Copy Markdown
Contributor Author

run benchmark take_kernels

@adriangbot

Copy link
Copy Markdown

🤖 Arrow criterion benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c5513880892-2098-zvm4v 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/introduce-take_record_batch_unchecked (fc38b7d) to 6e728ce (merge-base) diff

Run configuration
run benchmark take_kernels

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/introduce-take_record_batch_unchecked (fc38b7d) to 6e728ce (merge-base) diff

Run configuration
run benchmark take_kernels
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_introduce-take_record_batch_unchecked
-----                                                                       ----                                   ------------------------------------------------
take bool 1024                                                              1.00    609.6±3.34ns        ? ?/sec    1.00    611.3±0.90ns        ? ?/sec
take bool 512                                                               1.00    353.6±1.26ns        ? ?/sec    1.00    353.4±0.45ns        ? ?/sec
take bool null indices 1024                                                 1.01    727.7±7.32ns        ? ?/sec    1.00    723.0±1.05ns        ? ?/sec
take bool null values 1024                                                  1.02   1122.6±2.01ns        ? ?/sec    1.00   1100.7±0.56ns        ? ?/sec
take bool null values null indices 1024                                     1.00   1121.8±0.69ns        ? ?/sec    1.00   1126.6±0.99ns        ? ?/sec
take check bounds i32 1024                                                  1.01    662.8±1.59ns        ? ?/sec    1.00    653.6±1.70ns        ? ?/sec
take check bounds i32 512                                                   1.20    459.6±1.73ns        ? ?/sec    1.00    383.4±0.95ns        ? ?/sec
take dense union 1024                                                       1.03      7.5±0.02µs        ? ?/sec    1.00      7.3±0.01µs        ? ?/sec
take dense union 512                                                        1.00      5.0±0.01µs        ? ?/sec    1.00      5.0±0.01µs        ? ?/sec
take fixed_size_list<i32>[22] 1024                                          1.00      3.5±0.01µs        ? ?/sec    1.01      3.5±0.01µs        ? ?/sec
take fixed_size_list<i32>[22] null indices 1024                             1.00     19.7±0.01µs        ? ?/sec    1.01     19.8±0.02µs        ? ?/sec
take fixed_size_list<i32>[22] null values 1024                              1.00     20.6±0.01µs        ? ?/sec    1.00     20.6±0.02µs        ? ?/sec
take fixed_size_list<i32>[8] 1024                                           1.00      2.8±0.00µs        ? ?/sec    1.00      2.8±0.01µs        ? ?/sec
take fixed_size_list<i32>[8] null indices 1024                              1.00      9.1±0.00µs        ? ?/sec    1.01      9.1±0.01µs        ? ?/sec
take fixed_size_list<i32>[8] null values 1024                               1.00     10.2±0.01µs        ? ?/sec    1.00     10.2±0.01µs        ? ?/sec
take fsb value len: 12, indices: 1024                                       1.00   1710.7±1.91ns        ? ?/sec    1.09   1864.9±1.33ns        ? ?/sec
take fsb value len: 12, null values, indices: 1024                          1.00      2.3±0.00µs        ? ?/sec    1.07      2.5±0.00µs        ? ?/sec
take fsb value optimized len: 16, indices: 1024                             1.00    603.6±0.82ns        ? ?/sec    1.06    637.2±3.56ns        ? ?/sec
take fsb value optimized len: 16, null values, indices: 1024                1.00   1201.0±1.07ns        ? ?/sec    1.03   1240.7±4.85ns        ? ?/sec
take i32 1024                                                               1.02    525.4±1.94ns        ? ?/sec    1.00    513.8±1.19ns        ? ?/sec
take i32 512                                                                1.00    352.0±2.78ns        ? ?/sec    1.00    351.0±1.40ns        ? ?/sec
take i32 null indices 1024                                                  1.00    855.8±1.40ns        ? ?/sec    1.00    854.0±1.91ns        ? ?/sec
take i32 null values 1024                                                   1.01   1119.6±2.47ns        ? ?/sec    1.00   1111.9±2.10ns        ? ?/sec
take i32 null values null indices 1024                                      1.00   1543.1±2.92ns        ? ?/sec    1.02   1569.4±3.15ns        ? ?/sec
take list i32 1024                                                          1.00      5.2±0.05µs        ? ?/sec    1.04      5.4±0.19µs        ? ?/sec
take list i32 512                                                           1.00      2.9±0.03µs        ? ?/sec    1.02      2.9±0.07µs        ? ?/sec
take list i32 null indices 1024                                             1.03      8.7±0.06µs        ? ?/sec    1.00      8.5±0.07µs        ? ?/sec
take list i32 null values 1024                                              1.00      4.0±0.03µs        ? ?/sec    1.01      4.1±0.06µs        ? ?/sec
take list i32 null values null indices 1024                                 1.00      6.9±0.04µs        ? ?/sec    1.02      7.1±0.05µs        ? ?/sec
take listview i32 1024                                                      1.07   1041.6±1.02ns        ? ?/sec    1.00    975.2±2.69ns        ? ?/sec
take listview i32 512                                                       1.00    610.5±1.19ns        ? ?/sec    1.00    611.1±2.72ns        ? ?/sec
take listview i32 null indices 1024                                         1.02   1615.4±3.25ns        ? ?/sec    1.00   1586.6±2.20ns        ? ?/sec
take listview i32 null values 1024                                          1.00   1540.3±1.85ns        ? ?/sec    1.00   1544.6±2.08ns        ? ?/sec
take listview i32 null values null indices 1024                             1.00      2.3±0.00µs        ? ?/sec    1.03      2.3±0.00µs        ? ?/sec
take map<str, i32> 1024                                                     1.00     33.9±0.03µs        ? ?/sec    1.00     34.0±0.03µs        ? ?/sec
take map<str, i32> 512                                                      1.00     19.5±0.02µs        ? ?/sec    1.00     19.5±0.02µs        ? ?/sec
take map<str, i32> null indices 1024                                        1.01     20.4±0.04µs        ? ?/sec    1.00     20.2±0.06µs        ? ?/sec
take map<str, i32> null values 1024                                         1.00     20.7±0.03µs        ? ?/sec    1.00     20.7±0.07µs        ? ?/sec
take primitive run logical len: 1024, physical len: 512, indices: 1024      1.00     18.6±0.02µs        ? ?/sec    1.00     18.7±0.02µs        ? ?/sec
take sparse union 1024                                                      1.03      7.8±0.02µs        ? ?/sec    1.00      7.5±0.02µs        ? ?/sec
take sparse union 512                                                       1.03      4.8±0.01µs        ? ?/sec    1.00      4.6±0.01µs        ? ?/sec
take str 1024                                                               1.00      8.0±0.01µs        ? ?/sec    1.02      8.2±0.00µs        ? ?/sec
take str 512                                                                1.00      3.7±0.00µs        ? ?/sec    1.06      3.9±0.02µs        ? ?/sec
take str null indices 1024                                                  1.04      4.5±0.06µs        ? ?/sec    1.00      4.3±0.05µs        ? ?/sec
take str null indices 512                                                   1.04      2.1±0.04µs        ? ?/sec    1.00      2.1±0.02µs        ? ?/sec
take str null values 1024                                                   1.00      4.5±0.06µs        ? ?/sec    1.00      4.5±0.04µs        ? ?/sec
take str null values null indices 1024                                      1.00      3.0±0.03µs        ? ?/sec    1.02      3.1±0.02µs        ? ?/sec
take string run logical len: 1024, physical len: 128, indices: 1024         1.00     24.0±0.10µs        ? ?/sec    1.00     24.0±0.11µs        ? ?/sec
take string run logical len: 1024, physical len: 512, indices: 1024         1.00     24.2±0.10µs        ? ?/sec    1.01     24.4±0.12µs        ? ?/sec
take string run logical len: 1024, physical len: 512, null indices: 1024    1.00     16.7±0.06µs        ? ?/sec    1.03     17.3±0.06µs        ? ?/sec
take stringview 1024                                                        1.00    674.5±1.36ns        ? ?/sec    1.24    836.2±1.33ns        ? ?/sec
take stringview 512                                                         1.00    409.5±1.59ns        ? ?/sec    1.20    491.2±1.58ns        ? ?/sec
take stringview null indices 1024                                           1.00    843.7±0.70ns        ? ?/sec    1.00    844.5±0.83ns        ? ?/sec
take stringview null indices 512                                            1.00    500.6±0.59ns        ? ?/sec    1.01    504.1±0.57ns        ? ?/sec
take stringview null values 1024                                            1.00   1242.8±0.69ns        ? ?/sec    1.13   1399.9±0.52ns        ? ?/sec
take stringview null values null indices 1024                               1.05   1569.7±1.22ns        ? ?/sec    1.00   1494.0±1.87ns        ? ?/sec
take_record_batch 5 primitive cols no nulls 1024                            1.04      3.0±0.01µs        ? ?/sec    1.00      2.9±0.00µs        ? ?/sec
take_record_batch 6 string/binary cols no nulls 1024                        1.01     27.0±0.04µs        ? ?/sec    1.00     26.8±0.05µs        ? ?/sec
take_record_batch 7 mixed cols null values 1024                             1.03     14.1±0.11µs        ? ?/sec    1.00     13.7±0.10µs        ? ?/sec
take_record_batch 7 mixed cols null values null indices 1024                1.00     13.4±0.05µs        ? ?/sec    1.03     13.8±0.05µs        ? ?/sec

Resource Usage

base (merge-base)

Metric Value
Wall time 580.1s
Peak memory 18.4 MiB
Avg memory 14.4 MiB
CPU user 578.4s
CPU sys 0.0s
Peak spill 0 B

branch

Metric Value
Wall time 585.1s
Peak memory 17.6 MiB
Avg memory 14.3 MiB
CPU user 579.7s
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

@adriangbot

Copy link
Copy Markdown

🤖 Arrow criterion benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c5514280517-2102-lrd2m 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/introduce-take_record_batch_unchecked (fc38b7d) to 6e728ce (merge-base) diff

Run configuration
run benchmark take_kernels

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/introduce-take_record_batch_unchecked (fc38b7d) to 6e728ce (merge-base) diff

Run configuration
run benchmark take_kernels
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_introduce-take_record_batch_unchecked
-----                                                                       ----                                   ------------------------------------------------
take bool 1024                                                              1.00    608.3±0.73ns        ? ?/sec    1.01    612.0±0.65ns        ? ?/sec
take bool 512                                                               1.00    352.6±0.49ns        ? ?/sec    1.00    352.3±0.46ns        ? ?/sec
take bool null indices 1024                                                 1.01    728.5±8.79ns        ? ?/sec    1.00    723.0±1.09ns        ? ?/sec
take bool null values 1024                                                  1.00   1080.1±1.99ns        ? ?/sec    1.02   1100.6±0.52ns        ? ?/sec
take bool null values null indices 1024                                     1.00   1124.2±2.46ns        ? ?/sec    1.01  1140.4±18.86ns        ? ?/sec
take check bounds i32 1024                                                  1.01    663.1±1.88ns        ? ?/sec    1.00    658.4±2.63ns        ? ?/sec
take check bounds i32 512                                                   1.19    459.7±1.89ns        ? ?/sec    1.00    384.8±1.93ns        ? ?/sec
take dense union 1024                                                       1.04      7.8±0.01µs        ? ?/sec    1.00      7.4±0.01µs        ? ?/sec
take dense union 512                                                        1.00      4.9±0.01µs        ? ?/sec    1.03      5.0±0.01µs        ? ?/sec
take fixed_size_list<i32>[22] 1024                                          1.00      3.4±0.01µs        ? ?/sec    1.01      3.5±0.00µs        ? ?/sec
take fixed_size_list<i32>[22] null indices 1024                             1.00     19.8±0.01µs        ? ?/sec    1.00     19.8±0.02µs        ? ?/sec
take fixed_size_list<i32>[22] null values 1024                              1.00     20.6±0.09µs        ? ?/sec    1.00     20.6±0.01µs        ? ?/sec
take fixed_size_list<i32>[8] 1024                                           1.00      2.8±0.00µs        ? ?/sec    1.00      2.8±0.01µs        ? ?/sec
take fixed_size_list<i32>[8] null indices 1024                              1.00      9.1±0.00µs        ? ?/sec    1.00      9.1±0.01µs        ? ?/sec
take fixed_size_list<i32>[8] null values 1024                               1.00     10.2±0.01µs        ? ?/sec    1.00     10.1±0.01µs        ? ?/sec
take fsb value len: 12, indices: 1024                                       1.00   1709.6±1.40ns        ? ?/sec    1.09   1868.5±4.01ns        ? ?/sec
take fsb value len: 12, null values, indices: 1024                          1.00      2.3±0.00µs        ? ?/sec    1.07      2.5±0.00µs        ? ?/sec
take fsb value optimized len: 16, indices: 1024                             1.04    659.0±1.26ns        ? ?/sec    1.00    636.0±3.95ns        ? ?/sec
take fsb value optimized len: 16, null values, indices: 1024                1.00   1200.7±1.68ns        ? ?/sec    1.00   1205.8±2.69ns        ? ?/sec
take i32 1024                                                               1.01    524.5±1.25ns        ? ?/sec    1.00    520.1±5.90ns        ? ?/sec
take i32 512                                                                1.00    350.2±1.53ns        ? ?/sec    1.01    352.0±1.20ns        ? ?/sec
take i32 null indices 1024                                                  1.00    856.4±1.64ns        ? ?/sec    1.00    854.9±2.41ns        ? ?/sec
take i32 null values 1024                                                   1.01   1120.7±2.51ns        ? ?/sec    1.00   1111.6±3.38ns        ? ?/sec
take i32 null values null indices 1024                                      1.00   1542.8±2.99ns        ? ?/sec    1.02   1567.2±4.35ns        ? ?/sec
take list i32 1024                                                          1.00      5.2±0.06µs        ? ?/sec    1.01      5.3±0.05µs        ? ?/sec
take list i32 512                                                           1.00      2.8±0.03µs        ? ?/sec    1.01      2.9±0.02µs        ? ?/sec
take list i32 null indices 1024                                             1.00      8.4±0.04µs        ? ?/sec    1.00      8.5±0.04µs        ? ?/sec
take list i32 null values 1024                                              1.00      4.0±0.03µs        ? ?/sec    1.02      4.1±0.02µs        ? ?/sec
take list i32 null values null indices 1024                                 1.01      7.0±0.04µs        ? ?/sec    1.00      6.9±0.04µs        ? ?/sec
take listview i32 1024                                                      1.06   1032.9±1.37ns        ? ?/sec    1.00    972.7±1.26ns        ? ?/sec
take listview i32 512                                                       1.00    605.5±1.65ns        ? ?/sec    1.00    608.1±1.28ns        ? ?/sec
take listview i32 null indices 1024                                         1.05   1671.5±2.48ns        ? ?/sec    1.00   1585.6±2.06ns        ? ?/sec
take listview i32 null values 1024                                          1.00   1521.7±1.86ns        ? ?/sec    1.02   1546.1±1.69ns        ? ?/sec
take listview i32 null values null indices 1024                             1.00      2.3±0.00µs        ? ?/sec    1.03      2.3±0.00µs        ? ?/sec
take map<str, i32> 1024                                                     1.00     33.8±0.06µs        ? ?/sec    1.01     34.0±0.04µs        ? ?/sec
take map<str, i32> 512                                                      1.00     19.4±0.02µs        ? ?/sec    1.00     19.5±0.02µs        ? ?/sec
take map<str, i32> null indices 1024                                        1.00     20.3±0.04µs        ? ?/sec    1.00     20.3±0.04µs        ? ?/sec
take map<str, i32> null values 1024                                         1.00     20.5±0.03µs        ? ?/sec    1.01     20.6±0.03µs        ? ?/sec
take primitive run logical len: 1024, physical len: 512, indices: 1024      1.00     18.6±0.08µs        ? ?/sec    1.02     18.9±0.02µs        ? ?/sec
take sparse union 1024                                                      1.01      7.7±0.01µs        ? ?/sec    1.00      7.6±0.01µs        ? ?/sec
take sparse union 512                                                       1.01      4.7±0.01µs        ? ?/sec    1.00      4.6±0.01µs        ? ?/sec
take str 1024                                                               1.00      8.1±0.00µs        ? ?/sec    1.02      8.2±0.00µs        ? ?/sec
take str 512                                                                1.00      3.8±0.00µs        ? ?/sec    1.02      3.9±0.01µs        ? ?/sec
take str null indices 1024                                                  1.02      4.4±0.06µs        ? ?/sec    1.00      4.3±0.06µs        ? ?/sec
take str null indices 512                                                   1.02      2.1±0.03µs        ? ?/sec    1.00      2.1±0.03µs        ? ?/sec
take str null values 1024                                                   1.00      4.4±0.05µs        ? ?/sec    1.01      4.5±0.05µs        ? ?/sec
take str null values null indices 1024                                      1.02      3.2±0.02µs        ? ?/sec    1.00      3.1±0.02µs        ? ?/sec
take string run logical len: 1024, physical len: 128, indices: 1024         1.00     24.1±0.12µs        ? ?/sec    1.00     24.0±0.10µs        ? ?/sec
take string run logical len: 1024, physical len: 512, indices: 1024         1.00     24.4±0.12µs        ? ?/sec    1.00     24.4±0.10µs        ? ?/sec
take string run logical len: 1024, physical len: 512, null indices: 1024    1.00     16.9±0.06µs        ? ?/sec    1.02     17.2±0.12µs        ? ?/sec
take stringview 1024                                                        1.00    749.1±1.24ns        ? ?/sec    1.13    843.2±2.47ns        ? ?/sec
take stringview 512                                                         1.00    476.1±1.15ns        ? ?/sec    1.04    495.9±4.84ns        ? ?/sec
take stringview null indices 1024                                           1.01    850.5±0.40ns        ? ?/sec    1.00    845.9±2.10ns        ? ?/sec
take stringview null indices 512                                            1.00    504.7±0.71ns        ? ?/sec    1.01    507.3±2.29ns        ? ?/sec
take stringview null values 1024                                            1.00   1233.5±0.73ns        ? ?/sec    1.14   1405.5±1.88ns        ? ?/sec
take stringview null values null indices 1024                               1.01   1509.3±3.99ns        ? ?/sec    1.00   1492.9±1.92ns        ? ?/sec
take_record_batch 5 primitive cols no nulls 1024                            1.01      3.0±0.01µs        ? ?/sec    1.00      3.0±0.01µs        ? ?/sec
take_record_batch 6 string/binary cols no nulls 1024                        1.03     27.5±0.05µs        ? ?/sec    1.00     26.7±0.03µs        ? ?/sec
take_record_batch 7 mixed cols null values 1024                             1.02     13.9±0.09µs        ? ?/sec    1.00     13.7±0.08µs        ? ?/sec
take_record_batch 7 mixed cols null values null indices 1024                1.00     13.4±0.04µs        ? ?/sec    1.03     13.8±0.04µs        ? ?/sec

Resource Usage

base (merge-base)

Metric Value
Wall time 585.1s
Peak memory 17.9 MiB
Avg memory 14.1 MiB
CPU user 579.4s
CPU sys 0.0s
Peak spill 0 B

branch

Metric Value
Wall time 580.1s
Peak memory 17.5 MiB
Avg memory 14.4 MiB
CPU user 576.7s
CPU sys 0.0s
Peak spill 0 B

File an issue against this benchmark runner

@Rich-T-kid

Copy link
Copy Markdown
Contributor Author
Image 9-2-26 at 3 09 PM

not sure why theres no sign of improvement with @adriangbot

@Rich-T-kid

Copy link
Copy Markdown
Contributor Author

@JakeDern I know you had a similar issues for your PR. do you see anything similar that in this PR that is causing the discrepancy

Comment thread arrow-select/src/take.rs
record_batch: &RecordBatch,
indices: &dyn Array,
) -> Result<RecordBatch, ArrowError> {
downcast_integer_array!(

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.

Just catching up on this PR, so maybe dumb question on my part - Is there a reason we don't call the existing take with options.check_bounds = false ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

the TLDR is that check_bounds refers to

fn check_bounds<T: ArrowPrimitiveType>(
    len: usize,
    indices: &PrimitiveArray<T>,
) -> Result<(), ArrowError>

it checks that all the indices are valid within the arrays so something like

let int_values = int32Array::from([1,2,3,4,5]);
let indices = int32Array::from([1,20,200]);
take(int_values,indices);

fails before any of the take_impl branches run.

thats what I thought the linked issue (#8879) was referring to but, skipping this check is as simple as take(array,None) which skips the bounds checks.

PRs before this one threaded a const generic through the take_impl branches, enabling code paths that use unsafe accessor methods to grab array values directly, which should be slightly faster. These paths only get used with take_impl<_, false>, since that pushes the safety guarantees onto the caller. The code's also structured so hot loops don't recheck that value on every iteration, since that would probably cost more than it saves.

Then there's this PR, which adds the final piece: threading all the variants together.

@JakeDern

JakeDern commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

@JakeDern I know you had a similar issues for your PR. do you see anything similar that in this PR that is causing the discrepancy

Hmm I gave it a quick look and unless I'm missing something the only difference this makes is just skipping the check_bounds call per array? I wish I could spot something, but I don't think my issue applies as it doesn't appear to me to change any drop behavior.

Only thing I know to do next is either get a machine with the same processor and bust out perf or you could cross compile for ARM64 and try to stare at the disassembly/feed it into an LLM. In my case cross compiling wasn't enough as the behavior was processor specific, but in yours it might reveal something.

@Rich-T-kid

Rich-T-kid commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

@JakeDern I know you had a similar issues for your PR. do you see anything similar that in this PR that is causing the discrepancy

Hmm I gave it a quick look and unless I'm missing something the only difference this makes is just skipping the check_bounds call per array? I wish I could spot something, but I don't think my issue applies as it doesn't appear to me to change any drop behavior.

Only thing I know to do next is either get a machine with the same processor and bust out perf or you could cross compile for ARM64 and try to stare at the disassembly/feed it into an LLM. In my case cross compiling wasn't enough as the behavior was processor specific, but in yours it might reveal something.

@JakeDern alright I'll continue searching. thank you for taking a look + the suggestion

@Rich-T-kid

Copy link
Copy Markdown
Contributor Author

run benchmark take_kernels

1 similar comment
@Rich-T-kid

Copy link
Copy Markdown
Contributor Author

run benchmark take_kernels

@adriangbot

Copy link
Copy Markdown

🤖 Arrow criterion benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c5519994676-2113-zfsg9 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/introduce-take_record_batch_unchecked (9d34600) to 6e728ce (merge-base) diff

Run configuration
run benchmark take_kernels

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 running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c5519993830-2112-qr5zw 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/introduce-take_record_batch_unchecked (9d34600) to 6e728ce (merge-base) diff

Run configuration
run benchmark take_kernels

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/introduce-take_record_batch_unchecked (9d34600) to 6e728ce (merge-base) diff

Run configuration
run benchmark take_kernels
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_introduce-take_record_batch_unchecked
-----                                                                       ----                                   ------------------------------------------------
take bool 1024                                                              1.00    608.4±1.04ns        ? ?/sec    1.01    613.0±1.05ns        ? ?/sec
take bool 512                                                               1.01    355.4±0.74ns        ? ?/sec    1.00    352.2±0.71ns        ? ?/sec
take bool null indices 1024                                                 1.01   748.2±11.21ns        ? ?/sec    1.00   739.8±15.49ns        ? ?/sec
take bool null values 1024                                                  1.00   1081.2±2.80ns        ? ?/sec    1.02   1100.8±0.78ns        ? ?/sec
take bool null values null indices 1024                                     1.00   1125.0±3.84ns        ? ?/sec    1.00   1129.8±2.25ns        ? ?/sec
take check bounds i32 1024                                                  1.02    664.1±2.76ns        ? ?/sec    1.00    652.7±1.62ns        ? ?/sec
take check bounds i32 512                                                   1.20    462.2±2.39ns        ? ?/sec    1.00    384.5±1.18ns        ? ?/sec
take dense union 1024                                                       1.00      7.4±0.01µs        ? ?/sec    1.00      7.5±0.01µs        ? ?/sec
take dense union 512                                                        1.03      5.2±0.01µs        ? ?/sec    1.00      5.0±0.01µs        ? ?/sec
take fixed_size_list<i32>[22] 1024                                          1.00      3.5±0.01µs        ? ?/sec    1.00      3.5±0.00µs        ? ?/sec
take fixed_size_list<i32>[22] null indices 1024                             1.00     19.7±0.01µs        ? ?/sec    1.06     20.9±0.01µs        ? ?/sec
take fixed_size_list<i32>[22] null values 1024                              1.00     20.6±0.01µs        ? ?/sec    1.05     21.6±0.01µs        ? ?/sec
take fixed_size_list<i32>[8] 1024                                           1.00      2.8±0.01µs        ? ?/sec    1.00      2.8±0.00µs        ? ?/sec
take fixed_size_list<i32>[8] null indices 1024                              1.00      9.1±0.01µs        ? ?/sec    1.04      9.5±0.01µs        ? ?/sec
take fixed_size_list<i32>[8] null values 1024                               1.00     10.2±0.01µs        ? ?/sec    1.02     10.5±0.01µs        ? ?/sec
take fsb value len: 12, indices: 1024                                       1.00   1721.7±0.99ns        ? ?/sec    1.09   1869.7±3.75ns        ? ?/sec
take fsb value len: 12, null values, indices: 1024                          1.00      2.4±0.00µs        ? ?/sec    1.04      2.5±0.00µs        ? ?/sec
take fsb value optimized len: 16, indices: 1024                             1.00    594.3±1.45ns        ? ?/sec    1.00    591.6±1.30ns        ? ?/sec
take fsb value optimized len: 16, null values, indices: 1024                1.00   1191.3±0.82ns        ? ?/sec    1.01   1200.4±1.48ns        ? ?/sec
take i32 1024                                                               1.02    527.5±2.22ns        ? ?/sec    1.00    516.5±4.89ns        ? ?/sec
take i32 512                                                                1.00    350.4±1.84ns        ? ?/sec    1.00    351.3±1.52ns        ? ?/sec
take i32 null indices 1024                                                  1.01    858.1±2.21ns        ? ?/sec    1.00    853.8±1.54ns        ? ?/sec
take i32 null values 1024                                                   1.01   1122.8±3.19ns        ? ?/sec    1.00   1116.1±1.20ns        ? ?/sec
take i32 null values null indices 1024                                      1.00   1551.5±4.75ns        ? ?/sec    1.01   1566.8±2.18ns        ? ?/sec
take list i32 1024                                                          1.00      5.2±0.06µs        ? ?/sec    1.01      5.3±0.06µs        ? ?/sec
take list i32 512                                                           1.00      2.8±0.02µs        ? ?/sec    1.01      2.9±0.03µs        ? ?/sec
take list i32 null indices 1024                                             1.04      8.8±0.04µs        ? ?/sec    1.00      8.4±0.05µs        ? ?/sec
take list i32 null values 1024                                              1.00      4.0±0.02µs        ? ?/sec    1.01      4.0±0.03µs        ? ?/sec
take list i32 null values null indices 1024                                 1.00      7.0±0.04µs        ? ?/sec    1.00      7.0±0.04µs        ? ?/sec
take listview i32 1024                                                      1.00    963.0±3.15ns        ? ?/sec    1.02    985.2±1.20ns        ? ?/sec
take listview i32 512                                                       1.00    612.2±3.41ns        ? ?/sec    1.00    610.7±1.22ns        ? ?/sec
take listview i32 null indices 1024                                         1.06   1676.3±2.71ns        ? ?/sec    1.00   1586.3±2.33ns        ? ?/sec
take listview i32 null values 1024                                          1.00   1542.7±3.43ns        ? ?/sec    1.01   1563.6±2.06ns        ? ?/sec
take listview i32 null values null indices 1024                             1.01      2.4±0.01µs        ? ?/sec    1.00      2.3±0.00µs        ? ?/sec
take map<str, i32> 1024                                                     1.00     34.1±0.05µs        ? ?/sec    1.00     34.0±0.05µs        ? ?/sec
take map<str, i32> 512                                                      1.02     19.6±0.03µs        ? ?/sec    1.00     19.2±0.02µs        ? ?/sec
take map<str, i32> null indices 1024                                        1.01     20.4±0.03µs        ? ?/sec    1.00     20.2±0.04µs        ? ?/sec
take map<str, i32> null values 1024                                         1.01     20.6±0.03µs        ? ?/sec    1.00     20.5±0.03µs        ? ?/sec
take primitive run logical len: 1024, physical len: 512, indices: 1024      1.00     18.8±0.05µs        ? ?/sec    1.00     18.7±0.01µs        ? ?/sec
take sparse union 1024                                                      1.01      7.6±0.01µs        ? ?/sec    1.00      7.5±0.01µs        ? ?/sec
take sparse union 512                                                       1.00      4.7±0.01µs        ? ?/sec    1.00      4.7±0.02µs        ? ?/sec
take str 1024                                                               1.00      8.1±0.01µs        ? ?/sec    1.01      8.2±0.00µs        ? ?/sec
take str 512                                                                1.00      3.8±0.00µs        ? ?/sec    1.02      3.9±0.01µs        ? ?/sec
take str null indices 1024                                                  1.03      4.5±0.07µs        ? ?/sec    1.00      4.3±0.06µs        ? ?/sec
take str null indices 512                                                   1.07      2.2±0.03µs        ? ?/sec    1.00      2.0±0.03µs        ? ?/sec
take str null values 1024                                                   1.00      4.5±0.06µs        ? ?/sec    1.00      4.5±0.04µs        ? ?/sec
take str null values null indices 1024                                      1.00      3.1±0.02µs        ? ?/sec    1.01      3.1±0.02µs        ? ?/sec
take string run logical len: 1024, physical len: 128, indices: 1024         1.00     23.8±0.11µs        ? ?/sec    1.01     24.0±0.11µs        ? ?/sec
take string run logical len: 1024, physical len: 512, indices: 1024         1.00     24.4±0.10µs        ? ?/sec    1.00     24.5±0.12µs        ? ?/sec
take string run logical len: 1024, physical len: 512, null indices: 1024    1.00     16.8±0.06µs        ? ?/sec    1.03     17.3±0.08µs        ? ?/sec
take stringview 1024                                                        1.03    688.5±1.04ns        ? ?/sec    1.00    666.1±3.50ns        ? ?/sec
take stringview 512                                                         1.16    473.8±1.45ns        ? ?/sec    1.00    409.8±4.31ns        ? ?/sec
take stringview null indices 1024                                           1.00    846.4±1.70ns        ? ?/sec    1.00    845.2±1.58ns        ? ?/sec
take stringview null indices 512                                            1.00    506.5±1.89ns        ? ?/sec    1.00    506.2±2.05ns        ? ?/sec
take stringview null values 1024                                            1.01   1238.9±2.72ns        ? ?/sec    1.00   1225.3±1.39ns        ? ?/sec
take stringview null values null indices 1024                               1.00   1490.9±1.51ns        ? ?/sec    1.00   1496.7±1.49ns        ? ?/sec
take_record_batch 5 primitive cols no nulls 1024                            1.04      3.0±0.02µs        ? ?/sec    1.00      2.8±0.01µs        ? ?/sec
take_record_batch 6 string/binary cols no nulls 1024                        1.01     26.7±0.08µs        ? ?/sec    1.00     26.6±0.06µs        ? ?/sec
take_record_batch 7 mixed cols null values 1024                             1.02     14.0±0.11µs        ? ?/sec    1.00     13.6±0.10µs        ? ?/sec
take_record_batch 7 mixed cols null values null indices 1024                1.00     13.3±0.05µs        ? ?/sec    1.03     13.8±0.04µs        ? ?/sec

Resource Usage

base (merge-base)

Metric Value
Wall time 585.1s
Peak memory 18.1 MiB
Avg memory 14.3 MiB
CPU user 582.4s
CPU sys 0.0s
Peak spill 0 B

branch

Metric Value
Wall time 585.1s
Peak memory 18.1 MiB
Avg memory 14.6 MiB
CPU user 583.7s
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/introduce-take_record_batch_unchecked (9d34600) to 6e728ce (merge-base) diff

Run configuration
run benchmark take_kernels
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_introduce-take_record_batch_unchecked
-----                                                                       ----                                   ------------------------------------------------
take bool 1024                                                              1.01    616.7±3.64ns        ? ?/sec    1.00    610.7±0.77ns        ? ?/sec
take bool 512                                                               1.01    356.2±1.46ns        ? ?/sec    1.00    353.6±0.79ns        ? ?/sec
take bool null indices 1024                                                 1.00   744.6±10.40ns        ? ?/sec    1.02    760.0±5.86ns        ? ?/sec
take bool null values 1024                                                  1.01   1122.8±1.02ns        ? ?/sec    1.00   1107.1±3.35ns        ? ?/sec
take bool null values null indices 1024                                     1.00   1127.0±5.12ns        ? ?/sec    1.01   1133.3±3.93ns        ? ?/sec
take check bounds i32 1024                                                  1.02    666.1±3.89ns        ? ?/sec    1.00    655.0±2.03ns        ? ?/sec
take check bounds i32 512                                                   1.20    463.1±3.91ns        ? ?/sec    1.00    385.5±1.79ns        ? ?/sec
take dense union 1024                                                       1.03      7.6±0.02µs        ? ?/sec    1.00      7.3±0.01µs        ? ?/sec
take dense union 512                                                        1.07      5.2±0.01µs        ? ?/sec    1.00      4.8±0.01µs        ? ?/sec
take fixed_size_list<i32>[22] 1024                                          1.01      3.5±0.01µs        ? ?/sec    1.00      3.5±0.01µs        ? ?/sec
take fixed_size_list<i32>[22] null indices 1024                             1.00     19.6±0.01µs        ? ?/sec    1.08     21.1±0.01µs        ? ?/sec
take fixed_size_list<i32>[22] null values 1024                              1.00     20.8±0.03µs        ? ?/sec    1.04     21.6±0.02µs        ? ?/sec
take fixed_size_list<i32>[8] 1024                                           1.00      2.8±0.00µs        ? ?/sec    1.00      2.8±0.00µs        ? ?/sec
take fixed_size_list<i32>[8] null indices 1024                              1.00      9.2±0.01µs        ? ?/sec    1.03      9.5±0.01µs        ? ?/sec
take fixed_size_list<i32>[8] null values 1024                               1.00     10.2±0.01µs        ? ?/sec    1.03     10.5±0.01µs        ? ?/sec
take fsb value len: 12, indices: 1024                                       1.00   1711.7±1.74ns        ? ?/sec    1.09   1867.8±1.26ns        ? ?/sec
take fsb value len: 12, null values, indices: 1024                          1.00      2.3±0.00µs        ? ?/sec    1.10      2.5±0.00µs        ? ?/sec
take fsb value optimized len: 16, indices: 1024                             1.00    594.4±1.35ns        ? ?/sec    1.00    593.7±2.13ns        ? ?/sec
take fsb value optimized len: 16, null values, indices: 1024                1.00   1192.9±1.24ns        ? ?/sec    1.01   1199.0±1.44ns        ? ?/sec
take i32 1024                                                               1.02    525.6±1.68ns        ? ?/sec    1.00    514.1±1.34ns        ? ?/sec
take i32 512                                                                1.00    351.6±1.69ns        ? ?/sec    1.00    352.0±1.64ns        ? ?/sec
take i32 null indices 1024                                                  1.00    859.0±3.38ns        ? ?/sec    1.00    855.9±2.44ns        ? ?/sec
take i32 null values 1024                                                   1.01   1123.6±2.62ns        ? ?/sec    1.00   1117.9±1.80ns        ? ?/sec
take i32 null values null indices 1024                                      1.00   1546.8±2.58ns        ? ?/sec    1.02   1572.0±2.12ns        ? ?/sec
take list i32 1024                                                          1.00      5.2±0.05µs        ? ?/sec    1.01      5.2±0.05µs        ? ?/sec
take list i32 512                                                           1.00      2.9±0.02µs        ? ?/sec    1.01      2.9±0.02µs        ? ?/sec
take list i32 null indices 1024                                             1.02      8.8±0.04µs        ? ?/sec    1.00      8.6±0.04µs        ? ?/sec
take list i32 null values 1024                                              1.00      4.0±0.02µs        ? ?/sec    1.00      4.0±0.02µs        ? ?/sec
take list i32 null values null indices 1024                                 1.00      7.0±0.05µs        ? ?/sec    1.00      7.0±0.04µs        ? ?/sec
take listview i32 1024                                                      1.06   1046.1±1.25ns        ? ?/sec    1.00    988.4±1.84ns        ? ?/sec
take listview i32 512                                                       1.00    613.4±1.03ns        ? ?/sec    1.00    616.1±1.01ns        ? ?/sec
take listview i32 null indices 1024                                         1.02   1626.0±3.88ns        ? ?/sec    1.00   1588.6±2.25ns        ? ?/sec
take listview i32 null values 1024                                          1.00   1547.1±2.59ns        ? ?/sec    1.03   1596.0±1.80ns        ? ?/sec
take listview i32 null values null indices 1024                             1.00      2.4±0.00µs        ? ?/sec    1.00      2.4±0.01µs        ? ?/sec
take map<str, i32> 1024                                                     1.00     34.0±0.06µs        ? ?/sec    1.01     34.2±0.09µs        ? ?/sec
take map<str, i32> 512                                                      1.00     19.5±0.02µs        ? ?/sec    1.01     19.6±0.02µs        ? ?/sec
take map<str, i32> null indices 1024                                        1.00     20.2±0.03µs        ? ?/sec    1.00     20.3±0.05µs        ? ?/sec
take map<str, i32> null values 1024                                         1.00     20.3±0.03µs        ? ?/sec    1.00     20.4±0.07µs        ? ?/sec
take primitive run logical len: 1024, physical len: 512, indices: 1024      1.00     18.7±0.03µs        ? ?/sec    1.00     18.7±0.01µs        ? ?/sec
take sparse union 1024                                                      1.01      7.7±0.01µs        ? ?/sec    1.00      7.6±0.02µs        ? ?/sec
take sparse union 512                                                       1.04      4.8±0.02µs        ? ?/sec    1.00      4.6±0.01µs        ? ?/sec
take str 1024                                                               1.00      8.0±0.01µs        ? ?/sec    1.02      8.2±0.01µs        ? ?/sec
take str 512                                                                1.00      3.7±0.00µs        ? ?/sec    1.04      3.8±0.01µs        ? ?/sec
take str null indices 1024                                                  1.03      4.5±0.06µs        ? ?/sec    1.00      4.4±0.07µs        ? ?/sec
take str null indices 512                                                   1.02      2.1±0.03µs        ? ?/sec    1.00      2.1±0.03µs        ? ?/sec
take str null values 1024                                                   1.00      4.5±0.06µs        ? ?/sec    1.00      4.5±0.05µs        ? ?/sec
take str null values null indices 1024                                      1.00      3.0±0.03µs        ? ?/sec    1.03      3.1±0.02µs        ? ?/sec
take string run logical len: 1024, physical len: 128, indices: 1024         1.00     23.9±0.09µs        ? ?/sec    1.00     24.0±0.09µs        ? ?/sec
take string run logical len: 1024, physical len: 512, indices: 1024         1.00     24.5±0.10µs        ? ?/sec    1.00     24.4±0.09µs        ? ?/sec
take string run logical len: 1024, physical len: 512, null indices: 1024    1.00     16.8±0.07µs        ? ?/sec    1.03     17.3±0.06µs        ? ?/sec
take stringview 1024                                                        1.02    674.8±1.38ns        ? ?/sec    1.00    662.4±1.70ns        ? ?/sec
take stringview 512                                                         1.01    412.7±2.06ns        ? ?/sec    1.00    407.1±1.74ns        ? ?/sec
take stringview null indices 1024                                           1.00    845.5±1.48ns        ? ?/sec    1.00    849.1±2.78ns        ? ?/sec
take stringview null indices 512                                            1.00    502.0±1.36ns        ? ?/sec    1.01    506.4±1.14ns        ? ?/sec
take stringview null values 1024                                            1.01   1245.4±3.10ns        ? ?/sec    1.00   1231.9±3.99ns        ? ?/sec
take stringview null values null indices 1024                               1.05   1575.9±1.40ns        ? ?/sec    1.00   1501.2±2.52ns        ? ?/sec
take_record_batch 5 primitive cols no nulls 1024                            1.03      3.0±0.01µs        ? ?/sec    1.00      2.9±0.01µs        ? ?/sec
take_record_batch 6 string/binary cols no nulls 1024                        1.00     26.8±0.06µs        ? ?/sec    1.00     26.7±0.04µs        ? ?/sec
take_record_batch 7 mixed cols null values 1024                             1.02     14.0±0.11µs        ? ?/sec    1.00     13.7±0.08µs        ? ?/sec
take_record_batch 7 mixed cols null values null indices 1024                1.00     13.4±0.05µs        ? ?/sec    1.03     13.8±0.04µs        ? ?/sec

Resource Usage

base (merge-base)

Metric Value
Wall time 585.1s
Peak memory 17.3 MiB
Avg memory 14.1 MiB
CPU user 578.4s
CPU sys 0.0s
Peak spill 0 B

branch

Metric Value
Wall time 585.1s
Peak memory 17.6 MiB
Avg memory 14.5 MiB
CPU user 581.7s
CPU sys 0.0s
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

arrow Changes to the arrow crate arrow-select performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reduce bound checks in take kernels

4 participants