Re: [PR] perf: bypass values.value(i) for inline strings in ArrowBytesViewMap [datafusion]
Dandandan merged PR #22172: URL: https://github.com/apache/datafusion/pull/22172 -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] perf: bypass values.value(i) for inline strings in ArrowBytesViewMap [datafusion]
Dandandan commented on code in PR #22172:
URL: https://github.com/apache/datafusion/pull/22172#discussion_r3249321326
##
datafusion/physical-expr-common/src/binary_view_map.rs:
##
@@ -339,11 +339,31 @@ where
payload
} else {
// no existing value, make a new one
-let value: &[u8] = values.value(i).as_ref();
-let payload = make_payload_fn(Some(value));
+let (new_view, payload) = if len <= 12 {
+// Inline path: bytes are already packed in view_u128.
+// The inline ByteView format is [len:u32 LE][data:12
bytes zero-padded],
+// so extracting bytes from the u128 avoids a round-trip
through
+// values.value(i) (which reads the views buffer and
returns the same slice).
+let view_bytes = view_u128.to_le_bytes();
+let value = &view_bytes[4..4 + len as usize];
+let payload = make_payload_fn(Some(value));
+// For inline strings, the stored view is identical to the
input view:
+// make_view(value, 0, 0) produces the same u128 as
view_u128.
+//
+// SAFETY: the enclosing `if len <= 12` branch establishes
+// that view_u128 is a valid inline ByteView. Its low 32
+// bits encode `len` (<= 12) and the next 12 bytes are the
+// value bytes the source array produced for this row, so
+// every required invariant of `append_inline_view` holds.
Review Comment:
π―
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
Re: [PR] perf: bypass values.value(i) for inline strings in ArrowBytesViewMap [datafusion]
alamb commented on PR #22172: URL: https://github.com/apache/datafusion/pull/22172#issuecomment-4460571238 Will plan to merge this in the next day or two to give some others time to review if they want -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] perf: bypass values.value(i) for inline strings in ArrowBytesViewMap [datafusion]
alamb commented on code in PR #22172:
URL: https://github.com/apache/datafusion/pull/22172#discussion_r3248121553
##
datafusion/physical-expr-common/src/binary_view_map.rs:
##
@@ -339,11 +339,31 @@ where
payload
} else {
// no existing value, make a new one
-let value: &[u8] = values.value(i).as_ref();
-let payload = make_payload_fn(Some(value));
+let (new_view, payload) = if len <= 12 {
+// Inline path: bytes are already packed in view_u128.
+// The inline ByteView format is [len:u32 LE][data:12
bytes zero-padded],
+// so extracting bytes from the u128 avoids a round-trip
through
+// values.value(i) (which reads the views buffer and
returns the same slice).
+let view_bytes = view_u128.to_le_bytes();
+let value = &view_bytes[4..4 + len as usize];
+let payload = make_payload_fn(Some(value));
+// For inline strings, the stored view is identical to the
input view:
+// make_view(value, 0, 0) produces the same u128 as
view_u128.
+//
+// SAFETY: the enclosing `if len <= 12` branch establishes
+// that view_u128 is a valid inline ByteView. Its low 32
+// bits encode `len` (<= 12) and the next 12 bytes are the
+// value bytes the source array produced for this row, so
+// every required invariant of `append_inline_view` holds.
Review Comment:
this seems overly verbose -- I think the justification is that `view_u128`
was a valid view and len <= 12
```suggestion
// SAFETY: view_u128 was a valid view, and the
encosing`len <= 12`
// ensures it is inline
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
Re: [PR] perf: bypass values.value(i) for inline strings in ArrowBytesViewMap [datafusion]
alamb commented on PR #22172: URL: https://github.com/apache/datafusion/pull/22172#issuecomment-4459683619 > (I am trying to see if the last run was noise) The run was 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] perf: bypass values.value(i) for inline strings in ArrowBytesViewMap [datafusion]
RyanJamesStewart commented on PR #22172: URL: https://github.com/apache/datafusion/pull/22172#issuecomment-4455314950 v2 pushed (72bea57): 1. `append_inline_view` is now `unsafe fn` with a `# Safety` paragraph spelling out what goes wrong if a non-inline view is passed (downstream `views` consumers interpret the high 96 bits as `[buffer_index, offset]` into the completed/in_progress buffers, which is unsound). The single call site in `insert_if_new_inner` is annotated with a `SAFETY:` comment pointing at the enclosing `if len <= 12` branch that establishes the invariant. 2. `benches/binary_view_map_insert.rs` removed along with the `[[bench]]` entry in the crate's Cargo.toml. Behavior unchanged. 8/8 binary_view_map tests pass; clippy + fmt clean. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] perf: bypass values.value(i) for inline strings in ArrowBytesViewMap [datafusion]
adriangbot commented on PR #22172: URL: https://github.com/apache/datafusion/pull/22172#issuecomment-4454658602 π€ Benchmark completed (GKE) | [trigger](https://github.com/apache/datafusion/pull/22172#issuecomment-4454535344) **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 ``` Comparing HEAD and perf_binary-view-map-inline-bypass Benchmark clickbench_partitioned.json βββββ³ββββ³ββββ³ββββ β Query β HEAD β perf_binary-view-map-inline-bypass βChange β β‘ββββββββββββββββ© β QQuery 0 β 1.20 / 4.70 Β±6.85 / 18.39 ms β 1.22 / 4.67 Β±6.81 / 18.29 ms β no change β β QQuery 1 β12.68 / 12.86 Β±0.12 / 13.00 ms β12.82 / 13.08 Β±0.22 / 13.46 ms β no change β β QQuery 2 β35.80 / 36.36 Β±0.46 / 37.18 ms β35.45 / 35.90 Β±0.40 / 36.64 ms β no change β β QQuery 3 β31.42 / 32.07 Β±0.55 / 33.08 ms β31.44 / 32.42 Β±0.90 / 33.95 ms β no change β β QQuery 4 β 236.22 / 243.19 Β±4.08 / 248.68 ms β 235.46 / 239.66 Β±2.23 / 241.30 ms β no change β β QQuery 5 β 287.36 / 288.95 Β±2.41 / 293.71 ms β 279.62 / 283.44 Β±4.41 / 291.78 ms β no change β β QQuery 6 β 6.41 / 7.41 Β±0.59 / 7.96 ms β 5.96 / 6.90 Β±0.61 / 7.79 ms β +1.08x faster β β QQuery 7 β14.06 / 14.22 Β±0.10 / 14.37 ms β13.79 / 15.71 Β±3.50 / 22.70 ms β 1.10x slower β β QQuery 8 β 320.99 / 323.09 Β±1.79 / 326.36 ms β 320.63 / 323.46 Β±2.26 / 326.96 ms β no change β β QQuery 9 β 459.62 / 466.85 Β±6.91 / 479.98 ms β 461.58 / 466.24 Β±5.18 / 474.73 ms β no change β β QQuery 10 β69.50 / 70.11 Β±0.54 / 71.09 ms β70.31 / 71.21 Β±0.79 / 72.64 ms β no change β β QQuery 11 β79.64 / 80.67 Β±0.67 / 81.34 ms β81.91 / 82.49 Β±0.55 / 83.54 ms β no change β β QQuery 12 β 274.33 / 280.92 Β±4.71 / 285.28 ms β 277.33 / 284.95 Β±7.39 / 297.65 ms β no change β β QQuery 13 β 386.74 / 392.53 Β±4.19 / 399.77 ms β385.19 / 401.17 Β±13.21 / 423.85 ms β no change β β QQuery 14 β 282.37 / 288.07 Β±5.31 / 297.42 ms β 280.14 / 284.57 Β±3.09 / 289.25 ms β no change β
Re: [PR] perf: bypass values.value(i) for inline strings in ArrowBytesViewMap [datafusion]
adriangbot commented on PR #22172: URL: https://github.com/apache/datafusion/pull/22172#issuecomment-4454557211 π€ Benchmark running (GKE) | [trigger](https://github.com/apache/datafusion/pull/22172#issuecomment-4454535344) **Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB) | `Linux bench-c4454535344-108-f4fng 6.12.68+ #1 SMP Wed Apr 1 02:23:28 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 perf/binary-view-map-inline-bypass (1364643d693adecc4c1b3ff7c4edbdb2adf70346) to 18a219c (merge-base) [diff](https://github.com/apache/datafusion/compare/18a219c7285278d90c91d6ed51ee96a43e6a35e6..1364643d693adecc4c1b3ff7c4edbdb2adf70346) using: clickbench_partitioned 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] perf: bypass values.value(i) for inline strings in ArrowBytesViewMap [datafusion]
alamb commented on PR #22172: URL: https://github.com/apache/datafusion/pull/22172#issuecomment-4454535344 run benchmark clickbench_partitioned -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] perf: bypass values.value(i) for inline strings in ArrowBytesViewMap [datafusion]
alamb commented on PR #22172: URL: https://github.com/apache/datafusion/pull/22172#issuecomment-4454536355 (I am trying to see if the last run was 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] perf: bypass values.value(i) for inline strings in ArrowBytesViewMap [datafusion]
adriangbot commented on PR #22172: URL: https://github.com/apache/datafusion/pull/22172#issuecomment-4454153171 π€ Benchmark completed (GKE) | [trigger](https://github.com/apache/datafusion/pull/22172#issuecomment-4453991269) **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 ``` Comparing HEAD and perf_binary-view-map-inline-bypass Benchmark clickbench_partitioned.json βββββ³ββββ³ββββ³ββββ β Query β HEAD β perf_binary-view-map-inline-bypass βChange β β‘ββββββββββββββββ© β QQuery 0 β 1.21 / 4.54 Β±6.61 / 17.76 ms β 1.22 / 4.58 Β±6.66 / 17.89 ms β no change β β QQuery 1 β12.51 / 12.66 Β±0.18 / 13.02 ms β12.67 / 12.74 Β±0.06 / 12.85 ms β no change β β QQuery 2 β35.12 / 35.69 Β±0.51 / 36.50 ms β35.20 / 35.41 Β±0.19 / 35.71 ms β no change β β QQuery 3 β30.72 / 31.19 Β±0.65 / 32.46 ms β30.64 / 30.84 Β±0.11 / 30.97 ms β no change β β QQuery 4 β 226.22 / 233.31 Β±6.51 / 243.59 ms β 227.15 / 232.17 Β±3.60 / 237.80 ms β no change β β QQuery 5 β 275.41 / 277.22 Β±1.70 / 280.11 ms β 274.05 / 275.30 Β±1.51 / 278.06 ms β no change β β QQuery 6 β 6.76 / 7.49 Β±0.38 / 7.88 ms β 6.55 / 7.26 Β±0.58 / 8.14 ms β no change β β QQuery 7 β13.37 / 13.53 Β±0.09 / 13.63 ms β13.40 / 13.59 Β±0.12 / 13.77 ms β no change β β QQuery 8 β 311.36 / 317.82 Β±4.32 / 324.55 ms β 312.10 / 315.05 Β±2.05 / 317.63 ms β no change β β QQuery 9 β428.67 / 447.16 Β±10.90 / 462.58 ms β 435.22 / 444.52 Β±5.16 / 448.92 ms β no change β β QQuery 10 β67.86 / 69.08 Β±0.92 / 70.22 ms β70.02 / 73.65 Β±5.19 / 83.66 ms β 1.07x slower β β QQuery 11 β78.26 / 79.96 Β±1.78 / 83.38 ms β80.70 / 81.69 Β±0.73 / 82.73 ms β no change β β QQuery 12 β 268.33 / 273.33 Β±5.10 / 282.45 ms β 267.56 / 272.79 Β±4.04 / 279.39 ms β no change β β QQuery 13 β 376.79 / 383.35 Β±5.05 / 389.23 ms β 376.74 / 382.83 Β±4.27 / 389.45 ms β no change β β QQuery 14 β 276.50 / 279.56 Β±2.85 / 284.49 ms β 279.15 / 282.42 Β±3.04 / 287.34 ms β no change β
Re: [PR] perf: bypass values.value(i) for inline strings in ArrowBytesViewMap [datafusion]
adriangbot commented on PR #22172: URL: https://github.com/apache/datafusion/pull/22172#issuecomment-4454128039 π€ Benchmark completed (GKE) | [trigger](https://github.com/apache/datafusion/pull/22172#issuecomment-4453991269) **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 ``` Comparing HEAD and perf_binary-view-map-inline-bypass Benchmark tpcds_sf1.json βββββ³ββββ³ββββ³βββ β Query β HEAD β perf_binary-view-map-inline-bypass β Change β β‘βββββββββββββββ© β QQuery 1 β 6.43 / 7.18 Β±0.89 / 8.82 ms β 6.43 / 6.90 Β±0.87 / 8.65 ms βno change β β QQuery 2 β82.04 / 82.39 Β±0.20 / 82.67 ms β82.33 / 82.57 Β±0.27 / 82.94 ms βno change β β QQuery 3 β29.20 / 29.44 Β±0.24 / 29.81 ms β28.87 / 29.23 Β±0.21 / 29.46 ms βno change β β QQuery 4 β 532.84 / 536.24 Β±3.80 / 543.44 ms β 524.40 / 531.46 Β±5.64 / 538.58 ms βno change β β QQuery 5 β52.93 / 53.29 Β±0.29 / 53.67 ms β52.82 / 53.36 Β±0.38 / 53.97 ms βno change β β QQuery 6 β36.11 / 36.55 Β±0.25 / 36.85 ms β35.59 / 35.93 Β±0.34 / 36.51 ms βno change β β QQuery 7 β 111.33 / 113.24 Β±1.81 / 116.49 ms β 111.03 / 113.57 Β±3.28 / 119.99 ms βno change β β QQuery 8 β39.48 / 39.93 Β±0.23 / 40.11 ms β40.06 / 40.35 Β±0.27 / 40.71 ms βno change β β QQuery 9 β53.47 / 56.22 Β±1.80 / 58.48 ms β54.64 / 56.53 Β±1.24 / 58.56 ms βno change β β QQuery 10 β81.15 / 82.17 Β±1.21 / 84.40 ms β82.42 / 83.73 Β±1.50 / 86.46 ms βno change β β QQuery 11 β 325.31 / 329.38 Β±4.24 / 337.07 ms β 328.19 / 331.92 Β±3.88 / 339.10 ms βno change β β QQuery 12 β29.31 / 29.58 Β±0.22 / 29.96 ms β29.07 / 29.53 Β±0.30 / 29.85 ms βno change β β QQuery 13 β 129.31 / 129.95 Β±0.47 / 130.76 ms β 129.93 / 130.24 Β±0.17 / 130.43 ms βno change β β QQuery 14 β 519.35 / 521.56 Β±1.97 / 525.24 ms β 518.44 / 519.17 Β±0.46 / 519.88 ms βno change β β QQuery 15 β62.89 / 64.51 Β±1.83 / 68.08 ms β62.52 / 62.94 Β±0.39 / 63.53 ms βno change β β QQuery 16 β 7.1
Re: [PR] perf: bypass values.value(i) for inline strings in ArrowBytesViewMap [datafusion]
adriangbot commented on PR #22172: URL: https://github.com/apache/datafusion/pull/22172#issuecomment-4454120283 π€ Benchmark completed (GKE) | [trigger](https://github.com/apache/datafusion/pull/22172#issuecomment-4453991269) **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 ``` Comparing HEAD and perf_binary-view-map-inline-bypass Benchmark tpch_sf1.json βββββ³β³β³ββββ β Query β HEAD β perf_binary-view-map-inline-bypass βChange β β‘ββββββββββ© β QQuery 1 β 38.27 / 39.31 Β±1.18 / 41.37 ms β 38.19 / 39.05 Β±1.11 / 41.06 ms β no change β β QQuery 2 β 20.40 / 20.54 Β±0.13 / 20.76 ms β 20.68 / 21.21 Β±0.44 / 21.92 ms β no change β β QQuery 3 β 34.98 / 37.17 Β±1.14 / 38.18 ms β 34.32 / 36.82 Β±1.27 / 37.86 ms β no change β β QQuery 4 β 16.95 / 17.38 Β±0.59 / 18.54 ms β 16.97 / 17.18 Β±0.14 / 17.40 ms β no change β β QQuery 5 β 45.62 / 48.21 Β±1.47 / 49.65 ms β 42.08 / 45.84 Β±2.62 / 49.78 ms β no change β β QQuery 6 β 16.17 / 16.55 Β±0.55 / 17.63 ms β 16.06 / 16.56 Β±0.48 / 17.44 ms β no change β β QQuery 7 β 49.53 / 51.17 Β±2.17 / 55.27 ms β 48.25 / 49.66 Β±1.10 / 51.64 ms β no change β β QQuery 8 β 44.62 / 44.96 Β±0.21 / 45.22 ms β 44.79 / 45.94 Β±0.93 / 47.46 ms β no change β β QQuery 9 β 49.88 / 51.50 Β±1.56 / 53.96 ms β 50.55 / 51.39 Β±0.77 / 52.41 ms β no change β β QQuery 10 β 63.45 / 65.43 Β±1.19 / 66.92 ms β 63.70 / 64.96 Β±1.52 / 67.37 ms β no change β β QQuery 11 β 13.51 / 14.40 Β±0.70 / 15.38 ms β 13.61 / 13.81 Β±0.19 / 14.10 ms β no change β β QQuery 12 β 24.75 / 25.26 Β±0.73 / 26.71 ms β 24.45 / 24.90 Β±0.25 / 25.22 ms β no change β β QQuery 13 β 35.16 / 35.77 Β±0.48 / 36.34 ms β 34.66 / 35.86 Β±0.66 / 36.53 ms β no change β β QQuery 14 β 25.27 / 25.56 Β±0.21 / 25.92 ms β 25.18 / 25.65 Β±0.67 / 26.97 ms β no change β β QQuery 15 β 30.58 / 31.45 Β±1.33 / 34.11 ms β 30.66 / 31.06 Β±0.47 / 31.93 ms β no change β β QQuery 16 β 15.44 / 15.66 Β±0.19 / 15.98 ms β 15.79 / 16.00 Β±0.17 / 16.25 ms β no change β β QQuery 17 β 78.63 / 82.23 Β±3.96 / 89.86 ms β 74.57 / 77.79 Β±3.77 / 83.46 ms β +
Re: [PR] perf: bypass values.value(i) for inline strings in ArrowBytesViewMap [datafusion]
adriangbot commented on PR #22172: URL: https://github.com/apache/datafusion/pull/22172#issuecomment-4454013101 π€ Benchmark running (GKE) | [trigger](https://github.com/apache/datafusion/pull/22172#issuecomment-4453991269) **Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB) | `Linux bench-c4453991269-104-fn27b 6.12.68+ #1 SMP Wed Apr 1 02:23:28 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 perf/binary-view-map-inline-bypass (1364643d693adecc4c1b3ff7c4edbdb2adf70346) to 18a219c (merge-base) [diff](https://github.com/apache/datafusion/compare/18a219c7285278d90c91d6ed51ee96a43e6a35e6..1364643d693adecc4c1b3ff7c4edbdb2adf70346) using: clickbench_partitioned 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] perf: bypass values.value(i) for inline strings in ArrowBytesViewMap [datafusion]
adriangbot commented on PR #22172: URL: https://github.com/apache/datafusion/pull/22172#issuecomment-4454013293 π€ Benchmark running (GKE) | [trigger](https://github.com/apache/datafusion/pull/22172#issuecomment-4453991269) **Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB) | `Linux bench-c4453991269-106-6fmpv 6.12.68+ #1 SMP Wed Apr 1 02:23:28 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 perf/binary-view-map-inline-bypass (1364643d693adecc4c1b3ff7c4edbdb2adf70346) to 18a219c (merge-base) [diff](https://github.com/apache/datafusion/compare/18a219c7285278d90c91d6ed51ee96a43e6a35e6..1364643d693adecc4c1b3ff7c4edbdb2adf70346) using: tpch 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] perf: bypass values.value(i) for inline strings in ArrowBytesViewMap [datafusion]
adriangbot commented on PR #22172: URL: https://github.com/apache/datafusion/pull/22172#issuecomment-4454006078 π€ Benchmark running (GKE) | [trigger](https://github.com/apache/datafusion/pull/22172#issuecomment-4453991269) **Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB) | `Linux bench-c4453991269-105-h75vk 6.12.68+ #1 SMP Wed Apr 1 02:23:28 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 perf/binary-view-map-inline-bypass (1364643d693adecc4c1b3ff7c4edbdb2adf70346) to 18a219c (merge-base) [diff](https://github.com/apache/datafusion/compare/18a219c7285278d90c91d6ed51ee96a43e6a35e6..1364643d693adecc4c1b3ff7c4edbdb2adf70346) using: tpcds 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] perf: bypass values.value(i) for inline strings in ArrowBytesViewMap [datafusion]
alamb commented on PR #22172: URL: https://github.com/apache/datafusion/pull/22172#issuecomment-4453991269 run benchmarks -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] perf: bypass values.value(i) for inline strings in ArrowBytesViewMap [datafusion]
alamb commented on PR #22172: URL: https://github.com/apache/datafusion/pull/22172#issuecomment-4453990830 FYI @Dandandan -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] perf: bypass values.value(i) for inline strings in ArrowBytesViewMap [datafusion]
alamb commented on code in PR #22172:
URL: https://github.com/apache/datafusion/pull/22172#discussion_r3243710520
##
datafusion/physical-expr-common/src/binary_view_map.rs:
##
@@ -389,6 +403,17 @@ where
}
}
+/// Append an already-computed inline view (len <= 12) directly, bypassing
+/// buffer allocation. The caller guarantees that `view` is a valid inline
+/// ByteView (length field in the low 32 bits is <= 12).
+///
+/// Returns the view that was stored (identical to the argument).
+fn append_inline_view(&mut self, view: u128) -> u128 {
Review Comment:
Given this assumption I think this function should be marked as `unsafe` (I
think it is correct, but the compiler can't verify it)
```suggestion
unsafe fn append_inline_view(&mut self, view: u128) -> u128 {
```
Then this will force us to annotate the callsite with `unsafe` as well where
it can be more easily verified that the input was a valid inline view so this
function is safe
##
datafusion/physical-expr-common/benches/binary_view_map_insert.rs:
##
@@ -0,0 +1,91 @@
+// Licensed to the Apache Software Foundation (ASF) under one
Review Comment:
While this benchmark is cool, I am not sure we need to commit it to the repo
as I think its utility will be low after this PR has been merged (I think it is
unlikely to get run regularly)
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
