You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "Jefffrey (via GitHub)" <gi...@apache.org> on 2026/06/28 14:27:20 UTC
[PR] Replace `ArrayData` with direct `Array` construction in `arrow-row` [arrow-rs]
Jefffrey opened a new pull request, #10229:
URL: https://github.com/apache/arrow-rs/pull/10229
# Which issue does this PR close?
<!--
We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax.
-->
- Part of #9298
# Rationale for this change
<!--
Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.
-->
# What changes are included in this PR?
<!--
There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
-->
# Are these changes tested?
<!--
We typically require tests for all PRs in order to:
1. Prevent the code from being accidentally broken by subsequent changes
2. Serve as another way to document the expected behavior of the code
If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
If this PR claims a performance improvement, please include evidence such as benchmark results.
-->
# Are there any user-facing changes?
<!--
If there are user-facing changes then we may require documentation to be updated before approving the PR.
If there are any breaking changes to public APIs, please call them out.
-->
--
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 `ArrayData` with direct `Array` construction in `arrow-row` [arrow-rs]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #10229:
URL: https://github.com/apache/arrow-rs/pull/10229#discussion_r3498691453
##########
arrow-row/src/variable.rs:
##########
@@ -69,6 +71,12 @@ pub(crate) fn non_null_padded_length(len: usize) -> usize {
}
}
+pub(crate) fn decode_nulls_sentinel(rows: &[&[u8]], options: SortOptions) -> Option<NullBuffer> {
+ let nulls = BooleanBuffer::collect_bool(rows.len(), |x| rows[x][0] != null_sentinel(options));
Review Comment:
Another thought is we could potentially make a null sentinel type and then template the relevant functions (to have rust do the code copy for us)
--
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 `ArrayData` with direct `Array` construction in `arrow-row` [arrow-rs]
Posted by "Jefffrey (via GitHub)" <gi...@apache.org>.
Jefffrey commented on code in PR #10229:
URL: https://github.com/apache/arrow-rs/pull/10229#discussion_r3498795909
##########
arrow-row/src/variable.rs:
##########
@@ -69,6 +71,12 @@ pub(crate) fn non_null_padded_length(len: usize) -> usize {
}
}
+pub(crate) fn decode_nulls_sentinel(rows: &[&[u8]], options: SortOptions) -> Option<NullBuffer> {
+ let nulls = BooleanBuffer::collect_bool(rows.len(), |x| rows[x][0] != null_sentinel(options));
Review Comment:
- https://github.com/apache/arrow-rs/issues/10246
--
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 `ArrayData` with direct `Array` construction in `arrow-row` [arrow-rs]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb merged PR #10229:
URL: https://github.com/apache/arrow-rs/pull/10229
--
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 `ArrayData` with direct `Array` construction in `arrow-row` [arrow-rs]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #10229:
URL: https://github.com/apache/arrow-rs/pull/10229#discussion_r3498651605
##########
arrow-row/src/fixed.rs:
##########
@@ -402,61 +397,19 @@ pub fn decode_bool(rows: &mut [&[u8]], options: SortOptions) -> BooleanArray {
values.push(values_packed);
}
- let builder = ArrayDataBuilder::new(DataType::Boolean)
- .len(rows.len())
- .null_count(null_count)
- .add_buffer(values.into())
- .null_bit_buffer(Some(nulls.into()));
+ let nulls = NullBuffer::new(BooleanBuffer::new(nulls.into(), 0, len));
Review Comment:
I agree -- sounds like a good call and it is reflected in the benchmarks as well
--
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 `ArrayData` with direct `Array` construction in `arrow-row` [arrow-rs]
Posted by "Jefffrey (via GitHub)" <gi...@apache.org>.
Jefffrey commented on PR #10229:
URL: https://github.com/apache/arrow-rs/pull/10229#issuecomment-4826396486
run benchmark row_format
--
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 `ArrayData` with direct `Array` construction in `arrow-row` [arrow-rs]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #10229:
URL: https://github.com/apache/arrow-rs/pull/10229#issuecomment-4826546961
🤖 Arrow criterion benchmark running (GKE) | [trigger](https://github.com/apache/arrow-rs/pull/10229#issuecomment-4826541889)
**Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB) | `Linux bench-c4826541889-731-mmgk8 6.12.85+ #1 SMP Mon May 11 08:17:35 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 row-refactor-out-arraydata (033eb205f5730929f570880ba9fb3c35751531e1) to da07bce (merge-base) [diff](https://github.com/apache/arrow-rs/compare/da07bced959e1f2cb2bb9dd13429c372a028284d..033eb205f5730929f570880ba9fb3c35751531e1)
BENCH_NAME=row_format
BENCH_COMMAND=cargo bench --features=arrow,async,test_common,experimental,object_store --bench row_format
BENCH_FILTER=
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 `ArrayData` with direct `Array` construction in `arrow-row` [arrow-rs]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #10229:
URL: https://github.com/apache/arrow-rs/pull/10229#discussion_r3492491438
##########
arrow-row/src/fixed.rs:
##########
@@ -469,9 +422,20 @@ where
T::Native: FixedLengthEncoding,
{
assert!(PrimitiveArray::<T>::is_compatible(&data_type));
- // SAFETY:
- // Validated data type above
- unsafe { decode_fixed::<T::Native>(rows, data_type, options).into() }
+
+ let len = rows.len();
+
+ let mut values = BufferBuilder::<T::Native>::new(len);
Review Comment:
We could potentially use Vec<T::Native> here which may be faster
##########
arrow-row/src/fixed.rs:
##########
@@ -402,61 +397,19 @@ pub fn decode_bool(rows: &mut [&[u8]], options: SortOptions) -> BooleanArray {
values.push(values_packed);
}
- let builder = ArrayDataBuilder::new(DataType::Boolean)
- .len(rows.len())
- .null_count(null_count)
- .add_buffer(values.into())
- .null_bit_buffer(Some(nulls.into()));
+ let nulls = NullBuffer::new(BooleanBuffer::new(nulls.into(), 0, len));
Review Comment:
I think `new` recomputes the null cound
We could use `new_unchecked` here to keep the exact same behavior
https://docs.rs/arrow/latest/arrow/buffer/struct.NullBuffer.html#method.new_unchecked
However it seems from the bencmarks it doesn't really matter (this formulation is as fast or faster as main)
```
ppend_rows 4096 bool(0, 0.5) 1.05 5.1±0.02µs ? ?/sec 1.00 4.9±0.00µs ? ?/sec
append_rows 4096 bool(0.3, 0.5) 1.00 5.8±0.00µs ? ?/sec 1.00 5.8±0.00µs ? ?/se
```
##########
arrow-row/src/lib.rs:
##########
@@ -2119,17 +2118,16 @@ unsafe fn decode_column(
cols.into_iter().next().unwrap()
}
Codec::Struct(converter, _) => {
- let (null_count, nulls) = fixed::decode_nulls(rows);
+ let nulls = fixed::decode_nulls(rows);
Review Comment:
this is really nice
##########
arrow-row/src/lib.rs:
##########
@@ -2139,14 +2137,15 @@ unsafe fn decode_column(
.collect(),
_ => unreachable!("Only Struct types should be corrected here"),
};
- let corrected_struct_type = DataType::Struct(corrected_fields.into());
- let builder = ArrayDataBuilder::new(corrected_struct_type)
- .len(rows.len())
- .null_count(null_count)
- .null_bit_buffer(Some(nulls))
- .child_data(child_data);
-
- Arc::new(StructArray::from(unsafe { builder.build_unchecked() }))
+
+ Arc::new(unsafe {
Review Comment:
I think it would be nice to add a small safety justification here, though I see the previous code didn't have one either
##########
arrow-row/src/variable.rs:
##########
@@ -69,6 +71,12 @@ pub(crate) fn non_null_padded_length(len: usize) -> usize {
}
}
+pub(crate) fn decode_nulls_sentinel(rows: &[&[u8]], options: SortOptions) -> Option<NullBuffer> {
+ let nulls = BooleanBuffer::collect_bool(rows.len(), |x| rows[x][0] != null_sentinel(options));
Review Comment:
Given there are only two null values for null sentinel, I wonder if we could make two separate loops here for the two values and generate even more efficient code
As a follow PR
##########
arrow-row/src/variable.rs:
##########
@@ -69,6 +71,12 @@ pub(crate) fn non_null_padded_length(len: usize) -> usize {
}
}
+pub(crate) fn decode_nulls_sentinel(rows: &[&[u8]], options: SortOptions) -> Option<NullBuffer> {
Review Comment:
perhaps some small comments explaining what it does would help future readers
##########
arrow-row/src/fixed.rs:
##########
@@ -402,61 +397,19 @@ pub fn decode_bool(rows: &mut [&[u8]], options: SortOptions) -> BooleanArray {
values.push(values_packed);
}
- let builder = ArrayDataBuilder::new(DataType::Boolean)
- .len(rows.len())
- .null_count(null_count)
- .add_buffer(values.into())
- .null_bit_buffer(Some(nulls.into()));
+ let nulls = NullBuffer::new(BooleanBuffer::new(nulls.into(), 0, len));
+ let nulls = (nulls.null_count() > 0).then_some(nulls);
- // SAFETY:
- // Buffers are the correct length
- unsafe { BooleanArray::from(builder.build_unchecked()) }
+ BooleanArray::new(BooleanBuffer::new(values.into(), 0, len), nulls)
}
/// Decodes a single byte from each row, interpreting `0x01` as a valid value
-/// and all other values as a null
-///
-/// Returns the null count and null buffer
-pub fn decode_nulls(rows: &[&[u8]]) -> (usize, Buffer) {
Review Comment:
I think NullBuffers also contain a null count, however, they compute the null count with quite optimized code, so I think recomputing it in many cases is fine
--
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 `ArrayData` with direct `Array` construction in `arrow-row` [arrow-rs]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #10229:
URL: https://github.com/apache/arrow-rs/pull/10229#issuecomment-4826530432
🤖 Arrow criterion benchmark completed (GKE) | [trigger](https://github.com/apache/arrow-rs/pull/10229#issuecomment-4826396486)
**Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB)
<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 row-refactor-out-arraydata
----- ---- --------------------------
append_rows 10 large_list(0) of u64(0) 1.00 563.4±3.73ns ? ?/sec 1.00 562.7±2.88ns ? ?/sec
append_rows 10 list(0) of u64(0) 1.00 592.9±3.80ns ? ?/sec 1.01 596.8±3.05ns ? ?/sec
append_rows 4096 4096 string_dictionary(20, 0.5), string_dictionary(30, 0), string_dictionary(100, 0), i64(0) 1.00 186.5±1.78µs ? ?/sec 1.01 187.7±1.43µs ? ?/sec
append_rows 4096 53 columns 1.00 821.1±4.14µs ? ?/sec 1.01 827.8±1.30µs ? ?/sec
append_rows 4096 bool(0, 0.5) 1.04 5.1±0.00µs ? ?/sec 1.00 4.9±0.01µs ? ?/sec
append_rows 4096 bool(0.3, 0.5) 1.00 5.8±0.00µs ? ?/sec 1.00 5.8±0.01µs ? ?/sec
append_rows 4096 i64(0) 1.00 4.4±0.04µs ? ?/sec 1.08 4.7±0.41µs ? ?/sec
append_rows 4096 i64(0.3) 1.02 5.5±0.01µs ? ?/sec 1.00 5.4±0.00µs ? ?/sec
append_rows 4096 large_list(0) of u64(0) 1.03 91.3±0.26µs ? ?/sec 1.00 89.0±0.14µs ? ?/sec
append_rows 4096 large_list(0) sliced to 10 of u64(0) 1.00 760.1±4.44ns ? ?/sec 1.01 765.6±3.10ns ? ?/sec
append_rows 4096 list(0) of u64(0) 1.00 91.0±0.18µs ? ?/sec 1.01 91.5±0.20µs ? ?/sec
append_rows 4096 list(0) sliced to 10 of u64(0) 1.00 838.9±8.36ns ? ?/sec 1.00 836.1±2.89ns ? ?/sec
append_rows 4096 run_primitive(1024 physical) 1.01 22.5±0.26µs ? ?/sec 1.00 22.2±0.48µs ? ?/sec
append_rows 4096 run_primitive(256 physical) 1.00 12.3±0.06µs ? ?/sec 1.00 12.4±0.04µs ? ?/sec
append_rows 4096 run_primitive(512 physical) 1.00 15.3±0.18µs ? ?/sec 1.00 15.3±0.21µs ? ?/sec
append_rows 4096 string view(1..100, 0) 1.02 38.4±0.23µs ? ?/sec 1.00 37.8±0.14µs ? ?/sec
append_rows 4096 string view(1..100, 0.5) 1.05 32.2±0.37µs ? ?/sec 1.00 30.6±0.41µs ? ?/sec
append_rows 4096 string view(10, 0) 1.00 29.3±0.04µs ? ?/sec 1.00 29.3±0.03µs ? ?/sec
append_rows 4096 string view(100, 0) 1.00 44.6±0.37µs ? ?/sec 1.00 44.8±0.14µs ? ?/sec
append_rows 4096 string view(100, 0.5) 1.00 37.5±0.36µs ? ?/sec 1.00 37.6±0.43µs ? ?/sec
append_rows 4096 string view(30, 0) 1.00 34.5±0.06µs ? ?/sec 1.00 34.4±0.14µs ? ?/sec
append_rows 4096 string(10, 0) 1.01 26.7±0.03µs ? ?/sec 1.00 26.5±0.03µs ? ?/sec
append_rows 4096 string(100, 0) 1.00 36.5±0.12µs ? ?/sec 1.01 36.7±0.35µs ? ?/sec
append_rows 4096 string(100, 0.5) 1.00 32.6±0.38µs ? ?/sec 1.07 34.7±0.26µs ? ?/sec
append_rows 4096 string(20, 0.5), string(30, 0), string(100, 0), i64(0) 1.00 93.3±1.77µs ? ?/sec 1.01 94.7±1.57µs ? ?/sec
append_rows 4096 string(30, 0) 1.00 29.4±1.27µs ? ?/sec 1.00 29.5±1.23µs ? ?/sec
append_rows 4096 string_dictionary(10, 0) 1.00 49.3±0.05µs ? ?/sec 1.00 49.3±0.08µs ? ?/sec
append_rows 4096 string_dictionary(100, 0) 1.00 71.9±0.17µs ? ?/sec 1.03 74.2±0.14µs ? ?/sec
append_rows 4096 string_dictionary(100, 0.5) 1.00 51.7±0.23µs ? ?/sec 1.07 55.1±0.17µs ? ?/sec
append_rows 4096 string_dictionary(30, 0) 1.00 54.8±1.33µs ? ?/sec 1.00 54.8±1.27µs ? ?/sec
append_rows 4096 string_dictionary_low_cardinality(10, 0) 1.01 22.4±0.06µs ? ?/sec 1.00 22.2±0.07µs ? ?/sec
append_rows 4096 string_dictionary_low_cardinality(100, 0) 1.01 32.5±0.03µs ? ?/sec 1.00 32.3±0.02µs ? ?/sec
append_rows 4096 string_dictionary_low_cardinality(30, 0) 1.01 24.9±0.06µs ? ?/sec 1.00 24.6±0.07µs ? ?/sec
append_rows 4096 u64(0) 1.17 5.0±0.57µs ? ?/sec 1.00 4.3±0.32µs ? ?/sec
append_rows 4096 u64(0.3) 1.08 5.9±0.02µs ? ?/sec 1.00 5.4±0.00µs ? ?/sec
append_rows 8192 53 columns 1.00 1718.8±6.33µs ? ?/sec 1.00 1721.6±2.41µs ? ?/sec
convert_columns 10 large_list(0) of u64(0) 1.00 849.7±1.88ns ? ?/sec 1.00 853.4±7.71ns ? ?/sec
convert_columns 10 list(0) of u64(0) 1.01 874.9±3.23ns ? ?/sec 1.00 869.8±7.28ns ? ?/sec
convert_columns 4096 4096 string_dictionary(20, 0.5), string_dictionary(30, 0), string_dictionary(100, 0), i64(0) 1.00 189.5±1.51µs ? ?/sec 1.01 192.1±1.49µs ? ?/sec
convert_columns 4096 53 columns 1.00 824.8±2.74µs ? ?/sec 1.01 831.3±1.15µs ? ?/sec
convert_columns 4096 bool(0, 0.5) 1.05 5.4±0.00µs ? ?/sec 1.00 5.2±0.03µs ? ?/sec
convert_columns 4096 bool(0.3, 0.5) 1.00 6.0±0.00µs ? ?/sec 1.00 6.0±0.00µs ? ?/sec
convert_columns 4096 i64(0) 1.01 4.7±0.22µs ? ?/sec 1.00 4.6±0.01µs ? ?/sec
convert_columns 4096 i64(0.3) 1.02 5.7±0.01µs ? ?/sec 1.00 5.6±0.01µs ? ?/sec
convert_columns 4096 large_list(0) of u64(0) 1.02 91.7±0.25µs ? ?/sec 1.00 89.6±0.15µs ? ?/sec
convert_columns 4096 large_list(0) sliced to 10 of u64(0) 1.00 1045.8±2.00ns ? ?/sec 1.00 1046.2±5.99ns ? ?/sec
convert_columns 4096 list(0) of u64(0) 1.00 91.2±0.18µs ? ?/sec 1.01 92.0±0.16µs ? ?/sec
convert_columns 4096 list(0) sliced to 10 of u64(0) 1.00 1119.0±2.68ns ? ?/sec 1.03 1155.4±7.60ns ? ?/sec
convert_columns 4096 run_primitive(1024 physical) 1.00 22.7±0.24µs ? ?/sec 1.00 22.8±0.25µs ? ?/sec
convert_columns 4096 run_primitive(256 physical) 1.00 12.7±0.05µs ? ?/sec 1.00 12.7±0.06µs ? ?/sec
convert_columns 4096 run_primitive(512 physical) 1.00 15.7±0.20µs ? ?/sec 1.00 15.7±0.20µs ? ?/sec
convert_columns 4096 string view(1..100, 0) 1.02 38.5±0.11µs ? ?/sec 1.00 37.9±0.14µs ? ?/sec
convert_columns 4096 string view(1..100, 0.5) 1.05 32.5±0.41µs ? ?/sec 1.00 30.8±0.39µs ? ?/sec
convert_columns 4096 string view(10, 0) 1.00 29.6±0.10µs ? ?/sec 1.00 29.5±0.08µs ? ?/sec
convert_columns 4096 string view(100, 0) 1.01 44.9±0.26µs ? ?/sec 1.00 44.6±0.15µs ? ?/sec
convert_columns 4096 string view(100, 0.5) 1.01 37.4±0.32µs ? ?/sec 1.00 37.0±0.29µs ? ?/sec
convert_columns 4096 string view(30, 0) 1.00 34.6±0.04µs ? ?/sec 1.00 34.5±0.07µs ? ?/sec
convert_columns 4096 string(10, 0) 1.00 26.8±0.12µs ? ?/sec 1.00 26.9±0.03µs ? ?/sec
convert_columns 4096 string(100, 0) 1.00 37.0±0.13µs ? ?/sec 1.00 36.9±0.13µs ? ?/sec
convert_columns 4096 string(100, 0.5) 1.00 32.7±0.44µs ? ?/sec 1.06 34.8±0.32µs ? ?/sec
convert_columns 4096 string(20, 0.5), string(30, 0), string(100, 0), i64(0) 1.00 93.8±1.70µs ? ?/sec 1.01 94.7±1.66µs ? ?/sec
convert_columns 4096 string(30, 0) 1.01 29.8±1.29µs ? ?/sec 1.00 29.6±1.24µs ? ?/sec
convert_columns 4096 string_dictionary(10, 0) 1.00 50.2±0.04µs ? ?/sec 1.03 51.6±0.03µs ? ?/sec
convert_columns 4096 string_dictionary(100, 0) 1.00 74.4±0.87µs ? ?/sec 1.00 74.4±0.15µs ? ?/sec
convert_columns 4096 string_dictionary(100, 0.5) 1.00 52.6±0.23µs ? ?/sec 1.07 56.2±0.29µs ? ?/sec
convert_columns 4096 string_dictionary(30, 0) 1.00 56.4±1.27µs ? ?/sec 1.00 56.1±1.20µs ? ?/sec
convert_columns 4096 string_dictionary_low_cardinality(10, 0) 1.01 23.5±0.02µs ? ?/sec 1.00 23.2±0.02µs ? ?/sec
convert_columns 4096 string_dictionary_low_cardinality(100, 0) 1.01 33.7±0.15µs ? ?/sec 1.00 33.4±0.05µs ? ?/sec
convert_columns 4096 string_dictionary_low_cardinality(30, 0) 1.01 26.0±0.08µs ? ?/sec 1.00 25.8±0.08µs ? ?/sec
convert_columns 4096 u64(0) 1.00 4.4±0.01µs ? ?/sec 1.01 4.4±0.07µs ? ?/sec
convert_columns 4096 u64(0.3) 1.08 6.1±0.05µs ? ?/sec 1.00 5.7±0.01µs ? ?/sec
convert_columns 8192 53 columns 1.00 1718.1±3.58µs ? ?/sec 1.00 1725.3±2.50µs ? ?/sec
convert_columns_prepared 10 large_list(0) of u64(0) 1.00 638.3±2.69ns ? ?/sec 1.00 639.4±4.83ns ? ?/sec
convert_columns_prepared 10 list(0) of u64(0) 1.01 667.6±3.18ns ? ?/sec 1.00 662.7±4.44ns ? ?/sec
convert_columns_prepared 4096 4096 string_dictionary(20, 0.5), string_dictionary(30, 0), string_dictionary(100, 0), i64(0) 1.00 185.8±1.46µs ? ?/sec 1.01 187.9±1.34µs ? ?/sec
convert_columns_prepared 4096 53 columns 1.00 821.6±1.36µs ? ?/sec 1.02 834.0±2.02µs ? ?/sec
convert_columns_prepared 4096 bool(0, 0.5) 1.03 5.3±0.00µs ? ?/sec 1.00 5.1±0.06µs ? ?/sec
convert_columns_prepared 4096 bool(0.3, 0.5) 1.00 5.9±0.00µs ? ?/sec 1.00 5.9±0.01µs ? ?/sec
convert_columns_prepared 4096 i64(0) 1.00 4.5±0.01µs ? ?/sec 1.01 4.5±0.01µs ? ?/sec
convert_columns_prepared 4096 i64(0.3) 1.02 5.6±0.00µs ? ?/sec 1.00 5.5±0.01µs ? ?/sec
convert_columns_prepared 4096 large_list(0) of u64(0) 1.02 91.3±0.22µs ? ?/sec 1.00 89.2±0.15µs ? ?/sec
convert_columns_prepared 4096 large_list(0) sliced to 10 of u64(0) 1.00 833.3±2.47ns ? ?/sec 1.01 838.3±5.29ns ? ?/sec
convert_columns_prepared 4096 list(0) of u64(0) 1.00 91.0±0.17µs ? ?/sec 1.01 91.7±0.15µs ? ?/sec
convert_columns_prepared 4096 list(0) sliced to 10 of u64(0) 1.00 910.4±4.74ns ? ?/sec 1.00 913.7±4.70ns ? ?/sec
convert_columns_prepared 4096 run_primitive(1024 physical) 1.00 22.2±0.42µs ? ?/sec 1.02 22.6±0.19µs ? ?/sec
convert_columns_prepared 4096 run_primitive(256 physical) 1.00 12.5±0.05µs ? ?/sec 1.00 12.5±0.05µs ? ?/sec
convert_columns_prepared 4096 run_primitive(512 physical) 1.00 15.5±0.18µs ? ?/sec 1.00 15.4±0.19µs ? ?/sec
convert_columns_prepared 4096 string view(1..100, 0) 1.01 38.4±0.22µs ? ?/sec 1.00 38.0±0.21µs ? ?/sec
convert_columns_prepared 4096 string view(1..100, 0.5) 1.06 32.7±1.57µs ? ?/sec 1.00 30.7±0.41µs ? ?/sec
convert_columns_prepared 4096 string view(10, 0) 1.00 29.3±0.05µs ? ?/sec 1.00 29.4±0.03µs ? ?/sec
convert_columns_prepared 4096 string view(100, 0) 1.00 44.3±0.20µs ? ?/sec 1.02 45.3±0.19µs ? ?/sec
convert_columns_prepared 4096 string view(100, 0.5) 1.00 37.2±0.41µs ? ?/sec 1.00 37.3±0.33µs ? ?/sec
convert_columns_prepared 4096 string view(30, 0) 1.00 34.2±0.08µs ? ?/sec 1.01 34.5±0.07µs ? ?/sec
convert_columns_prepared 4096 string(10, 0) 1.00 26.6±0.03µs ? ?/sec 1.01 26.7±0.08µs ? ?/sec
convert_columns_prepared 4096 string(100, 0) 1.00 36.8±0.13µs ? ?/sec 1.01 37.3±0.11µs ? ?/sec
convert_columns_prepared 4096 string(100, 0.5) 1.00 34.1±1.76µs ? ?/sec 1.01 34.3±0.37µs ? ?/sec
convert_columns_prepared 4096 string(20, 0.5), string(30, 0), string(100, 0), i64(0) 1.00 93.8±1.69µs ? ?/sec 1.01 94.6±1.64µs ? ?/sec
convert_columns_prepared 4096 string(30, 0) 1.00 29.5±1.26µs ? ?/sec 1.00 29.5±1.24µs ? ?/sec
convert_columns_prepared 4096 string_dictionary(10, 0) 1.00 49.2±0.04µs ? ?/sec 1.00 49.3±0.04µs ? ?/sec
convert_columns_prepared 4096 string_dictionary(100, 0) 1.00 72.0±0.19µs ? ?/sec 1.02 73.4±0.14µs ? ?/sec
convert_columns_prepared 4096 string_dictionary(100, 0.5) 1.00 52.1±0.17µs ? ?/sec 1.03 53.8±0.19µs ? ?/sec
convert_columns_prepared 4096 string_dictionary(30, 0) 1.00 55.1±1.29µs ? ?/sec 1.02 56.3±1.27µs ? ?/sec
convert_columns_prepared 4096 string_dictionary_low_cardinality(10, 0) 1.01 22.5±0.04µs ? ?/sec 1.00 22.3±0.06µs ? ?/sec
convert_columns_prepared 4096 string_dictionary_low_cardinality(100, 0) 1.00 32.7±0.02µs ? ?/sec 1.00 32.7±0.09µs ? ?/sec
convert_columns_prepared 4096 string_dictionary_low_cardinality(30, 0) 1.01 24.9±0.05µs ? ?/sec 1.00 24.7±0.03µs ? ?/sec
convert_columns_prepared 4096 u64(0) 1.00 4.2±0.01µs ? ?/sec 1.23 5.2±0.49µs ? ?/sec
convert_columns_prepared 4096 u64(0.3) 1.09 6.0±0.03µs ? ?/sec 1.00 5.5±0.01µs ? ?/sec
convert_columns_prepared 8192 53 columns 1.01 1730.7±10.02µs ? ?/sec 1.00 1721.1±1.86µs ? ?/sec
convert_rows 10 large_list(0) of u64(0) 1.34 1284.2±4.61ns ? ?/sec 1.00 957.3±4.62ns ? ?/sec
convert_rows 10 list(0) of u64(0) 1.33 1343.6±7.00ns ? ?/sec 1.00 1010.2±5.80ns ? ?/sec
convert_rows 4096 4096 string_dictionary(20, 0.5), string_dictionary(30, 0), string_dictionary(100, 0), i64(0) 1.07 235.2±0.55µs ? ?/sec 1.00 220.1±0.36µs ? ?/sec
convert_rows 4096 53 columns 1.10 1852.6±2.73µs ? ?/sec 1.00 1686.4±3.48µs ? ?/sec
convert_rows 4096 bool(0, 0.5) 1.03 13.8±0.01µs ? ?/sec 1.00 13.4±0.01µs ? ?/sec
convert_rows 4096 bool(0.3, 0.5) 1.03 13.8±0.01µs ? ?/sec 1.00 13.4±0.01µs ? ?/sec
convert_rows 4096 i64(0) 1.27 26.7±0.04µs ? ?/sec 1.00 21.0±0.02µs ? ?/sec
convert_rows 4096 i64(0.3) 1.27 26.7±0.02µs ? ?/sec 1.00 21.0±0.01µs ? ?/sec
convert_rows 4096 large_list(0) of u64(0) 1.04 165.7±0.27µs ? ?/sec 1.00 159.6±0.35µs ? ?/sec
convert_rows 4096 large_list(0) sliced to 10 of u64(0) 1.30 1591.6±3.51ns ? ?/sec 1.00 1228.8±6.64ns ? ?/sec
convert_rows 4096 list(0) of u64(0) 1.11 176.2±0.24µs ? ?/sec 1.00 159.1±0.31µs ? ?/sec
convert_rows 4096 list(0) sliced to 10 of u64(0) 1.28 1706.3±4.69ns ? ?/sec 1.00 1333.1±5.51ns ? ?/sec
convert_rows 4096 run_primitive(1024 physical) 1.03 78.0±0.16µs ? ?/sec 1.00 75.7±0.16µs ? ?/sec
convert_rows 4096 run_primitive(256 physical) 1.01 54.9±0.05µs ? ?/sec 1.00 54.5±0.09µs ? ?/sec
convert_rows 4096 run_primitive(512 physical) 1.02 63.2±0.09µs ? ?/sec 1.00 61.8±0.16µs ? ?/sec
convert_rows 4096 string view(1..100, 0) 1.00 70.7±0.07µs ? ?/sec 1.16 81.9±0.30µs ? ?/sec
convert_rows 4096 string view(1..100, 0.5) 1.00 48.4±0.08µs ? ?/sec 1.45 70.3±0.44µs ? ?/sec
convert_rows 4096 string view(10, 0) 1.12 50.5±0.05µs ? ?/sec 1.00 44.9±0.25µs ? ?/sec
convert_rows 4096 string view(100, 0) 1.06 102.6±0.12µs ? ?/sec 1.00 96.9±0.10µs ? ?/sec
convert_rows 4096 string view(100, 0.5) 1.00 62.5±0.06µs ? ?/sec 1.02 64.0±0.12µs ? ?/sec
convert_rows 4096 string view(30, 0) 1.09 63.6±0.11µs ? ?/sec 1.00 58.1±0.04µs ? ?/sec
convert_rows 4096 string(10, 0) 1.09 44.3±0.04µs ? ?/sec 1.00 40.6±0.07µs ? ?/sec
convert_rows 4096 string(100, 0) 1.03 101.8±0.09µs ? ?/sec 1.00 99.1±0.16µs ? ?/sec
convert_rows 4096 string(100, 0.5) 1.00 60.8±0.04µs ? ?/sec 1.02 61.9±0.18µs ? ?/sec
convert_rows 4096 string(20, 0.5), string(30, 0), string(100, 0), i64(0) 1.07 237.3±0.27µs ? ?/sec 1.00 222.3±0.37µs ? ?/sec
convert_rows 4096 string(30, 0) 1.08 69.3±0.08µs ? ?/sec 1.00 64.3±0.11µs ? ?/sec
convert_rows 4096 string_dictionary(10, 0) 1.09 44.4±0.05µs ? ?/sec 1.00 40.9±0.05µs ? ?/sec
convert_rows 4096 string_dictionary(100, 0) 1.03 102.1±0.07µs ? ?/sec 1.00 99.3±0.13µs ? ?/sec
convert_rows 4096 string_dictionary(100, 0.5) 1.00 60.9±0.04µs ? ?/sec 1.01 61.7±0.14µs ? ?/sec
convert_rows 4096 string_dictionary(30, 0) 1.08 69.6±0.06µs ? ?/sec 1.00 64.6±0.39µs ? ?/sec
convert_rows 4096 string_dictionary_low_cardinality(10, 0) 1.09 44.5±0.27µs ? ?/sec 1.00 40.7±0.03µs ? ?/sec
convert_rows 4096 string_dictionary_low_cardinality(100, 0) 1.02 101.7±0.10µs ? ?/sec 1.00 100.1±0.10µs ? ?/sec
convert_rows 4096 string_dictionary_low_cardinality(30, 0) 1.07 69.4±0.06µs ? ?/sec 1.00 64.8±0.42µs ? ?/sec
convert_rows 4096 u64(0) 1.28 26.3±0.03µs ? ?/sec 1.00 20.6±0.05µs ? ?/sec
convert_rows 4096 u64(0.3) 1.28 26.3±0.01µs ? ?/sec 1.00 20.6±0.02µs ? ?/sec
convert_rows 8192 53 columns 1.08 4.4±0.02ms ? ?/sec 1.00 4.1±0.01ms ? ?/sec
iterate rows 1.00 2.0±0.00µs ? ?/sec 1.00 2.0±0.00µs ? ?/sec
```
</p>
</details>
<details><summary>Resource Usage</summary>
**base (merge-base)**
| Metric | Value |
|--------|-------|
| Wall time | 1400.3s |
| Peak memory | 28.4 MiB |
| Avg memory | 8.5 MiB |
| CPU user | 1393.0s |
| CPU sys | 0.3s |
| Peak spill | 0 B |
**branch**
| Metric | Value |
|--------|-------|
| Wall time | 1430.3s |
| Peak memory | 22.5 MiB |
| Avg memory | 8.4 MiB |
| CPU user | 1425.5s |
| CPU sys | 0.3s |
| 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 `ArrayData` with direct `Array` construction in `arrow-row` [arrow-rs]
Posted by "Jefffrey (via GitHub)" <gi...@apache.org>.
Jefffrey commented on code in PR #10229:
URL: https://github.com/apache/arrow-rs/pull/10229#discussion_r3488031755
##########
arrow-row/src/variable.rs:
##########
@@ -69,6 +71,12 @@ pub(crate) fn non_null_padded_length(len: usize) -> usize {
}
}
+pub(crate) fn decode_nulls_sentinel(rows: &[&[u8]], options: SortOptions) -> Option<NullBuffer> {
Review Comment:
Similar to the one in `fixed.rs` but compares using `null_sentinel()`
##########
arrow-row/src/fixed.rs:
##########
@@ -402,61 +397,19 @@ pub fn decode_bool(rows: &mut [&[u8]], options: SortOptions) -> BooleanArray {
values.push(values_packed);
}
- let builder = ArrayDataBuilder::new(DataType::Boolean)
- .len(rows.len())
- .null_count(null_count)
- .add_buffer(values.into())
- .null_bit_buffer(Some(nulls.into()));
+ let nulls = NullBuffer::new(BooleanBuffer::new(nulls.into(), 0, len));
+ let nulls = (nulls.null_count() > 0).then_some(nulls);
- // SAFETY:
- // Buffers are the correct length
- unsafe { BooleanArray::from(builder.build_unchecked()) }
+ BooleanArray::new(BooleanBuffer::new(values.into(), 0, len), nulls)
}
/// Decodes a single byte from each row, interpreting `0x01` as a valid value
-/// and all other values as a null
-///
-/// Returns the null count and null buffer
-pub fn decode_nulls(rows: &[&[u8]]) -> (usize, Buffer) {
- let mut null_count = 0;
- let buffer = MutableBuffer::collect_bool(rows.len(), |idx| {
- let valid = rows[idx][0] == 1;
- null_count += !valid as usize;
- valid
- })
- .into();
- (null_count, buffer)
-}
-
-/// Decodes a `ArrayData` from rows based on the provided `FixedLengthEncoding` `T`
-///
-/// # Safety
-///
-/// `data_type` must be appropriate native type for `T`
-unsafe fn decode_fixed<T: FixedLengthEncoding + ArrowNativeType>(
Review Comment:
This has been inlined into `decode_primitive`
##########
arrow-row/src/fixed.rs:
##########
@@ -402,61 +397,19 @@ pub fn decode_bool(rows: &mut [&[u8]], options: SortOptions) -> BooleanArray {
values.push(values_packed);
}
- let builder = ArrayDataBuilder::new(DataType::Boolean)
- .len(rows.len())
- .null_count(null_count)
- .add_buffer(values.into())
- .null_bit_buffer(Some(nulls.into()));
+ let nulls = NullBuffer::new(BooleanBuffer::new(nulls.into(), 0, len));
+ let nulls = (nulls.null_count() > 0).then_some(nulls);
- // SAFETY:
- // Buffers are the correct length
- unsafe { BooleanArray::from(builder.build_unchecked()) }
+ BooleanArray::new(BooleanBuffer::new(values.into(), 0, len), nulls)
}
/// Decodes a single byte from each row, interpreting `0x01` as a valid value
-/// and all other values as a null
-///
-/// Returns the null count and null buffer
-pub fn decode_nulls(rows: &[&[u8]]) -> (usize, Buffer) {
Review Comment:
Instead of returning a separate null count & null buffer (as `Buffer`), just return `Option<NullBuffer>` where `None` is if the resulting null buffer has 0 nulls
--
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 `ArrayData` with direct `Array` construction in `arrow-row` [arrow-rs]
Posted by "Jefffrey (via GitHub)" <gi...@apache.org>.
Jefffrey commented on PR #10229:
URL: https://github.com/apache/arrow-rs/pull/10229#issuecomment-4826510154
fyi @liamzwbao since you worked on similar PRs before
--
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 `ArrayData` with direct `Array` construction in `arrow-row` [arrow-rs]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #10229:
URL: https://github.com/apache/arrow-rs/pull/10229#discussion_r3498685083
##########
arrow-row/src/fixed.rs:
##########
@@ -469,9 +422,20 @@ where
T::Native: FixedLengthEncoding,
{
assert!(PrimitiveArray::<T>::is_compatible(&data_type));
- // SAFETY:
- // Validated data type above
- unsafe { decode_fixed::<T::Native>(rows, data_type, options).into() }
+
+ let len = rows.len();
+
+ let mut values = BufferBuilder::<T::Native>::new(len);
Review Comment:
> locally i seem to get some nice speedups from switching to vec:
Yeah, the Rust team has optimized Vec *a lot*
> i wonder if we should also look for usages of [offset]bufferbuilder and replace them, like we're doing for arraydata 🤔
Yes, I think that would be a nice idea. I filed a ticket
- https://github.com/apache/arrow-rs/issues/10245
--
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 `ArrayData` with direct `Array` construction in `arrow-row` [arrow-rs]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #10229:
URL: https://github.com/apache/arrow-rs/pull/10229#issuecomment-4843465479
Thank you @Jefffrey
--
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 `ArrayData` with direct `Array` construction in `arrow-row` [arrow-rs]
Posted by "Jefffrey (via GitHub)" <gi...@apache.org>.
Jefffrey commented on PR #10229:
URL: https://github.com/apache/arrow-rs/pull/10229#issuecomment-4826541621
note to self: only convert_rows benchmarks should be affected, rest would be just noise
--
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 `ArrayData` with direct `Array` construction in `arrow-row` [arrow-rs]
Posted by "Jefffrey (via GitHub)" <gi...@apache.org>.
Jefffrey commented on PR #10229:
URL: https://github.com/apache/arrow-rs/pull/10229#issuecomment-4826541889
run benchmark row_format
--
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 `ArrayData` with direct `Array` construction in `arrow-row` [arrow-rs]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #10229:
URL: https://github.com/apache/arrow-rs/pull/10229#discussion_r3498648114
##########
arrow-row/src/fixed.rs:
##########
@@ -402,61 +397,19 @@ pub fn decode_bool(rows: &mut [&[u8]], options: SortOptions) -> BooleanArray {
values.push(values_packed);
}
- let builder = ArrayDataBuilder::new(DataType::Boolean)
- .len(rows.len())
- .null_count(null_count)
- .add_buffer(values.into())
- .null_bit_buffer(Some(nulls.into()));
+ let nulls = NullBuffer::new(BooleanBuffer::new(nulls.into(), 0, len));
+ let nulls = (nulls.null_count() > 0).then_some(nulls);
- // SAFETY:
- // Buffers are the correct length
- unsafe { BooleanArray::from(builder.build_unchecked()) }
+ BooleanArray::new(BooleanBuffer::new(values.into(), 0, len), nulls)
}
/// Decodes a single byte from each row, interpreting `0x01` as a valid value
-/// and all other values as a null
-///
-/// Returns the null count and null buffer
-pub fn decode_nulls(rows: &[&[u8]]) -> (usize, Buffer) {
Review Comment:
Yes -- when we last checked LLVM was using the native hardware instruction to count set bits which was crazy fast
As I recall there were a few times it was faster to avoid a second pass through the data, but only when the bits were already being processed a word (`u64`) at a time, not individually
--
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 `ArrayData` with direct `Array` construction in `arrow-row` [arrow-rs]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #10229:
URL: https://github.com/apache/arrow-rs/pull/10229#issuecomment-4826667414
🤖 Arrow criterion benchmark completed (GKE) | [trigger](https://github.com/apache/arrow-rs/pull/10229#issuecomment-4826541889)
**Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB)
<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 row-refactor-out-arraydata
----- ---- --------------------------
append_rows 10 large_list(0) of u64(0) 1.00 565.0±2.20ns ? ?/sec 1.00 562.7±3.68ns ? ?/sec
append_rows 10 list(0) of u64(0) 1.00 596.0±3.09ns ? ?/sec 1.00 597.0±3.63ns ? ?/sec
append_rows 4096 4096 string_dictionary(20, 0.5), string_dictionary(30, 0), string_dictionary(100, 0), i64(0) 1.00 184.8±1.55µs ? ?/sec 1.01 186.0±2.13µs ? ?/sec
append_rows 4096 53 columns 1.00 825.3±4.37µs ? ?/sec 1.00 823.4±0.92µs ? ?/sec
append_rows 4096 bool(0, 0.5) 1.05 5.1±0.02µs ? ?/sec 1.00 4.9±0.00µs ? ?/sec
append_rows 4096 bool(0.3, 0.5) 1.00 5.8±0.00µs ? ?/sec 1.00 5.8±0.00µs ? ?/sec
append_rows 4096 i64(0) 1.00 4.4±0.04µs ? ?/sec 1.00 4.4±0.01µs ? ?/sec
append_rows 4096 i64(0.3) 1.02 5.5±0.01µs ? ?/sec 1.00 5.4±0.00µs ? ?/sec
append_rows 4096 large_list(0) of u64(0) 1.03 91.3±0.25µs ? ?/sec 1.00 88.7±0.39µs ? ?/sec
append_rows 4096 large_list(0) sliced to 10 of u64(0) 1.00 773.7±4.27ns ? ?/sec 1.01 778.2±4.53ns ? ?/sec
append_rows 4096 list(0) of u64(0) 1.00 90.9±0.16µs ? ?/sec 1.01 91.6±0.17µs ? ?/sec
append_rows 4096 list(0) sliced to 10 of u64(0) 1.00 834.2±2.95ns ? ?/sec 1.02 850.4±3.73ns ? ?/sec
append_rows 4096 run_primitive(1024 physical) 1.01 22.5±0.20µs ? ?/sec 1.00 22.2±0.40µs ? ?/sec
append_rows 4096 run_primitive(256 physical) 1.00 12.4±0.06µs ? ?/sec 1.00 12.4±0.05µs ? ?/sec
append_rows 4096 run_primitive(512 physical) 1.00 15.3±0.19µs ? ?/sec 1.00 15.4±0.18µs ? ?/sec
append_rows 4096 string view(1..100, 0) 1.01 38.5±0.20µs ? ?/sec 1.00 37.9±0.13µs ? ?/sec
append_rows 4096 string view(1..100, 0.5) 1.05 32.2±0.33µs ? ?/sec 1.00 30.6±0.44µs ? ?/sec
append_rows 4096 string view(10, 0) 1.00 29.3±0.06µs ? ?/sec 1.00 29.4±0.03µs ? ?/sec
append_rows 4096 string view(100, 0) 1.00 44.2±0.18µs ? ?/sec 1.01 44.5±0.26µs ? ?/sec
append_rows 4096 string view(100, 0.5) 1.00 37.8±0.53µs ? ?/sec 1.00 37.6±0.37µs ? ?/sec
append_rows 4096 string view(30, 0) 1.00 34.3±0.06µs ? ?/sec 1.00 34.3±0.07µs ? ?/sec
append_rows 4096 string(10, 0) 1.00 26.5±0.03µs ? ?/sec 1.00 26.4±0.03µs ? ?/sec
append_rows 4096 string(100, 0) 1.00 36.1±0.13µs ? ?/sec 1.01 36.3±0.13µs ? ?/sec
append_rows 4096 string(100, 0.5) 1.00 32.4±0.44µs ? ?/sec 1.14 37.0±0.30µs ? ?/sec
append_rows 4096 string(20, 0.5), string(30, 0), string(100, 0), i64(0) 1.00 93.5±1.83µs ? ?/sec 1.03 96.7±1.50µs ? ?/sec
append_rows 4096 string(30, 0) 1.01 29.6±1.27µs ? ?/sec 1.00 29.4±1.26µs ? ?/sec
append_rows 4096 string_dictionary(10, 0) 1.00 49.6±0.05µs ? ?/sec 1.00 49.5±0.33µs ? ?/sec
append_rows 4096 string_dictionary(100, 0) 1.01 73.1±0.17µs ? ?/sec 1.00 72.3±0.26µs ? ?/sec
append_rows 4096 string_dictionary(100, 0.5) 1.00 50.8±0.15µs ? ?/sec 1.08 54.7±0.28µs ? ?/sec
append_rows 4096 string_dictionary(30, 0) 1.00 55.1±1.20µs ? ?/sec 1.00 55.0±1.45µs ? ?/sec
append_rows 4096 string_dictionary_low_cardinality(10, 0) 1.01 22.4±0.06µs ? ?/sec 1.00 22.2±0.03µs ? ?/sec
append_rows 4096 string_dictionary_low_cardinality(100, 0) 1.00 32.6±0.05µs ? ?/sec 1.00 32.6±0.25µs ? ?/sec
append_rows 4096 string_dictionary_low_cardinality(30, 0) 1.00 24.8±0.04µs ? ?/sec 1.00 24.8±0.26µs ? ?/sec
append_rows 4096 u64(0) 1.00 4.2±0.00µs ? ?/sec 1.00 4.2±0.01µs ? ?/sec
append_rows 4096 u64(0.3) 1.09 5.9±0.03µs ? ?/sec 1.00 5.4±0.00µs ? ?/sec
append_rows 8192 53 columns 1.00 1717.3±5.36µs ? ?/sec 1.00 1712.9±14.32µs ? ?/sec
convert_columns 10 large_list(0) of u64(0) 1.01 852.5±2.00ns ? ?/sec 1.00 847.8±4.44ns ? ?/sec
convert_columns 10 list(0) of u64(0) 1.00 871.3±2.52ns ? ?/sec 1.00 871.8±7.27ns ? ?/sec
convert_columns 4096 4096 string_dictionary(20, 0.5), string_dictionary(30, 0), string_dictionary(100, 0), i64(0) 1.01 190.4±2.42µs ? ?/sec 1.00 188.2±1.48µs ? ?/sec
convert_columns 4096 53 columns 1.00 826.1±2.17µs ? ?/sec 1.01 830.7±4.38µs ? ?/sec
convert_columns 4096 bool(0, 0.5) 1.06 5.5±0.07µs ? ?/sec 1.00 5.2±0.01µs ? ?/sec
convert_columns 4096 bool(0.3, 0.5) 1.00 6.0±0.00µs ? ?/sec 1.00 6.0±0.01µs ? ?/sec
convert_columns 4096 i64(0) 1.07 4.9±0.44µs ? ?/sec 1.00 4.6±0.01µs ? ?/sec
convert_columns 4096 i64(0.3) 1.01 5.7±0.00µs ? ?/sec 1.00 5.6±0.01µs ? ?/sec
convert_columns 4096 large_list(0) of u64(0) 1.02 91.4±0.20µs ? ?/sec 1.00 89.7±0.11µs ? ?/sec
convert_columns 4096 large_list(0) sliced to 10 of u64(0) 1.00 1047.3±2.36ns ? ?/sec 1.00 1049.6±3.96ns ? ?/sec
convert_columns 4096 list(0) of u64(0) 1.00 91.2±0.22µs ? ?/sec 1.01 92.0±0.21µs ? ?/sec
convert_columns 4096 list(0) sliced to 10 of u64(0) 1.00 1114.3±2.07ns ? ?/sec 1.00 1114.8±3.64ns ? ?/sec
convert_columns 4096 run_primitive(1024 physical) 1.00 22.5±0.43µs ? ?/sec 1.02 22.8±0.24µs ? ?/sec
convert_columns 4096 run_primitive(256 physical) 1.00 12.7±0.07µs ? ?/sec 1.00 12.7±0.05µs ? ?/sec
convert_columns 4096 run_primitive(512 physical) 1.01 15.8±0.21µs ? ?/sec 1.00 15.7±0.19µs ? ?/sec
convert_columns 4096 string view(1..100, 0) 1.01 38.5±0.19µs ? ?/sec 1.00 38.1±0.13µs ? ?/sec
convert_columns 4096 string view(1..100, 0.5) 1.04 32.3±0.37µs ? ?/sec 1.00 31.0±0.48µs ? ?/sec
convert_columns 4096 string view(10, 0) 1.00 29.6±0.11µs ? ?/sec 1.00 29.5±0.02µs ? ?/sec
convert_columns 4096 string view(100, 0) 1.00 44.1±0.27µs ? ?/sec 1.03 45.2±0.22µs ? ?/sec
convert_columns 4096 string view(100, 0.5) 1.00 37.6±0.30µs ? ?/sec 1.00 37.6±0.33µs ? ?/sec
convert_columns 4096 string view(30, 0) 1.00 34.6±0.11µs ? ?/sec 1.00 34.5±0.05µs ? ?/sec
convert_columns 4096 string(10, 0) 1.01 26.9±0.09µs ? ?/sec 1.00 26.7±0.06µs ? ?/sec
convert_columns 4096 string(100, 0) 1.01 37.0±0.35µs ? ?/sec 1.00 36.7±0.14µs ? ?/sec
convert_columns 4096 string(100, 0.5) 1.00 32.8±0.41µs ? ?/sec 1.12 36.6±0.27µs ? ?/sec
convert_columns 4096 string(20, 0.5), string(30, 0), string(100, 0), i64(0) 1.00 93.8±1.58µs ? ?/sec 1.04 97.3±1.55µs ? ?/sec
convert_columns 4096 string(30, 0) 1.01 29.8±1.31µs ? ?/sec 1.00 29.6±1.24µs ? ?/sec
convert_columns 4096 string_dictionary(10, 0) 1.00 50.2±0.06µs ? ?/sec 1.00 50.1±0.04µs ? ?/sec
convert_columns 4096 string_dictionary(100, 0) 1.00 73.6±0.68µs ? ?/sec 1.00 73.6±0.26µs ? ?/sec
convert_columns 4096 string_dictionary(100, 0.5) 1.00 52.2±0.19µs ? ?/sec 1.04 54.5±0.19µs ? ?/sec
convert_columns 4096 string_dictionary(30, 0) 1.00 56.1±1.26µs ? ?/sec 1.00 56.0±1.23µs ? ?/sec
convert_columns 4096 string_dictionary_low_cardinality(10, 0) 1.02 23.7±0.18µs ? ?/sec 1.00 23.2±0.04µs ? ?/sec
convert_columns 4096 string_dictionary_low_cardinality(100, 0) 1.01 33.6±0.05µs ? ?/sec 1.00 33.4±0.04µs ? ?/sec
convert_columns 4096 string_dictionary_low_cardinality(30, 0) 1.01 25.9±0.03µs ? ?/sec 1.00 25.7±0.06µs ? ?/sec
convert_columns 4096 u64(0) 1.01 4.4±0.06µs ? ?/sec 1.00 4.4±0.12µs ? ?/sec
convert_columns 4096 u64(0.3) 1.09 6.2±0.03µs ? ?/sec 1.00 5.6±0.01µs ? ?/sec
convert_columns 8192 53 columns 1.00 1734.2±27.33µs ? ?/sec 1.03 1782.7±35.84µs ? ?/sec
convert_columns_prepared 10 large_list(0) of u64(0) 1.00 638.6±2.35ns ? ?/sec 1.00 639.6±4.17ns ? ?/sec
convert_columns_prepared 10 list(0) of u64(0) 1.00 665.0±3.12ns ? ?/sec 1.00 664.4±4.02ns ? ?/sec
convert_columns_prepared 4096 4096 string_dictionary(20, 0.5), string_dictionary(30, 0), string_dictionary(100, 0), i64(0) 1.01 187.4±2.26µs ? ?/sec 1.00 186.3±1.50µs ? ?/sec
convert_columns_prepared 4096 53 columns 1.00 824.2±2.98µs ? ?/sec 1.00 825.8±2.18µs ? ?/sec
convert_columns_prepared 4096 bool(0, 0.5) 1.00 5.3±0.09µs ? ?/sec 1.01 5.3±0.20µs ? ?/sec
convert_columns_prepared 4096 bool(0.3, 0.5) 1.00 5.9±0.00µs ? ?/sec 1.00 5.9±0.02µs ? ?/sec
convert_columns_prepared 4096 i64(0) 1.01 4.5±0.01µs ? ?/sec 1.00 4.5±0.00µs ? ?/sec
convert_columns_prepared 4096 i64(0.3) 1.02 5.6±0.00µs ? ?/sec 1.00 5.5±0.01µs ? ?/sec
convert_columns_prepared 4096 large_list(0) of u64(0) 1.02 91.1±0.22µs ? ?/sec 1.00 89.0±0.21µs ? ?/sec
convert_columns_prepared 4096 large_list(0) sliced to 10 of u64(0) 1.00 842.0±2.83ns ? ?/sec 1.01 847.5±4.82ns ? ?/sec
convert_columns_prepared 4096 list(0) of u64(0) 1.00 91.2±0.22µs ? ?/sec 1.00 91.3±0.16µs ? ?/sec
convert_columns_prepared 4096 list(0) sliced to 10 of u64(0) 1.00 909.4±3.06ns ? ?/sec 1.00 911.2±3.43ns ? ?/sec
convert_columns_prepared 4096 run_primitive(1024 physical) 1.00 22.5±0.25µs ? ?/sec 1.01 22.6±0.25µs ? ?/sec
convert_columns_prepared 4096 run_primitive(256 physical) 1.00 12.5±0.05µs ? ?/sec 1.00 12.5±0.06µs ? ?/sec
convert_columns_prepared 4096 run_primitive(512 physical) 1.00 15.5±0.19µs ? ?/sec 1.00 15.5±0.17µs ? ?/sec
convert_columns_prepared 4096 string view(1..100, 0) 1.02 38.7±0.24µs ? ?/sec 1.00 38.1±0.13µs ? ?/sec
convert_columns_prepared 4096 string view(1..100, 0.5) 1.05 32.3±0.31µs ? ?/sec 1.00 30.7±0.43µs ? ?/sec
convert_columns_prepared 4096 string view(10, 0) 1.00 29.5±0.07µs ? ?/sec 1.00 29.4±0.03µs ? ?/sec
convert_columns_prepared 4096 string view(100, 0) 1.00 44.2±0.19µs ? ?/sec 1.02 45.1±0.30µs ? ?/sec
convert_columns_prepared 4096 string view(100, 0.5) 1.00 37.4±0.33µs ? ?/sec 1.00 37.5±0.45µs ? ?/sec
convert_columns_prepared 4096 string view(30, 0) 1.00 34.3±0.06µs ? ?/sec 1.00 34.4±0.05µs ? ?/sec
convert_columns_prepared 4096 string(10, 0) 1.00 26.8±0.03µs ? ?/sec 1.00 26.7±0.11µs ? ?/sec
convert_columns_prepared 4096 string(100, 0) 1.00 36.4±0.17µs ? ?/sec 1.02 37.2±0.15µs ? ?/sec
convert_columns_prepared 4096 string(100, 0.5) 1.00 32.4±0.54µs ? ?/sec 1.14 36.9±0.25µs ? ?/sec
convert_columns_prepared 4096 string(20, 0.5), string(30, 0), string(100, 0), i64(0) 1.00 93.4±1.81µs ? ?/sec 1.04 96.8±1.49µs ? ?/sec
convert_columns_prepared 4096 string(30, 0) 1.00 29.5±1.26µs ? ?/sec 1.00 29.5±1.26µs ? ?/sec
convert_columns_prepared 4096 string_dictionary(10, 0) 1.00 49.2±0.06µs ? ?/sec 1.00 49.3±0.05µs ? ?/sec
convert_columns_prepared 4096 string_dictionary(100, 0) 1.00 72.7±0.45µs ? ?/sec 1.00 72.7±0.82µs ? ?/sec
convert_columns_prepared 4096 string_dictionary(100, 0.5) 1.00 51.9±1.61µs ? ?/sec 1.04 54.2±0.24µs ? ?/sec
convert_columns_prepared 4096 string_dictionary(30, 0) 1.02 55.9±1.36µs ? ?/sec 1.00 54.7±1.28µs ? ?/sec
convert_columns_prepared 4096 string_dictionary_low_cardinality(10, 0) 1.01 22.5±0.04µs ? ?/sec 1.00 22.4±0.23µs ? ?/sec
convert_columns_prepared 4096 string_dictionary_low_cardinality(100, 0) 1.01 32.6±0.06µs ? ?/sec 1.00 32.3±0.04µs ? ?/sec
convert_columns_prepared 4096 string_dictionary_low_cardinality(30, 0) 1.01 24.9±0.03µs ? ?/sec 1.00 24.7±0.05µs ? ?/sec
convert_columns_prepared 4096 u64(0) 1.00 4.2±0.01µs ? ?/sec 1.00 4.3±0.01µs ? ?/sec
convert_columns_prepared 4096 u64(0.3) 1.09 6.0±0.03µs ? ?/sec 1.00 5.5±0.01µs ? ?/sec
convert_columns_prepared 8192 53 columns 1.00 1722.6±15.51µs ? ?/sec 1.01 1738.6±41.83µs ? ?/sec
convert_rows 10 large_list(0) of u64(0) 1.39 1313.8±15.75ns ? ?/sec 1.00 948.6±3.21ns ? ?/sec
convert_rows 10 list(0) of u64(0) 1.36 1366.6±12.86ns ? ?/sec 1.00 1003.3±4.65ns ? ?/sec
convert_rows 4096 4096 string_dictionary(20, 0.5), string_dictionary(30, 0), string_dictionary(100, 0), i64(0) 1.05 233.4±2.11µs ? ?/sec 1.00 223.4±0.85µs ? ?/sec
convert_rows 4096 53 columns 1.14 1876.7±8.83µs ? ?/sec 1.00 1643.0±4.29µs ? ?/sec
convert_rows 4096 bool(0, 0.5) 1.03 13.8±0.01µs ? ?/sec 1.00 13.4±0.01µs ? ?/sec
convert_rows 4096 bool(0.3, 0.5) 1.03 13.8±0.01µs ? ?/sec 1.00 13.5±0.03µs ? ?/sec
convert_rows 4096 i64(0) 1.27 26.6±0.02µs ? ?/sec 1.00 21.0±0.02µs ? ?/sec
convert_rows 4096 i64(0.3) 1.27 26.7±0.02µs ? ?/sec 1.00 21.0±0.12µs ? ?/sec
convert_rows 4096 large_list(0) of u64(0) 1.04 166.5±0.35µs ? ?/sec 1.00 159.5±0.42µs ? ?/sec
convert_rows 4096 large_list(0) sliced to 10 of u64(0) 1.34 1641.3±15.87ns ? ?/sec 1.00 1226.5±7.61ns ? ?/sec
convert_rows 4096 list(0) of u64(0) 1.11 176.3±0.28µs ? ?/sec 1.00 159.3±0.27µs ? ?/sec
convert_rows 4096 list(0) sliced to 10 of u64(0) 1.31 1739.2±10.78ns ? ?/sec 1.00 1325.0±4.81ns ? ?/sec
convert_rows 4096 run_primitive(1024 physical) 1.03 78.4±0.38µs ? ?/sec 1.00 75.7±0.14µs ? ?/sec
convert_rows 4096 run_primitive(256 physical) 1.00 54.8±0.12µs ? ?/sec 1.00 54.8±0.07µs ? ?/sec
convert_rows 4096 run_primitive(512 physical) 1.01 63.0±0.20µs ? ?/sec 1.00 62.4±0.06µs ? ?/sec
convert_rows 4096 string view(1..100, 0) 1.00 70.9±0.14µs ? ?/sec 1.16 82.5±0.36µs ? ?/sec
convert_rows 4096 string view(1..100, 0.5) 1.00 48.4±0.08µs ? ?/sec 1.45 70.4±0.41µs ? ?/sec
convert_rows 4096 string view(10, 0) 1.12 50.4±0.05µs ? ?/sec 1.00 45.2±0.81µs ? ?/sec
convert_rows 4096 string view(100, 0) 1.06 102.8±0.19µs ? ?/sec 1.00 96.9±0.18µs ? ?/sec
convert_rows 4096 string view(100, 0.5) 1.00 62.5±0.07µs ? ?/sec 1.02 63.7±0.26µs ? ?/sec
convert_rows 4096 string view(30, 0) 1.09 63.6±0.07µs ? ?/sec 1.00 58.1±0.03µs ? ?/sec
convert_rows 4096 string(10, 0) 1.09 44.2±0.06µs ? ?/sec 1.00 40.4±0.06µs ? ?/sec
convert_rows 4096 string(100, 0) 1.03 102.0±0.34µs ? ?/sec 1.00 99.0±0.09µs ? ?/sec
convert_rows 4096 string(100, 0.5) 1.00 61.4±0.05µs ? ?/sec 1.01 61.8±0.19µs ? ?/sec
convert_rows 4096 string(20, 0.5), string(30, 0), string(100, 0), i64(0) 1.06 232.1±0.54µs ? ?/sec 1.00 218.6±0.96µs ? ?/sec
convert_rows 4096 string(30, 0) 1.08 69.2±0.08µs ? ?/sec 1.00 64.3±0.10µs ? ?/sec
convert_rows 4096 string_dictionary(10, 0) 1.09 44.4±0.04µs ? ?/sec 1.00 40.6±0.20µs ? ?/sec
convert_rows 4096 string_dictionary(100, 0) 1.02 101.8±0.15µs ? ?/sec 1.00 99.3±0.07µs ? ?/sec
convert_rows 4096 string_dictionary(100, 0.5) 1.00 61.4±0.14µs ? ?/sec 1.01 62.0±0.17µs ? ?/sec
convert_rows 4096 string_dictionary(30, 0) 1.08 69.6±0.08µs ? ?/sec 1.00 64.6±0.05µs ? ?/sec
convert_rows 4096 string_dictionary_low_cardinality(10, 0) 1.10 44.5±0.05µs ? ?/sec 1.00 40.5±0.04µs ? ?/sec
convert_rows 4096 string_dictionary_low_cardinality(100, 0) 1.04 103.1±0.24µs ? ?/sec 1.00 99.2±0.07µs ? ?/sec
convert_rows 4096 string_dictionary_low_cardinality(30, 0) 1.08 69.6±0.08µs ? ?/sec 1.00 64.6±0.06µs ? ?/sec
convert_rows 4096 u64(0) 1.28 26.3±0.03µs ? ?/sec 1.00 20.6±0.02µs ? ?/sec
convert_rows 4096 u64(0.3) 1.28 26.3±0.02µs ? ?/sec 1.00 20.6±0.02µs ? ?/sec
convert_rows 8192 53 columns 1.02 4.4±0.01ms ? ?/sec 1.00 4.3±0.51ms ? ?/sec
iterate rows 1.00 2.0±0.00µs ? ?/sec 1.00 2.0±0.00µs ? ?/sec
```
</p>
</details>
<details><summary>Resource Usage</summary>
**base (merge-base)**
| Metric | Value |
|--------|-------|
| Wall time | 1405.3s |
| Peak memory | 27.4 MiB |
| Avg memory | 8.5 MiB |
| CPU user | 1399.1s |
| CPU sys | 0.3s |
| Peak spill | 0 B |
**branch**
| Metric | Value |
|--------|-------|
| Wall time | 1425.3s |
| Peak memory | 22.0 MiB |
| Avg memory | 8.5 MiB |
| CPU user | 1423.5s |
| CPU sys | 0.3s |
| 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 `ArrayData` with direct `Array` construction in `arrow-row` [arrow-rs]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #10229:
URL: https://github.com/apache/arrow-rs/pull/10229#issuecomment-4826404001
🤖 Arrow criterion benchmark running (GKE) | [trigger](https://github.com/apache/arrow-rs/pull/10229#issuecomment-4826396486)
**Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB) | `Linux bench-c4826396486-730-fh22t 6.12.85+ #1 SMP Mon May 11 08:17:35 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 row-refactor-out-arraydata (033eb205f5730929f570880ba9fb3c35751531e1) to da07bce (merge-base) [diff](https://github.com/apache/arrow-rs/compare/da07bced959e1f2cb2bb9dd13429c372a028284d..033eb205f5730929f570880ba9fb3c35751531e1)
BENCH_NAME=row_format
BENCH_COMMAND=cargo bench --features=arrow,async,test_common,experimental,object_store --bench row_format
BENCH_FILTER=
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