Skip to content

bug/perf: Optimize take for RunEndArrays#10325

Open
Rich-T-kid wants to merge 3 commits into
apache:mainfrom
Rich-T-kid:rich-T-kid/combine-overlapping-ree-pt2
Open

bug/perf: Optimize take for RunEndArrays#10325
Rich-T-kid wants to merge 3 commits into
apache:mainfrom
Rich-T-kid:rich-T-kid/combine-overlapping-ree-pt2

Conversation

@Rich-T-kid

@Rich-T-kid Rich-T-kid commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

The Diff (+2,037 -1,839) makes this PR appear much bigger than it is. this is mostly moving code around & test. most of the logic is under 100 LOC

Which issue does this PR close?

Rationale for this change

for a logical representation of an ree

let logical_repr = [1, 1, 0, 0, 1, 1];
let ree_take_results = take(logical_repr,[0,1,4,5]);
this produces 
run_ends = [2,4]
values = [1,1]

when the result should be
runs: [4], values: [1]
both answers are correct but ree's should be as compact as possible.

see #7710

What changes are included in this PR?

  • take() on RunEndEncoded arrays now compares values instead of physical indices when deciding run boundaries, producing a more compact run-end representation and fixing cases where identical values across different runs were not merged.
  • Introduces arrow-cmp, a minimal crate that extracts make_comparator/DynComparator from arrow-ord so arrow-select can use slot-wise comparison without a circular dependency. Most of the line diff is code moving (+1,889,-1834), not new logic arrow-ord re-exports from arrow-cmp so its public API is unchanged.

Are these changes tested?

yes, I included three test to assert the compaction behavior we expect from a Run-end array.

Are there any user-facing changes?

  1. take() on RunEndEncoded arrays behaves differently. the output may have fewer runs than before. Previously runs were only merged when they hit the same physical index; now runs with equal values are also merged across different physical indices. Any code asserting on the exact run-end structure of take output could break.

  2. New arrow-cmp crate is published. Users can depend on it directly to get make_comparator / DynComparator without pulling in all of arrow-ord. arrow-ord still re-exports both so its API is unchanged.

@github-actions github-actions Bot added the arrow Changes to the arrow crate label Jul 11, 2026
@Rich-T-kid

Copy link
Copy Markdown
Contributor Author

cc @alamb @Jefffrey @asubiotto since you had previous interest in #9865
cc @Weijun-H since #8716 seems related

@Rich-T-kid Rich-T-kid changed the title Optimize take for RunEndArrays bug/perf: Optimize take for RunEndArrays Jul 11, 2026

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

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 clean this up and push up a revision. Could a maintainer also run the benchmarks to make sure there is a minimal regression in performance.

Comment thread arrow-cmp/src/lib.rs
Comment on lines +26 to +29
//! comparison (e.g. for the run-end-encoded `take` fast path) without taking on
//! the full ordering kernel suite — which would either create a circular
//! dependency (`arrow-ord` already depends on `arrow-select`) or force every
//! downstream user of `arrow-array` to compile the comparator machinery whether

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.

can remove these comemnts

Comment thread arrow-select/src/take.rs

#[test]
fn test_take_run_end_encoded_merges_identical_runs() {
// https://github.com/apache/arrow-rs/issues/7710

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.

we can remove the link to the issue. once this is merged it will be the default behavior

Comment thread arrow-select/src/take.rs
Comment on lines +2976 to +2980
builder.extend(
["bob", "bob", "alice", "alice", "bob", "bob", "eve", "eve"]
.into_iter()
.map(Some),
);

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.

nit: its more readable to have Some(str) directly

@Jefffrey

Copy link
Copy Markdown
Contributor

run benchmarks take_kernels primitive_run_take

@adriangbot

Copy link
Copy Markdown

🤖 Arrow criterion benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4979734623-1070-lzp7j 6.12.85+ #1 SMP Mon May 11 08:17:35 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/combine-overlapping-ree-pt2 (93e9b38) to 970391f (merge-base) diff
BENCH_NAME=primitive_run_take
BENCH_COMMAND=cargo bench --features=arrow,async,test_common,experimental,object_store --bench primitive_run_take
BENCH_FILTER=
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-c4979734623-1069-pm6bm 6.12.85+ #1 SMP Mon May 11 08:17:35 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/combine-overlapping-ree-pt2 (93e9b38) to 970391f (merge-base) diff
BENCH_NAME=take_kernels
BENCH_COMMAND=cargo bench --features=arrow,async,test_common,experimental,object_store --bench take_kernels
BENCH_FILTER=
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)

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_combine-overlapping-ree-pt2
-----                                                                              ----                                   --------------------------------------
primitive_run_take/(run_array_len:1024, physical_array_len:256, take_len:1024)     1.00     15.2±0.04µs        ? ?/sec    1.06     16.0±0.01µs        ? ?/sec
primitive_run_take/(run_array_len:1024, physical_array_len:256, take_len:512)      1.00      8.0±0.01µs        ? ?/sec    1.07      8.6±0.01µs        ? ?/sec
primitive_run_take/(run_array_len:2048, physical_array_len:512, take_len:1024)     1.00     15.5±0.01µs        ? ?/sec    1.06     16.5±0.01µs        ? ?/sec
primitive_run_take/(run_array_len:2048, physical_array_len:512, take_len:512)      1.00      8.2±0.00µs        ? ?/sec    1.09      8.9±0.01µs        ? ?/sec
primitive_run_take/(run_array_len:4096, physical_array_len:1024, take_len:1024)    1.00     15.8±0.01µs        ? ?/sec    1.09     17.3±0.02µs        ? ?/sec
primitive_run_take/(run_array_len:4096, physical_array_len:1024, take_len:512)     1.00      8.6±0.01µs        ? ?/sec    1.12      9.6±0.01µs        ? ?/sec
primitive_run_take/(run_array_len:512, physical_array_len:128, take_len:512)       1.00      7.7±0.00µs        ? ?/sec    1.06      8.2±0.01µs        ? ?/sec
primitive_run_take/(run_array_len:512, physical_array_len:64, take_len:512)        1.00      7.7±0.01µs        ? ?/sec    1.06      8.2±0.01µs        ? ?/sec

Resource Usage

base (merge-base)

Metric Value
Wall time 80.0s
Peak memory 10.0 MiB
Avg memory 5.2 MiB
CPU user 74.8s
CPU sys 0.0s
Peak spill 0 B

branch

Metric Value
Wall time 80.0s
Peak memory 11.3 MiB
Avg memory 10.1 MiB
CPU user 77.1s
CPU sys 0.0s
Peak spill 0 B

File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Arrow criterion benchmark completed (GKE) | trigger

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

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_combine-overlapping-ree-pt2
-----                                                                     ----                                   --------------------------------------
take bool 1024                                                            1.01   1039.5±0.81ns        ? ?/sec    1.00   1033.1±0.35ns        ? ?/sec
take bool 512                                                             1.01    576.6±0.63ns        ? ?/sec    1.00    570.9±0.31ns        ? ?/sec
take bool null indices 1024                                               1.12   857.8±31.84ns        ? ?/sec    1.00    767.9±2.44ns        ? ?/sec
take bool null values 1024                                                1.01      2.0±0.01µs        ? ?/sec    1.00      2.0±0.00µs        ? ?/sec
take bool null values null indices 1024                                   1.13  1616.5±13.74ns        ? ?/sec    1.00   1424.8±8.11ns        ? ?/sec
take check bounds i32 1024                                                1.01    664.3±1.27ns        ? ?/sec    1.00    659.3±1.04ns        ? ?/sec
take check bounds i32 512                                                 1.02    387.6±0.61ns        ? ?/sec    1.00    378.3±0.32ns        ? ?/sec
take fsb value len: 12, indices: 1024                                     1.00      2.5±0.00µs        ? ?/sec    1.00      2.5±0.00µs        ? ?/sec
take fsb value len: 12, null values, indices: 1024                        1.01      3.6±0.01µs        ? ?/sec    1.00      3.5±0.00µs        ? ?/sec
take fsb value optimized len: 16, indices: 1024                           1.19    702.8±0.75ns        ? ?/sec    1.00    589.9±0.84ns        ? ?/sec
take fsb value optimized len: 16, null values, indices: 1024              1.04   1668.0±1.15ns        ? ?/sec    1.00   1609.0±1.60ns        ? ?/sec
take i32 1024                                                             1.02    522.7±1.33ns        ? ?/sec    1.00    512.4±0.41ns        ? ?/sec
take i32 512                                                              1.00    350.5±0.91ns        ? ?/sec    1.00    351.6±0.81ns        ? ?/sec
take i32 null indices 1024                                                1.00    855.7±0.94ns        ? ?/sec    1.00    855.8±3.31ns        ? ?/sec
take i32 null values 1024                                                 1.01   1544.4±2.39ns        ? ?/sec    1.00   1535.1±3.63ns        ? ?/sec
take i32 null values null indices 1024                                    1.05   1736.3±3.89ns        ? ?/sec    1.00   1659.4±5.19ns        ? ?/sec
take list i32 1024                                                        1.00      8.8±0.02µs        ? ?/sec    1.00      8.8±0.02µs        ? ?/sec
take list i32 512                                                         1.00      4.7±0.01µs        ? ?/sec    1.00      4.7±0.03µs        ? ?/sec
take list i32 null indices 1024                                           1.00     10.2±0.02µs        ? ?/sec    1.00     10.2±0.03µs        ? ?/sec
take list i32 null values 1024                                            1.00      6.1±0.01µs        ? ?/sec    1.00      6.2±0.01µs        ? ?/sec
take list i32 null values null indices 1024                               1.04      7.1±0.08µs        ? ?/sec    1.00      6.8±0.05µs        ? ?/sec
take listview i32 1024                                                    1.00   1042.5±1.18ns        ? ?/sec    1.02   1064.7±1.20ns        ? ?/sec
take listview i32 512                                                     1.00    602.4±2.72ns        ? ?/sec    1.01    607.2±0.80ns        ? ?/sec
take listview i32 null indices 1024                                       1.00   1628.7±1.58ns        ? ?/sec    1.04   1690.2±0.74ns        ? ?/sec
take listview i32 null values 1024                                        1.04      2.0±0.00µs        ? ?/sec    1.00   1972.5±1.40ns        ? ?/sec
take listview i32 null values null indices 1024                           1.07      2.5±0.00µs        ? ?/sec    1.00      2.3±0.00µs        ? ?/sec
take primitive run logical len: 1024, physical len: 512, indices: 1024    1.00     15.3±0.01µs        ? ?/sec    1.10     16.8±0.01µs        ? ?/sec
take str 1024                                                             1.00      8.0±0.01µs        ? ?/sec    1.00      8.0±0.01µs        ? ?/sec
take str 512                                                              1.00      3.7±0.00µs        ? ?/sec    1.02      3.8±0.00µs        ? ?/sec
take str null indices 1024                                                1.00      4.3±0.04µs        ? ?/sec    1.01      4.4±0.07µs        ? ?/sec
take str null indices 512                                                 1.00      2.0±0.02µs        ? ?/sec    1.00      2.0±0.04µs        ? ?/sec
take str null values 1024                                                 1.00      4.9±0.03µs        ? ?/sec    1.00      4.9±0.05µs        ? ?/sec
take str null values null indices 1024                                    1.02      3.2±0.01µs        ? ?/sec    1.00      3.2±0.02µs        ? ?/sec
take stringview 1024                                                      1.34    978.9±1.11ns        ? ?/sec    1.00    732.4±1.30ns        ? ?/sec
take stringview 512                                                       1.34    628.0±5.47ns        ? ?/sec    1.00    470.0±6.73ns        ? ?/sec
take stringview null indices 1024                                         1.00    915.5±1.33ns        ? ?/sec    1.07    982.2±2.20ns        ? ?/sec
take stringview null indices 512                                          1.00    563.0±0.76ns        ? ?/sec    1.00    561.1±1.10ns        ? ?/sec
take stringview null values 1024                                          1.07   1899.2±1.32ns        ? ?/sec    1.00   1775.1±2.06ns        ? ?/sec
take stringview null values null indices 1024                             1.01   1736.0±1.41ns        ? ?/sec    1.00   1724.7±4.80ns        ? ?/sec

Resource Usage

base (merge-base)

Metric Value
Wall time 375.1s
Peak memory 13.4 MiB
Avg memory 11.0 MiB
CPU user 371.2s
CPU sys 0.0s
Peak spill 0 B

branch

Metric Value
Wall time 375.1s
Peak memory 14.3 MiB
Avg memory 11.5 MiB
CPU user 368.4s
CPU sys 0.0s
Peak spill 0 B

File an issue against this benchmark runner

@Jefffrey Jefffrey left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

in relation to adding the new arrow-cmp crate, we'll need to:

  • add the license + notice symlinks that are present in the other crates, see 0974cff
  • add line to release instructions for publishing this crate

```shell
(cd arrow-buffer && cargo publish)
(cd arrow-schema && cargo publish)
(cd arrow-data && cargo publish)
(cd arrow-array && cargo publish)
(cd arrow-select && cargo publish)
(cd arrow-ord && cargo publish)
(cd arrow-cast && cargo publish)
(cd arrow-ipc && cargo publish)
(cd arrow-csv && cargo publish)
(cd arrow-json && cargo publish)
(cd arrow-avro && cargo publish)
(cd arrow-arith && cargo publish)
(cd arrow-string && cargo publish)
(cd arrow-row && cargo publish)
(cd arrow-pyarrow && cargo publish)
(cd arrow && cargo publish)
(cd arrow-avro && cargo publish)
(cd arrow-flight && cargo publish)
(cd parquet-variant && cargo publish)
(cd parquet-variant-json && cargo publish)
(cd parquet-variant-compute && cargo publish)
(cd parquet-geospatial && cargo publish)
(cd parquet && cargo publish)
(cd parquet_derive && cargo publish)
(cd arrow-integration-test && cargo publish)
```

  • i think between array & select?

Comment thread arrow-select/src/take.rs
@Rich-T-kid

Copy link
Copy Markdown
Contributor Author
primitive_run_take/(run_array_len:1024, physical_array_len:256, take_len:1024)     1.00     15.2±0.04µs        ? ?/sec    1.06     16.0±0.01µs        ? ?/sec
primitive_run_take/(run_array_len:1024, physical_array_len:256, take_len:512)      1.00      8.0±0.01µs        ? ?/sec    1.07      8.6±0.01µs        ? ?/sec
primitive_run_take/(run_array_len:2048, physical_array_len:512, take_len:1024)     1.00     15.5±0.01µs        ? ?/sec    1.06     16.5±0.01µs        ? ?/sec
primitive_run_take/(run_array_len:2048, physical_array_len:512, take_len:512)      1.00      8.2±0.00µs        ? ?/sec    1.09      8.9±0.01µs        ? ?/sec
primitive_run_take/(run_array_len:4096, physical_array_len:1024, take_len:1024)    1.00     15.8±0.01µs        ? ?/sec    1.09     17.3±0.02µs        ? ?/sec
primitive_run_take/(run_array_len:4096, physical_array_len:1024, take_len:512)     1.00      8.6±0.01µs        ? ?/sec    1.12      9.6±0.01µs        ? ?/sec
primitive_run_take/(run_array_len:512, physical_array_len:128, take_len:512)       1.00      7.7±0.00µs        ? ?/sec    1.06      8.2±0.01µs        ? ?/sec
primitive_run_take/(run_array_len:512, physical_array_len:64, take_len:512)        1.00      7.7±0.01µs        ? ?/sec    1.06      8.2±0.01µs        ? ?/sec

these results are much better than the initial approach

@Rich-T-kid

Copy link
Copy Markdown
Contributor Author

@Jefffrey the latest commit should address all of your comments 🚀

@Jefffrey Jefffrey left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looks good to me, though would be good to get another set of eyes on this since we're introducing a new crate

@Rich-T-kid

Copy link
Copy Markdown
Contributor Author

@Weijun-H friendly ping

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Potential Optimization for interleave/take on RunEndEncoded arrays

3 participants