You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "mbutrovich (via GitHub)" <gi...@apache.org> on 2026/10/12 22:05:19 UTC
[PR] perf(arrow-buffer): divide `i256` magnitudes below 2^128 with one `u128` division [arrow-rs]
mbutrovich opened a new pull request, #11530:
URL: https://github.com/apache/arrow-rs/pull/11530
# Which issue does this PR close?
- Part of #11451.
- Part of #11421.
# Rationale for this change
See #11451. This is its second item, the fast path for operands that fit in `i128`.
The path applies where `i256` holds the product of two `Decimal128` values before a rescale, as in `multiply_fixed_point` and Comet's [`div_round_half_up`](https://github.com/apache/datafusion-comet/blob/8d0bb01a5a99924024e07c1722e6eddd9260e167/native/spark-expr/src/math_funcs/wide_decimal_binary_expr.rs#L123-L146), and to `Decimal256` columns whose values have at most 38 digits.
# What changes are included in this PR?
`i256::div_rem` divides the magnitudes with one `u128` division when both are below 2^128, and with the long division otherwise. The checks before it and the sign handling after it don't change. This covers every pair of operands that fits in `i128`, and `i128::MIN / -1` needs no special case because the magnitudes are taken first.
# Are these changes tested?
`test_div_rem_powers_of_ten` and `test_i256_fuzz` in `arrow-buffer/src/bigint/mod.rs` cover both sides of the new boundary, with dividends such as `i256::from_parts(u128::MAX, 0)` and `i256::from_parts(0, 1)`, both signs, and every power of ten up to 10^76 as the divisor.
These numbers are from an Apple M5 Max with rustc 1.99.0 and criterion with a 1 s warm-up and 2 s of measurement. #11528 is applied on both sides, because it changes how often `make_downscaler` calls `div_rem`. Each column is a build setting, and each value is the speedup over `main` with no nulls:
| Case | Default profile | Thin LTO, 1 codegen unit | Fat LTO, 1 codegen unit |
|---|---|---|---|
| `cast_decimal`: `Decimal256` (76, 10) to (76, 2), 38 digits | 1.64x | 1.33x | 1.33x |
| `cast_decimal`: `Decimal256` (41, 20) to `Decimal128` (38, 6), 30 digits | 1.62x | 1.48x | 1.44x |
| `decimal_division`: `decimal256_scalar/div_30_digits_by_4_digits` | 1.17x | 1.18x | 1.17x |
| `decimal_division`: `decimal256_scalar/rem_30_digits_by_4_digits` | 1.18x | 1.17x | 1.17x |
| `cast_decimal`: `Decimal256` (76, 10) to (76, 2), 60 digits | 0.97x | 1.02x | 1.00x |
| `cast_decimal`: 48-digit fallible casts | 0.97x to 0.98x | 1.00x to 1.01x | 1.00x to 1.01x |
| `cast_decimal`: 42-digit fallible casts | 0.96x to 0.97x | 0.99x to 1.11x | 0.94x to 0.96x |
| `decimal_division`: `div` and `rem` of 60 digits by 4 digits | 0.98x, 0.99x | 0.93x, 0.93x | 0.93x, 0.92x |
| `decimal_division`: `div` and `rem` of 60 digits by 40 digits | 1.00x, 1.00x | 0.99x, 1.00x | 0.97x, 0.97x |
| `i256`: `i256_div_rem` | 0.98x | 1.00x | 0.99x |
The first four cases take the new path. The thin LTO baseline of the 38-digit cast without nulls was disturbed, so that cell uses the case with nulls, which costs the same.
Wide values pay for the check before the long division. With LTO that costs about 2 ns per division, which shows only when the divisor fits in 64 bits and the long division is short, as in the 60-digit by 4-digit cases. Forcing loop alignment with `-C llvm-args=-align-loops=64` didn't change it. The precomputed divisors in #11421 would take `Decimal256` `/` and `%` by a scalar off this path.
`multiply_fixed_point` also takes the new path, but #11526 changes its per-row divisions, so its numbers are left out until that merges.
I'll run the benchmark bot on this PR for arm64 and x86_64 numbers.
# Are there any significant user-facing changes?
No.
## AI Disclosure
I wrote this PR with help from Claude but understand and support the core approach, implementation, and test coverage.
--
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] perf(arrow-buffer): divide `i256` magnitudes below 2^128 with one `u128` division [arrow-rs]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #11530:
URL: https://github.com/apache/arrow-rs/pull/11530#issuecomment-6133792043
🤖 Benchmark completed (GKE) | [trigger](https://github.com/apache/arrow-rs/pull/11530#issuecomment-6133632370)
**Target:** cast_decimal
Comparing i256-div-rem-i128-fast-path (14bce2439974f98ed1475e6dc3d9b4389a31a108) to 01b1275 (merge-base) [diff](https://github.com/apache/arrow-rs/compare/01b1275aab90c033da3f64f5edbfb4f061606cae..14bce2439974f98ed1475e6dc3d9b4389a31a108)
<details><summary>Run configuration</summary>
```yaml
run benchmark cast_decimal
env:
BENCH_FILTER: decimal_downscale/decimal256
resources:
arch: amd64
shards: 1
```
</details>
<details><summary>Details</summary>
```
group base changed
----- ---- -------
decimal_downscale/decimal256 (41, 20) -> decimal128(38, 6) 30 digits/mixed_nulls/safe 1.60 295.8±4.04µs 26.4 MElem/sec 1.00 185.2±2.84µs 42.2 MElem/sec
decimal_downscale/decimal256 (41, 20) -> decimal128(38, 6) 30 digits/no_nulls/safe 1.62 298.3±3.87µs 26.2 MElem/sec 1.00 184.0±2.86µs 42.5 MElem/sec
decimal_downscale/decimal256 (76, 10) -> (76, 2) 38 digits/mixed_nulls/safe 1.32 274.0±3.61µs 28.5 MElem/sec 1.00 208.1±3.11µs 37.5 MElem/sec
decimal_downscale/decimal256 (76, 10) -> (76, 2) 38 digits/no_nulls/safe 1.30 272.2±4.05µs 28.7 MElem/sec 1.00 209.7±2.90µs 37.3 MElem/sec
decimal_downscale/decimal256 (76, 10) -> (76, 2) 60 digits/mixed_nulls/safe 1.00 280.4±4.55µs 27.9 MElem/sec 1.06 296.2±4.64µs 26.4 MElem/sec
decimal_downscale/decimal256 (76, 10) -> (76, 2) 60 digits/no_nulls/safe 1.00 277.0±4.92µs 28.2 MElem/sec 1.09 302.4±4.24µs 25.8 MElem/sec
decimal_downscale/decimal256 (76, 20) -> decimal128(38, 6) 48 digits fallible/mixed_nulls/safe 1.01 269.4±5.29µs 29.0 MElem/sec 1.00 266.0±2.03µs 29.4 MElem/sec
decimal_downscale/decimal256 (76, 20) -> decimal128(38, 6) 48 digits fallible/mixed_nulls/strict 1.00 292.5±4.68µs 26.7 MElem/sec 1.03 302.3±2.87µs 25.8 MElem/sec
decimal_downscale/decimal256 (76, 20) -> decimal128(38, 6) 48 digits fallible/no_nulls/safe 1.00 296.6±5.13µs 26.3 MElem/sec 1.03 305.3±21.40µs 25.6 MElem/sec
decimal_downscale/decimal256 (76, 20) -> decimal128(38, 6) 48 digits fallible/no_nulls/strict 1.00 323.0±4.69µs 24.2 MElem/sec 1.04 335.3±4.39µs 23.3 MElem/sec
decimal_downscale/decimal256 (76, 40) -> decimal128(38, 6) 42 digits fallible/mixed_nulls/safe 1.03 556.0±9.69µs 14.1 MElem/sec 1.00 537.5±3.26µs 14.5 MElem/sec
decimal_downscale/decimal256 (76, 40) -> decimal128(38, 6) 42 digits fallible/mixed_nulls/strict 1.03 572.1±8.95µs 13.7 MElem/sec 1.00 555.1±5.72µs 14.1 MElem/sec
decimal_downscale/decimal256 (76, 40) -> decimal128(38, 6) 42 digits fallible/no_nulls/safe 1.02 616.2±10.09µs 12.7 MElem/sec 1.00 603.3±6.63µs 12.9 MElem/sec
decimal_downscale/decimal256 (76, 40) -> decimal128(38, 6) 42 digits fallible/no_nulls/strict 1.02 629.2±10.04µs 12.4 MElem/sec 1.00 619.6±11.67µs 12.6 MElem/sec
```
</details>
<details><summary>Per-runner information</summary>
<details><summary>cast_decimal — shard 1/1</summary>
**Node:** gk3-benchmark-cluster-nap-bd46eems-f19bcd99-d7p7
**Instance:** c4-highmem-16 (12 vCPU / 65 GiB)
**uname:**
```text
Linux bench-c6133632370-3352-wm4cw 6.12.94+ #1 SMP Fri Aug 21 07:56:42 UTC 2026 x86_64 GNU/Linux
```
**BENCH_COMMAND:**
```sh
cargo bench --features=arrow,async,test_common,experimental,object_store --bench cast_decimal
```
<details><summary>CPU Details (lscpu)</summary>
```text
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 52 bits physical, 57 bits virtual
Byte Order: Little Endian
CPU(s): 16
On-line CPU(s) list: 0-15
Vendor ID: GenuineIntel
Model name: INTEL(R) XEON(R) PLATINUM 8581C CPU @ 2.30GHz
CPU family: 6
Model: 207
Thread(s) per core: 2
Core(s) per socket: 8
Socket(s): 1
Stepping: 2
BogoMIPS: 4600.00
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid tsc_known_freq pni pclmulqdq monitor ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch ssbd ibrs ibpb stibp ibrs_enhanced fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx_vnni avx512_bf16 wbnoinvd arat avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid cldemote movdiri movdir64b fsrm md_clear serialize tsxldtrk amx_bf16 avx512_fp16 amx_tile amx_int8 arch_capabilities
Hypervisor vendor: KVM
Virtualization type: full
L1d cache: 384 KiB (8 instances)
L1i cache: 256 KiB (8 instances)
L2 cache: 16 MiB (8 instances)
L3 cache: 260 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; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Mitigation; Enhanced / Automatic IBRS; IBPB conditional; PBRSB-eIBRS SW sequence; BHI BHI_DIS_S
Vulnerability Srbds: Not affected
Vulnerability Tsa: Not affected
Vulnerability Tsx async abort: Not affected
Vulnerability Vmscape: Not affected
```
</details>
<details><summary>Resource Usage</summary>
**base (merge-base)**
| Metric | Value |
|--------|-------|
| Wall time | 155.0s |
| Peak memory | 14.8 MiB |
| Avg memory | 13.9 MiB |
| CPU user | 151.1s |
| CPU sys | 0.0s |
| Peak spill | 0 B |
**branch**
| Metric | Value |
|--------|-------|
| Wall time | 155.0s |
| Peak memory | 15.5 MiB |
| Avg memory | 13.9 MiB |
| CPU user | 149.2s |
| CPU sys | 0.0s |
| Peak spill | 0 B |
</details>
</details>
</details>
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
<!-- benchmark-request:6133632370:finish:1339589ff9972ccd5cd9c4003939c49e -->
--
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] perf(arrow-buffer): divide `i256` magnitudes below 2^128 with one `u128` division [arrow-rs]
Posted by "mbutrovich (via GitHub)" <gi...@apache.org>.
mbutrovich commented on PR #11530:
URL: https://github.com/apache/arrow-rs/pull/11530#issuecomment-6133634089
run benchmark decimal_division
```
env:
BENCH_FILTER: decimal256_scalar
resources:
arch: amd64
```
--
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] perf(arrow-buffer): divide `i256` magnitudes below 2^128 with one `u128` division [arrow-rs]
Posted by "mbutrovich (via GitHub)" <gi...@apache.org>.
mbutrovich commented on PR #11530:
URL: https://github.com/apache/arrow-rs/pull/11530#issuecomment-6133470116
run benchmark cast_decimal
```
env:
BENCH_FILTER: decimal_downscale/decimal256
```
--
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] perf(arrow-buffer): divide `i256` magnitudes below 2^128 with one `u128` division [arrow-rs]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #11530:
URL: https://github.com/apache/arrow-rs/pull/11530#issuecomment-6133470974
🤖 Benchmark starting (GKE) | [trigger](https://github.com/apache/arrow-rs/pull/11530#issuecomment-6133470116)
**Target:** cast_decimal
**Sharding factor: 1** (1 workers).
Comparing i256-div-rem-i128-fast-path (14bce2439974f98ed1475e6dc3d9b4389a31a108) to 01b1275 (merge-base) [diff](https://github.com/apache/arrow-rs/compare/01b1275aab90c033da3f64f5edbfb4f061606cae..14bce2439974f98ed1475e6dc3d9b4389a31a108)
<details><summary>Run configuration</summary>
```yaml
run benchmark cast_decimal
env:
BENCH_FILTER: decimal_downscale/decimal256
shards: 1
```
</details>
Results will be posted when all workers finish.
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
<!-- benchmark-request:6133470116:start:47e1d1ca6e9e4551284b965dc2a827e5 -->
--
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] perf(arrow-buffer): divide `i256` magnitudes below 2^128 with one `u128` division [arrow-rs]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #11530:
URL: https://github.com/apache/arrow-rs/pull/11530#issuecomment-6133472516
🤖 Benchmark starting (GKE) | [trigger](https://github.com/apache/arrow-rs/pull/11530#issuecomment-6133471621)
**Target:** decimal_division
**Sharding factor: 1** (1 workers).
Comparing i256-div-rem-i128-fast-path (14bce2439974f98ed1475e6dc3d9b4389a31a108) to 01b1275 (merge-base) [diff](https://github.com/apache/arrow-rs/compare/01b1275aab90c033da3f64f5edbfb4f061606cae..14bce2439974f98ed1475e6dc3d9b4389a31a108)
<details><summary>Run configuration</summary>
```yaml
run benchmark decimal_division
env:
BENCH_FILTER: decimal256_scalar
shards: 1
```
</details>
Results will be posted when all workers finish.
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
<!-- benchmark-request:6133471621:start:3289dc5293994bdf9948ff63aa91ad49 -->
--
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] perf(arrow-buffer): divide `i256` magnitudes below 2^128 with one `u128` division [arrow-rs]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #11530:
URL: https://github.com/apache/arrow-rs/pull/11530#issuecomment-6133579958
🤖 Benchmark completed (GKE) | [trigger](https://github.com/apache/arrow-rs/pull/11530#issuecomment-6133471621)
**Target:** decimal_division
Comparing i256-div-rem-i128-fast-path (14bce2439974f98ed1475e6dc3d9b4389a31a108) to 01b1275 (merge-base) [diff](https://github.com/apache/arrow-rs/compare/01b1275aab90c033da3f64f5edbfb4f061606cae..14bce2439974f98ed1475e6dc3d9b4389a31a108)
<details><summary>Run configuration</summary>
```yaml
run benchmark decimal_division
env:
BENCH_FILTER: decimal256_scalar
shards: 1
```
</details>
<details><summary>Details</summary>
```
group base changed
----- ---- -------
decimal256_scalar/div_30_digits_by_4_digits/128_values 1.20 6.6±0.04µs 18.5 MElem/sec 1.00 5.5±0.01µs 22.3 MElem/sec
decimal256_scalar/div_30_digits_by_4_digits/16_values 1.19 982.9±4.36ns 15.5 MElem/sec 1.00 829.3±1.75ns 18.4 MElem/sec
decimal256_scalar/div_30_digits_by_4_digits/1_values 1.09 224.6±4.92ns 4.2 MElem/sec 1.00 205.7±1.06ns 4.6 MElem/sec
decimal256_scalar/div_30_digits_by_4_digits/mixed_nulls 1.20 41.2±0.21µs 23.7 MElem/sec 1.00 34.2±0.07µs 28.5 MElem/sec
decimal256_scalar/div_30_digits_by_4_digits/no_nulls 1.20 51.3±0.30µs 19.0 MElem/sec 1.00 42.6±0.13µs 22.9 MElem/sec
decimal256_scalar/div_60_digits_by_40_digits/no_nulls 1.00 88.8±0.49µs 11.0 MElem/sec 1.00 88.6±0.50µs 11.0 MElem/sec
decimal256_scalar/div_60_digits_by_4_digits/no_nulls 1.00 77.7±0.36µs 12.6 MElem/sec 1.01 78.1±0.36µs 12.5 MElem/sec
decimal256_scalar/div_72_digits_by_4_digits/no_nulls 1.00 553.8±0.27µs 1805.8 KElem/sec 1.00 555.1±0.53µs 1801.3 KElem/sec
decimal256_scalar/rem_30_digits_by_4_digits/mixed_nulls 1.21 39.1±0.03µs 25.0 MElem/sec 1.00 32.3±0.03µs 30.2 MElem/sec
decimal256_scalar/rem_30_digits_by_4_digits/no_nulls 1.21 48.6±0.04µs 20.1 MElem/sec 1.00 40.3±0.05µs 24.2 MElem/sec
decimal256_scalar/rem_60_digits_by_40_digits/no_nulls 1.01 86.1±0.26µs 11.3 MElem/sec 1.00 85.5±0.29µs 11.4 MElem/sec
decimal256_scalar/rem_60_digits_by_4_digits/no_nulls 1.00 76.1±0.41µs 12.8 MElem/sec 1.00 76.1±0.33µs 12.8 MElem/sec
```
</details>
<details><summary>Per-runner information</summary>
<details><summary>decimal_division — shard 1/1</summary>
**Node:** gk3-benchmark-cluster-nap-1xu0nn5x-76135171-w76f
**Instance:** c4a-highmem-16 (12 vCPU / 65 GiB)
**uname:**
```text
Linux bench-c6133471621-3351-c9w6b 6.12.94+ #1 SMP Fri Aug 21 08:00:16 UTC 2026 aarch64 GNU/Linux
```
**BENCH_COMMAND:**
```sh
cargo bench --features=arrow,async,test_common,experimental,object_store --bench decimal_division
```
<details><summary>CPU Details (lscpu)</summary>
```text
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>Resource Usage</summary>
**base (merge-base)**
| Metric | Value |
|--------|-------|
| Wall time | 125.0s |
| Peak memory | 12.4 MiB |
| Avg memory | 11.1 MiB |
| CPU user | 118.9s |
| CPU sys | 0.0s |
| Peak spill | 0 B |
**branch**
| Metric | Value |
|--------|-------|
| Wall time | 125.0s |
| Peak memory | 12.8 MiB |
| Avg memory | 11.7 MiB |
| CPU user | 122.1s |
| CPU sys | 0.0s |
| Peak spill | 0 B |
</details>
</details>
</details>
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
<!-- benchmark-request:6133471621:finish:5245c6d668967fa01130e7baf9fa2443 -->
--
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] perf(arrow-buffer): divide `i256` magnitudes below 2^128 with one `u128` division [arrow-rs]
Posted by "etseidl (via GitHub)" <gi...@apache.org>.
etseidl merged PR #11530:
URL: https://github.com/apache/arrow-rs/pull/11530
--
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] perf(arrow-buffer): divide `i256` magnitudes below 2^128 with one `u128` division [arrow-rs]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #11530:
URL: https://github.com/apache/arrow-rs/pull/11530#issuecomment-6177049514
Thank you @mbutrovich
--
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] perf(arrow-buffer): divide `i256` magnitudes below 2^128 with one `u128` division [arrow-rs]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #11530:
URL: https://github.com/apache/arrow-rs/pull/11530#issuecomment-6133602543
🤖 Benchmark completed (GKE) | [trigger](https://github.com/apache/arrow-rs/pull/11530#issuecomment-6133470116)
**Target:** cast_decimal
Comparing i256-div-rem-i128-fast-path (14bce2439974f98ed1475e6dc3d9b4389a31a108) to 01b1275 (merge-base) [diff](https://github.com/apache/arrow-rs/compare/01b1275aab90c033da3f64f5edbfb4f061606cae..14bce2439974f98ed1475e6dc3d9b4389a31a108)
<details><summary>Run configuration</summary>
```yaml
run benchmark cast_decimal
env:
BENCH_FILTER: decimal_downscale/decimal256
shards: 1
```
</details>
<details><summary>Details</summary>
```
group base changed
----- ---- -------
decimal_downscale/decimal256 (41, 20) -> decimal128(38, 6) 30 digits/mixed_nulls/safe 1.33 499.9±1.03µs 15.6 MElem/sec 1.00 375.2±0.31µs 20.8 MElem/sec
decimal_downscale/decimal256 (41, 20) -> decimal128(38, 6) 30 digits/no_nulls/safe 1.33 499.7±0.23µs 15.6 MElem/sec 1.00 375.6±0.26µs 20.8 MElem/sec
decimal_downscale/decimal256 (76, 10) -> (76, 2) 38 digits/mixed_nulls/safe 1.53 467.5±2.02µs 16.7 MElem/sec 1.00 304.6±0.48µs 25.6 MElem/sec
decimal_downscale/decimal256 (76, 10) -> (76, 2) 38 digits/no_nulls/safe 1.54 469.1±9.97µs 16.7 MElem/sec 1.00 304.4±0.38µs 25.7 MElem/sec
decimal_downscale/decimal256 (76, 10) -> (76, 2) 60 digits/mixed_nulls/safe 1.00 750.7±0.80µs 10.4 MElem/sec 1.00 748.5±1.08µs 10.4 MElem/sec
decimal_downscale/decimal256 (76, 10) -> (76, 2) 60 digits/no_nulls/safe 1.00 750.9±0.82µs 10.4 MElem/sec 1.00 748.2±0.81µs 10.4 MElem/sec
decimal_downscale/decimal256 (76, 20) -> decimal128(38, 6) 48 digits fallible/mixed_nulls/safe 1.00 703.9±0.53µs 11.1 MElem/sec 1.01 712.1±0.50µs 11.0 MElem/sec
decimal_downscale/decimal256 (76, 20) -> decimal128(38, 6) 48 digits fallible/mixed_nulls/strict 1.00 711.4±1.70µs 11.0 MElem/sec 1.01 721.8±0.68µs 10.8 MElem/sec
decimal_downscale/decimal256 (76, 20) -> decimal128(38, 6) 48 digits fallible/no_nulls/safe 1.00 782.4±1.53µs 10.0 MElem/sec 1.01 788.1±0.51µs 9.9 MElem/sec
decimal_downscale/decimal256 (76, 20) -> decimal128(38, 6) 48 digits fallible/no_nulls/strict 1.00 793.4±1.52µs 9.8 MElem/sec 1.01 800.1±0.97µs 9.8 MElem/sec
decimal_downscale/decimal256 (76, 40) -> decimal128(38, 6) 42 digits fallible/mixed_nulls/safe 1.01 632.6±1.09µs 12.3 MElem/sec 1.00 628.7±1.16µs 12.4 MElem/sec
decimal_downscale/decimal256 (76, 40) -> decimal128(38, 6) 42 digits fallible/mixed_nulls/strict 1.01 653.0±1.47µs 12.0 MElem/sec 1.00 645.6±2.68µs 12.1 MElem/sec
decimal_downscale/decimal256 (76, 40) -> decimal128(38, 6) 42 digits fallible/no_nulls/safe 1.01 701.9±1.49µs 11.1 MElem/sec 1.00 698.4±1.18µs 11.2 MElem/sec
decimal_downscale/decimal256 (76, 40) -> decimal128(38, 6) 42 digits fallible/no_nulls/strict 1.01 723.5±1.71µs 10.8 MElem/sec 1.00 717.5±2.89µs 10.9 MElem/sec
```
</details>
<details><summary>Per-runner information</summary>
<details><summary>cast_decimal — shard 1/1</summary>
**Node:** gk3-benchmark-cluster-nap-1xu0nn5x-b5079883-zwqr
**Instance:** c4a-highmem-16 (12 vCPU / 65 GiB)
**uname:**
```text
Linux bench-c6133470116-3350-bf9ft 6.12.94+ #1 SMP Fri Aug 21 08:00:16 UTC 2026 aarch64 GNU/Linux
```
**BENCH_COMMAND:**
```sh
cargo bench --features=arrow,async,test_common,experimental,object_store --bench cast_decimal
```
<details><summary>CPU Details (lscpu)</summary>
```text
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>Resource Usage</summary>
**base (merge-base)**
| Metric | Value |
|--------|-------|
| Wall time | 165.0s |
| Peak memory | 14.8 MiB |
| Avg memory | 13.8 MiB |
| CPU user | 161.9s |
| CPU sys | 0.0s |
| Peak spill | 0 B |
**branch**
| Metric | Value |
|--------|-------|
| Wall time | 165.0s |
| Peak memory | 15.4 MiB |
| Avg memory | 14.1 MiB |
| CPU user | 161.2s |
| CPU sys | 0.0s |
| Peak spill | 0 B |
</details>
</details>
</details>
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
<!-- benchmark-request:6133470116:finish:c5add070a15dc81d395e5eac24103546 -->
--
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] perf(arrow-buffer): divide `i256` magnitudes below 2^128 with one `u128` division [arrow-rs]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #11530:
URL: https://github.com/apache/arrow-rs/pull/11530#issuecomment-6133766286
🤖 Benchmark completed (GKE) | [trigger](https://github.com/apache/arrow-rs/pull/11530#issuecomment-6133634089)
**Target:** decimal_division
Comparing i256-div-rem-i128-fast-path (14bce2439974f98ed1475e6dc3d9b4389a31a108) to 01b1275 (merge-base) [diff](https://github.com/apache/arrow-rs/compare/01b1275aab90c033da3f64f5edbfb4f061606cae..14bce2439974f98ed1475e6dc3d9b4389a31a108)
<details><summary>Run configuration</summary>
```yaml
run benchmark decimal_division
env:
BENCH_FILTER: decimal256_scalar
resources:
arch: amd64
shards: 1
```
</details>
<details><summary>Details</summary>
```
group base changed
----- ---- -------
decimal256_scalar/div_30_digits_by_4_digits/128_values 1.19 4.7±0.02µs 25.8 MElem/sec 1.00 4.0±0.02µs 30.7 MElem/sec
decimal256_scalar/div_30_digits_by_4_digits/16_values 1.15 701.2±4.94ns 21.8 MElem/sec 1.00 609.0±11.98ns 25.1 MElem/sec
decimal256_scalar/div_30_digits_by_4_digits/1_values 1.07 166.9±2.96ns 5.7 MElem/sec 1.00 156.2±3.54ns 6.1 MElem/sec
decimal256_scalar/div_30_digits_by_4_digits/mixed_nulls 1.18 30.6±0.16µs 31.9 MElem/sec 1.00 25.9±0.15µs 37.8 MElem/sec
decimal256_scalar/div_30_digits_by_4_digits/no_nulls 1.18 38.2±0.17µs 25.6 MElem/sec 1.00 32.3±0.17µs 30.2 MElem/sec
decimal256_scalar/div_60_digits_by_40_digits/no_nulls 1.00 56.6±0.43µs 17.3 MElem/sec 1.00 56.7±0.23µs 17.2 MElem/sec
decimal256_scalar/div_60_digits_by_4_digits/no_nulls 1.00 37.4±0.15µs 26.1 MElem/sec 1.04 38.8±0.44µs 25.2 MElem/sec
decimal256_scalar/div_72_digits_by_4_digits/no_nulls 1.12 429.6±6.92µs 2.3 MElem/sec 1.00 384.4±7.10µs 2.5 MElem/sec
decimal256_scalar/rem_30_digits_by_4_digits/mixed_nulls 1.19 29.5±0.17µs 33.1 MElem/sec 1.00 24.7±0.16µs 39.6 MElem/sec
decimal256_scalar/rem_30_digits_by_4_digits/no_nulls 1.17 37.3±0.32µs 26.2 MElem/sec 1.00 31.9±0.70µs 30.6 MElem/sec
decimal256_scalar/rem_60_digits_by_40_digits/no_nulls 1.00 55.8±0.23µs 17.5 MElem/sec 1.02 57.1±0.47µs 17.1 MElem/sec
decimal256_scalar/rem_60_digits_by_4_digits/no_nulls 1.00 37.3±0.16µs 26.2 MElem/sec 1.01 37.7±0.25µs 25.9 MElem/sec
```
</details>
<details><summary>Per-runner information</summary>
<details><summary>decimal_division — shard 1/1</summary>
**Node:** gk3-benchmark-cluster-nap-bd46eems-235492ea-xgtr
**Instance:** c4-highmem-16 (12 vCPU / 65 GiB)
**uname:**
```text
Linux bench-c6133634089-3353-pqh8s 6.12.94+ #1 SMP Fri Aug 21 07:56:42 UTC 2026 x86_64 GNU/Linux
```
**BENCH_COMMAND:**
```sh
cargo bench --features=arrow,async,test_common,experimental,object_store --bench decimal_division
```
<details><summary>CPU Details (lscpu)</summary>
```text
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 52 bits physical, 57 bits virtual
Byte Order: Little Endian
CPU(s): 16
On-line CPU(s) list: 0-15
Vendor ID: GenuineIntel
Model name: INTEL(R) XEON(R) PLATINUM 8581C CPU @ 2.30GHz
CPU family: 6
Model: 207
Thread(s) per core: 2
Core(s) per socket: 8
Socket(s): 1
Stepping: 2
BogoMIPS: 4600.00
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid tsc_known_freq pni pclmulqdq monitor ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch ssbd ibrs ibpb stibp ibrs_enhanced fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx_vnni avx512_bf16 wbnoinvd arat avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid cldemote movdiri movdir64b fsrm md_clear serialize tsxldtrk amx_bf16 avx512_fp16 amx_tile amx_int8 arch_capabilities
Hypervisor vendor: KVM
Virtualization type: full
L1d cache: 384 KiB (8 instances)
L1i cache: 256 KiB (8 instances)
L2 cache: 16 MiB (8 instances)
L3 cache: 260 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; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Mitigation; Enhanced / Automatic IBRS; IBPB conditional; PBRSB-eIBRS SW sequence; BHI BHI_DIS_S
Vulnerability Srbds: Not affected
Vulnerability Tsa: Not affected
Vulnerability Tsx async abort: Not affected
Vulnerability Vmscape: Not affected
```
</details>
<details><summary>Resource Usage</summary>
**base (merge-base)**
| Metric | Value |
|--------|-------|
| Wall time | 125.0s |
| Peak memory | 14.0 MiB |
| Avg memory | 12.7 MiB |
| CPU user | 119.1s |
| CPU sys | 0.0s |
| Peak spill | 0 B |
**branch**
| Metric | Value |
|--------|-------|
| Wall time | 115.0s |
| Peak memory | 14.1 MiB |
| Avg memory | 13.2 MiB |
| CPU user | 113.1s |
| CPU sys | 0.0s |
| Peak spill | 0 B |
</details>
</details>
</details>
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
<!-- benchmark-request:6133634089:finish:92e18b363509718668bd015bda902ce2 -->
--
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] perf(arrow-buffer): divide `i256` magnitudes below 2^128 with one `u128` division [arrow-rs]
Posted by "mbutrovich (via GitHub)" <gi...@apache.org>.
mbutrovich commented on PR #11530:
URL: https://github.com/apache/arrow-rs/pull/11530#issuecomment-6133471621
run benchmark decimal_division
```
env:
BENCH_FILTER: decimal256_scalar
```
--
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] perf(arrow-buffer): divide `i256` magnitudes below 2^128 with one `u128` division [arrow-rs]
Posted by "mbutrovich (via GitHub)" <gi...@apache.org>.
mbutrovich commented on PR #11530:
URL: https://github.com/apache/arrow-rs/pull/11530#issuecomment-6133632370
run benchmark cast_decimal
```
env:
BENCH_FILTER: decimal_downscale/decimal256
resources:
arch: amd64
```
--
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] perf(arrow-buffer): divide `i256` magnitudes below 2^128 with one `u128` division [arrow-rs]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #11530:
URL: https://github.com/apache/arrow-rs/pull/11530#issuecomment-6133633612
🤖 Benchmark starting (GKE) | [trigger](https://github.com/apache/arrow-rs/pull/11530#issuecomment-6133632370)
**Target:** cast_decimal
**Sharding factor: 1** (1 workers).
Comparing i256-div-rem-i128-fast-path (14bce2439974f98ed1475e6dc3d9b4389a31a108) to 01b1275 (merge-base) [diff](https://github.com/apache/arrow-rs/compare/01b1275aab90c033da3f64f5edbfb4f061606cae..14bce2439974f98ed1475e6dc3d9b4389a31a108)
<details><summary>Run configuration</summary>
```yaml
run benchmark cast_decimal
env:
BENCH_FILTER: decimal_downscale/decimal256
resources:
arch: amd64
shards: 1
```
</details>
Results will be posted when all workers finish.
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
<!-- benchmark-request:6133632370:start:0a3143a98ea8bc4c501c25c9fbcec238 -->
--
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] perf(arrow-buffer): divide `i256` magnitudes below 2^128 with one `u128` division [arrow-rs]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #11530:
URL: https://github.com/apache/arrow-rs/pull/11530#issuecomment-6133635536
🤖 Benchmark starting (GKE) | [trigger](https://github.com/apache/arrow-rs/pull/11530#issuecomment-6133634089)
**Target:** decimal_division
**Sharding factor: 1** (1 workers).
Comparing i256-div-rem-i128-fast-path (14bce2439974f98ed1475e6dc3d9b4389a31a108) to 01b1275 (merge-base) [diff](https://github.com/apache/arrow-rs/compare/01b1275aab90c033da3f64f5edbfb4f061606cae..14bce2439974f98ed1475e6dc3d9b4389a31a108)
<details><summary>Run configuration</summary>
```yaml
run benchmark decimal_division
env:
BENCH_FILTER: decimal256_scalar
resources:
arch: amd64
shards: 1
```
</details>
Results will be posted when all workers finish.
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
<!-- benchmark-request:6133634089:start:572bc858e176e7b5f8d32aff0ac70db8 -->
--
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