You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "cakeni (via GitHub)" <gi...@apache.org> on 2026/08/11 11:38:05 UTC
[PR] Replace concat_elements_bytes BufferBuilders with Vec [arrow-rs]
cakeni opened a new pull request, #10632:
URL: https://github.com/apache/arrow-rs/pull/10632
# Which issue does this PR close?
- Part of #10245.
# Rationale for this change
Using `Vec` instead of `BufferBuilder` can benefit from Rust's optimized vector implementation. This updates the value and offset builders in `concat_elements_bytes`.
# What changes are included in this PR?
- Replace the output value and offset `BufferBuilder` instances with capacity-matched vectors.
- Use `extend_from_slice` and `push` while preserving the existing offset calculations.
- Convert both vectors directly into the buffers used by `ArrayDataBuilder`.
# Are these changes tested?
Yes. The following checks pass:
- `cargo +stable-x86_64-pc-windows-gnu fmt --all -- --check`
- `cargo +stable-x86_64-pc-windows-gnu clippy -p arrow-string --all-targets --all-features --no-deps -- -D warnings`
- `cargo +stable-x86_64-pc-windows-gnu test -p arrow-string --all-features` (182 unit tests and 10 doctests passed)
# Are there any user-facing changes?
No.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Replace concat_elements_bytes BufferBuilders with Vec [arrow-rs]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #10632:
URL: https://github.com/apache/arrow-rs/pull/10632#issuecomment-5264015206
🤖 Arrow criterion benchmark completed (GKE) | [trigger](https://github.com/apache/arrow-rs/pull/10632#issuecomment-5263956732)
**Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB)
Comparing perf/arrow-string-concat-bytes-vecs (0b2f7dfd0d3e27b9484b5b68eb901af4ce3292c7) to fc16607 (merge-base) [diff](https://github.com/apache/arrow-rs/compare/fc16607ccfdb298557ed6630742941761ac18ce3..0b2f7dfd0d3e27b9484b5b68eb901af4ce3292c7)
<details><summary>Run configuration</summary>
```yaml
run benchmark concatenate_elements
```
</details>
<details><summary>CPU Details (lscpu)</summary>
```
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>
<details><summary>Details</summary>
<p>
```
group main perf_arrow-string-concat-bytes-vecs
----- ---- -----------------------------------
concat str 1024 1.05 12.2±0.39µs ? ?/sec 1.00 11.6±0.40µs ? ?/sec
concat str 8192 1.18 173.8±24.61µs ? ?/sec 1.00 147.7±18.28µs ? ?/sec
concat str nulls 1024 1.32 8.9±0.16µs ? ?/sec 1.00 6.8±0.14µs ? ?/sec
concat str nulls 8192 over 100 arrays 1.14 88.2±3.12µs ? ?/sec 1.00 77.5±2.23µs ? ?/sec
concat utf8_view max_str_len=128 null_density=0 1.00 89.7±0.90µs ? ?/sec 1.04 93.1±1.08µs ? ?/sec
concat utf8_view max_str_len=128 null_density=0.2 1.00 81.5±0.32µs ? ?/sec 1.01 82.0±0.58µs ? ?/sec
concat utf8_view max_str_len=20 null_density=0 1.03 55.3±0.02µs ? ?/sec 1.00 53.8±0.03µs ? ?/sec
concat utf8_view max_str_len=20 null_density=0.2 1.01 61.5±0.07µs ? ?/sec 1.00 61.2±0.10µs ? ?/sec
concat utf8_view all_inline max_str_len=12 null_density=0 1.00 49.7±0.02µs ? ?/sec 1.00 49.7±0.03µs ? ?/sec
concat utf8_view all_inline max_str_len=12 null_density=0.2 1.00 58.3±0.08µs ? ?/sec 1.00 58.4±0.07µs ? ?/sec
```
</p>
</details>
<details><summary>Resource Usage</summary>
**base (merge-base)**
| Metric | Value |
|--------|-------|
| Wall time | 105.0s |
| Peak memory | 26.9 MiB |
| Avg memory | 17.4 MiB |
| CPU user | 98.9s |
| CPU sys | 0.0s |
| Peak spill | 0 B |
**branch**
| Metric | Value |
|--------|-------|
| Wall time | 95.0s |
| Peak memory | 14.0 MiB |
| Avg memory | 11.8 MiB |
| CPU user | 92.1s |
| CPU sys | 0.0s |
| Peak spill | 0 B |
</details>
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Replace concat_elements_bytes BufferBuilders with Vec [arrow-rs]
Posted by "Jefffrey (via GitHub)" <gi...@apache.org>.
Jefffrey merged PR #10632:
URL: https://github.com/apache/arrow-rs/pull/10632
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Replace concat_elements_bytes BufferBuilders with Vec [arrow-rs]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #10632:
URL: https://github.com/apache/arrow-rs/pull/10632#issuecomment-5263978330
🤖 Arrow criterion benchmark running (GKE) | [trigger](https://github.com/apache/arrow-rs/pull/10632#issuecomment-5263956732)
**Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB) | `Linux bench-c5263956732-1559-c7rhm 6.12.85+ #1 SMP Wed Jun 17 20:31:55 UTC 2026 aarch64 GNU/Linux`
<details><summary>CPU Details (lscpu)</summary>
```
Architecture: aarch64
CPU op-mode(s): 64-bit
Byte Order: Little Endian
CPU(s): 16
On-line CPU(s) list: 0-15
Vendor ID: ARM
Model name: Neoverse-V2
Model: 1
Thread(s) per core: 1
Core(s) per cluster: 16
Socket(s): -
Cluster(s): 1
Stepping: r0p1
BogoMIPS: 2000.00
Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache: 1 MiB (16 instances)
L1i cache: 1 MiB (16 instances)
L2 cache: 32 MiB (16 instances)
L3 cache: 80 MiB (1 instance)
NUMA node(s): 1
NUMA node0 CPU(s): 0-15
Vulnerability Gather data sampling: Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit: Not affected
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Mmio stale data: Not affected
Vulnerability Reg file data sampling: Not affected
Vulnerability Retbleed: Not affected
Vulnerability Spec rstack overflow: Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1: Mitigation; __user pointer sanitization
Vulnerability Spectre v2: Mitigation; CSV2, BHB
Vulnerability Srbds: Not affected
Vulnerability Tsa: Not affected
Vulnerability Tsx async abort: Not affected
Vulnerability Vmscape: Not affected
```
</details>
Comparing perf/arrow-string-concat-bytes-vecs (0b2f7dfd0d3e27b9484b5b68eb901af4ce3292c7) to fc16607 (merge-base) [diff](https://github.com/apache/arrow-rs/compare/fc16607ccfdb298557ed6630742941761ac18ce3..0b2f7dfd0d3e27b9484b5b68eb901af4ce3292c7)
<details><summary>Run configuration</summary>
```yaml
run benchmark concatenate_elements
```
</details>
BENCH_COMMAND=cargo bench --features=arrow,async,test_common,experimental,object_store --bench concatenate_elements
Results will be posted here when complete
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Replace concat_elements_bytes BufferBuilders with Vec [arrow-rs]
Posted by "Jefffrey (via GitHub)" <gi...@apache.org>.
Jefffrey commented on PR #10632:
URL: https://github.com/apache/arrow-rs/pull/10632#issuecomment-5263956732
run benchmark concatenate_elements
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org