Skip to content

perf(arrow-arith): vectorize checked decimal add, sub and mul - #12062

Merged
andygrove merged 11 commits into
apache:mainfrom
mbutrovich:vectorize-checked-decimal-arithmetic
Nov 20, 2026
Merged

andygrove merged 11 commits into
apache:mainfrom
mbutrovich:vectorize-checked-decimal-arithmetic

Conversation

@mbutrovich

@mbutrovich mbutrovich commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

N/A.

Rationale for this change

decimal_op runs decimal add, sub and mul, including add_wrapping, sub_wrapping and mul_wrapping, through try_op! with the checked operations, which return at the first overflow. DataFusion calls add_wrapping for + (binary.rs), so its default decimal arithmetic runs one row at a time. #12058 does the same change for integers.

What changes are included in this PR?

  • Decimal add, sub and mul compute the wrapping result and an overflow flag for every slot in one pass, with equal scales and when one side is rescaled.
  • If a slot overflowed and the result has nulls, they recompute the overflow of every row into a bitmap and mask it with the validity bits. They rerun the existing checked kernel only if a valid row overflowed, so errors don't change.
  • Decimal32 and Decimal64 add and sub vectorize. Decimal128 stays scalar and loses the per-row branch and the operand spills of the error path. i128 mul multiplies in i64 when both operands fit. Decimal64 mul uses overflowing_mul, as in perf(arrow-arith): vectorize checked integer add, sub and mul #12058.
  • Decimal256 keeps the checked kernel. With -C target-cpu=x86-64-v3, LLVM vectorizes the one-pass i256 add loop two rows at a time, packing the carries into vector registers with about 20 stack spills per iteration, and it measured 0.75x (perf(arrow-arith): vectorize checked decimal add, sub and mul #12062 (comment)).
  • With unequal scales, only the operand with the smaller scale is multiplied, because the other multiplier is one. A scalar with the smaller scale is multiplied once, before the loop.
  • OverflowingOp, overflowing_op and collect_overflowing are the same as in perf(arrow-arith): vectorize checked integer add, sub and mul #12058, so whichever PR lands second drops its copy.
  • collect_overflowing writes into the Vec's spare capacity and calls set_len with the number of slots it wrote. With collect, LLVM sometimes left the loop inside collect out of line, where it loaded and stored the overflow flag on every row. Which instances it left out of line changed with the closure and the target: on generic aarch64 and neoverse-n1 it was rescaled Decimal128 add, which the bot measured at 0.83x on Neoverse-V2. Writing the values in our own loop without unsafe cost 30% to 40% with a zero-filled Vec, lost vectorization with push, and was slower in a two-pass, unzip or chunked form.
  • The output is reserved with Vec::try_reserve_exact, so an allocation failure returns ArrowError::MemoryError.
  • Null slots of the result hold the wrapping result instead of zero, as they already do for integer add_wrapping.
  • 362eb22 adds the benchmark cases, so the benchmark bot can compare against it.

Are these changes tested?

New tests in arrow-arith/src/numeric.rs compare the kernels with the scalar checked operations at the edge values of every decimal type, with equal scales and with either side rescaled, as arrays, as one-row slices, and with a scalar on either side. They also cover Decimal128 mul on both sides of the i64 bounds. Another test moves one overflowing row through a 100-row batch of every decimal type, including rows where only the rescale overflows. A third checks a rescaled scalar, including one whose rescale overflows, against valid, all-null, and empty arrays. Miri passes these tests, except the position test, which checks vectorized code that Miri doesn't run.

checked-decimal-bot-f933cfa

The overflow cases are expected to be slower, because they pay for the new pass, the null-slot check, and then the checked kernel. With fail_on_overflow or ANSI mode, an overflow fails the query, so that cost is paid at most once per partition. A batch that overflows only in null slots pays for the pass and the null-slot check: decimal128_add_null_slot_overflow measured 0.88x on Neoverse-V2 and 0.86x on Xeon 8581C, because Decimal128 doesn't vectorize, and 1.45x with x86-64-v3.

The extra pass also costs code size: 161 KiB for decimal_op and the new helpers across the four decimal types, against 30 KiB before, in the thin-LTO bench binary on aarch64. The checked kernels that the fallback calls are unchanged.

decimal128_multiply_wide(0.1), where half the values don't fit in i64, measured 0.89x on Neoverse-V2. On that input the i64 branch in i128 mul goes either way at random, and the one pass also multiplies the null slots that the checked kernel skips.

Bot runs: Neoverse-V2 default and aligned, Xeon 8581C default and aligned, and Xeon 8581C with -C target-cpu=x86-64-v3 default and aligned. Those runs measured 41647fd. f933cfa changes only the i64 multiply, and its Decimal64 mul runs are: Neoverse-V2 default and aligned, Xeon 8581C default and aligned, and x86-64-v3 default and aligned.

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.

@mbutrovich

Copy link
Copy Markdown
Contributor Author

run benchmark arithmetic_kernels

baseline:
  ref: 5cf1987a91
env:
  BENCH_FILTER: "^decimal"

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark starting (GKE) | trigger

Target: arithmetic_kernels

Sharding factor: 1 (1 workers).

Comparing vectorize-checked-decimal-arithmetic (c5774ac) to 5cf1987 diff

Run configuration
run benchmark arithmetic_kernels
baseline:
  ref: 5cf1987a91
env:
  BENCH_FILTER: ^decimal
shards: 1

Results will be posted when all workers finish.


File an issue against this benchmark runner

@mbutrovich

Copy link
Copy Markdown
Contributor Author

run benchmark arithmetic_kernels

baseline:
  ref: 5cf1987a91
env:
  BENCH_FILTER: "^decimal"
  RUSTFLAGS: "-C llvm-args=-align-all-functions=6 -C llvm-args=-align-all-nofallthru-blocks=6"

@mbutrovich

Copy link
Copy Markdown
Contributor Author

run benchmark arithmetic_kernels

baseline:
  ref: 5cf1987a91
env:
  BENCH_FILTER: "^decimal"
resources:
  arch: amd64

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark starting (GKE) | trigger

Target: arithmetic_kernels

Sharding factor: 1 (1 workers).

Comparing vectorize-checked-decimal-arithmetic (c5774ac) to 5cf1987 diff

Run configuration
run benchmark arithmetic_kernels
baseline:
  ref: 5cf1987a91
env:
  BENCH_FILTER: ^decimal
  RUSTFLAGS: -C llvm-args=-align-all-functions=6 -C llvm-args=-align-all-nofallthru-blocks=6
shards: 1

Results will be posted when all workers finish.


File an issue against this benchmark runner

@mbutrovich

Copy link
Copy Markdown
Contributor Author

run benchmark arithmetic_kernels

baseline:
  ref: 5cf1987a91
env:
  BENCH_FILTER: "^decimal"
  RUSTFLAGS: "-C llvm-args=-align-all-functions=6 -C llvm-args=-align-all-nofallthru-blocks=6"
resources:
  arch: amd64

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark starting (GKE) | trigger

Target: arithmetic_kernels

Sharding factor: 1 (1 workers).

Comparing vectorize-checked-decimal-arithmetic (c5774ac) to 5cf1987 diff

Run configuration
run benchmark arithmetic_kernels
baseline:
  ref: 5cf1987a91
env:
  BENCH_FILTER: ^decimal
resources:
  arch: amd64
shards: 1

Results will be posted when all workers finish.


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark starting (GKE) | trigger

Target: arithmetic_kernels

Sharding factor: 1 (1 workers).

Comparing vectorize-checked-decimal-arithmetic (c5774ac) to 5cf1987 diff

Run configuration
run benchmark arithmetic_kernels
baseline:
  ref: 5cf1987a91
env:
  BENCH_FILTER: ^decimal
  RUSTFLAGS: -C llvm-args=-align-all-functions=6 -C llvm-args=-align-all-nofallthru-blocks=6
resources:
  arch: amd64
shards: 1

Results will be posted when all workers finish.


File an issue against this benchmark runner

@mbutrovich

Copy link
Copy Markdown
Contributor Author

run benchmark arithmetic_kernels

baseline:
  ref: 5cf1987a91
env:
  BENCH_FILTER: "^decimal"
  RUSTFLAGS: "-C target-cpu=x86-64-v3"
resources:
  arch: amd64

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark starting (GKE) | trigger

Target: arithmetic_kernels

Sharding factor: 1 (1 workers).

Comparing vectorize-checked-decimal-arithmetic (c5774ac) to 5cf1987 diff

Run configuration
run benchmark arithmetic_kernels
baseline:
  ref: 5cf1987a91
env:
  BENCH_FILTER: ^decimal
  RUSTFLAGS: -C target-cpu=x86-64-v3
resources:
  arch: amd64
shards: 1

Results will be posted when all workers finish.


File an issue against this benchmark runner

@mbutrovich

Copy link
Copy Markdown
Contributor Author

run benchmark arithmetic_kernels

baseline:
  ref: 5cf1987a91
env:
  BENCH_FILTER: "^decimal"
  RUSTFLAGS: "-C target-cpu=x86-64-v3 -C llvm-args=-align-all-functions=6 -C llvm-args=-align-all-nofallthru-blocks=6"
resources:
  arch: amd64

@github-actions github-actions Bot added arrow-core Core crates related to representing arrow data arrow-kernels Crates that transform arrow data (e.g. compute, cast) labels Nov 3, 2026
@adriangbot

Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Target: arithmetic_kernels

Comparing vectorize-checked-decimal-arithmetic (c5774ac) to 5cf1987 diff

Run configuration
run benchmark arithmetic_kernels
baseline:
  ref: 5cf1987a91
env:
  BENCH_FILTER: ^decimal
shards: 1
Details
group                                base                                   changed
-----                                ----                                   -------
decimal128_add(0)                    1.01      8.5±0.01µs        ? ?/sec    1.00      8.4±0.00µs        ? ?/sec
decimal128_add(0.1)                  1.82     15.4±0.13µs        ? ?/sec    1.00      8.5±0.02µs        ? ?/sec
decimal128_add_null_slot_overflow    1.00     15.2±0.22µs        ? ?/sec    1.48     22.5±1.26µs        ? ?/sec
decimal128_add_overflow              1.00      9.2±0.04µs        ? ?/sec    1.80     16.6±0.07µs        ? ?/sec
decimal128_add_rescale(0)            1.00     16.7±0.01µs        ? ?/sec    1.20     20.0±0.02µs        ? ?/sec
decimal128_add_rescale(0.1)          1.00     20.2±0.25µs        ? ?/sec    1.00     20.2±0.03µs        ? ?/sec
decimal128_divide(0)                 1.00     51.7±0.03µs        ? ?/sec    1.00     51.7±0.09µs        ? ?/sec
decimal128_divide(0.1)               1.00     53.7±0.46µs        ? ?/sec    1.00     53.6±0.38µs        ? ?/sec
decimal128_multiply(0)               2.27     24.5±0.02µs        ? ?/sec    1.00     10.8±0.02µs        ? ?/sec
decimal128_multiply(0.1)             1.44     15.7±0.21µs        ? ?/sec    1.00     10.9±0.04µs        ? ?/sec
decimal128_subtract(0)               1.00      8.5±0.00µs        ? ?/sec    1.00      8.5±0.02µs        ? ?/sec
decimal128_subtract(0.1)             1.79     15.3±0.20µs        ? ?/sec    1.00      8.5±0.03µs        ? ?/sec
decimal256_add(0)                    1.66     20.1±1.25µs        ? ?/sec    1.00     12.1±0.02µs        ? ?/sec
decimal256_add(0.1)                  1.81     22.2±2.02µs        ? ?/sec    1.00     12.2±0.03µs        ? ?/sec
decimal256_multiply(0)               1.07     69.9±0.04µs        ? ?/sec    1.00     65.1±0.15µs        ? ?/sec
decimal256_multiply(0.1)             1.16     72.6±0.04µs        ? ?/sec    1.00     62.6±0.06µs        ? ?/sec
decimal64_add(0)                     3.42      8.5±0.02µs        ? ?/sec    1.00      2.5±0.00µs        ? ?/sec
decimal64_add(0.1)                   5.92     15.2±0.12µs        ? ?/sec    1.00      2.6±0.01µs        ? ?/sec
decimal64_multiply(0)                1.27      8.5±0.02µs        ? ?/sec    1.00      6.7±0.11µs        ? ?/sec
decimal64_multiply(0.1)              2.20     15.2±0.11µs        ? ?/sec    1.00      6.9±0.13µs        ? ?/sec

Per-runner information
arithmetic_kernels — shard 1/1

Node: gk3-benchmark-cluster-nap-oclc6q2e-df121e2a-ln85

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

uname:

Linux bench-c6616002276-4385-qdv7t 6.12.105+ #1 SMP Sat Sep 19 07:55:25 UTC 2026 aarch64 GNU/Linux

BENCH_COMMAND:

cargo bench --features=arrow,async,test_common,experimental,object_store --bench arithmetic_kernels
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
Resource Usage

base (merge-base)

Metric Value
Wall time 195.0s
Peak memory 14.4 MiB
Avg memory 13.5 MiB
CPU user 190.0s
CPU sys 0.0s
Peak spill 0 B

branch

Metric Value
Wall time 195.0s
Peak memory 13.8 MiB
Avg memory 12.9 MiB
CPU user 191.2s
CPU sys 0.0s
Peak spill 0 B

File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark starting (GKE) | trigger

Target: arithmetic_kernels

Sharding factor: 1 (1 workers).

Comparing vectorize-checked-decimal-arithmetic (c5774ac) to 5cf1987 diff

Run configuration
run benchmark arithmetic_kernels
baseline:
  ref: 5cf1987a91
env:
  BENCH_FILTER: ^decimal
  RUSTFLAGS: -C target-cpu=x86-64-v3 -C llvm-args=-align-all-functions=6 -C llvm-args=-align-all-nofallthru-blocks=6
resources:
  arch: amd64
shards: 1

Results will be posted when all workers finish.


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Target: arithmetic_kernels

Comparing vectorize-checked-decimal-arithmetic (c5774ac) to 5cf1987 diff

Run configuration
run benchmark arithmetic_kernels
baseline:
  ref: 5cf1987a91
env:
  BENCH_FILTER: ^decimal
  RUSTFLAGS: -C llvm-args=-align-all-functions=6 -C llvm-args=-align-all-nofallthru-blocks=6
shards: 1
Details
group                                base                                   changed
-----                                ----                                   -------
decimal128_add(0)                    1.01      8.5±0.01µs        ? ?/sec    1.00      8.4±0.01µs        ? ?/sec
decimal128_add(0.1)                  1.81     15.4±0.16µs        ? ?/sec    1.00      8.5±0.01µs        ? ?/sec
decimal128_add_null_slot_overflow    1.00     15.1±0.19µs        ? ?/sec    1.53     23.1±0.79µs        ? ?/sec
decimal128_add_overflow              1.00      9.2±0.01µs        ? ?/sec    1.80     16.6±0.01µs        ? ?/sec
decimal128_add_rescale(0)            1.00     16.7±0.02µs        ? ?/sec    1.20     20.0±0.04µs        ? ?/sec
decimal128_add_rescale(0.1)          1.00     20.1±0.34µs        ? ?/sec    1.00     20.1±0.02µs        ? ?/sec
decimal128_divide(0)                 1.00     51.7±0.03µs        ? ?/sec    1.00     51.7±0.03µs        ? ?/sec
decimal128_divide(0.1)               1.00     53.8±0.49µs        ? ?/sec    1.00     53.7±0.46µs        ? ?/sec
decimal128_multiply(0)               2.18     24.6±0.02µs        ? ?/sec    1.00     11.3±0.14µs        ? ?/sec
decimal128_multiply(0.1)             1.44     15.7±0.19µs        ? ?/sec    1.00     10.9±0.01µs        ? ?/sec
decimal128_subtract(0)               1.00      8.5±0.01µs        ? ?/sec    1.00      8.5±0.03µs        ? ?/sec
decimal128_subtract(0.1)             1.79     15.3±0.23µs        ? ?/sec    1.00      8.5±0.01µs        ? ?/sec
decimal256_add(0)                    1.66     20.2±1.33µs        ? ?/sec    1.00     12.2±0.06µs        ? ?/sec
decimal256_add(0.1)                  1.82     22.2±2.10µs        ? ?/sec    1.00     12.2±0.01µs        ? ?/sec
decimal256_multiply(0)               1.08     69.9±0.06µs        ? ?/sec    1.00     65.0±0.10µs        ? ?/sec
decimal256_multiply(0.1)             1.16     72.5±0.04µs        ? ?/sec    1.00     62.6±0.10µs        ? ?/sec
decimal64_add(0)                     3.40      8.5±0.02µs        ? ?/sec    1.00      2.5±0.01µs        ? ?/sec
decimal64_add(0.1)                   5.92     15.2±0.12µs        ? ?/sec    1.00      2.6±0.00µs        ? ?/sec
decimal64_multiply(0)                1.28      8.5±0.01µs        ? ?/sec    1.00      6.6±0.01µs        ? ?/sec
decimal64_multiply(0.1)              2.26     15.2±0.12µs        ? ?/sec    1.00      6.7±0.02µs        ? ?/sec

Per-runner information
arithmetic_kernels — shard 1/1

Node: gk3-benchmark-cluster-nap-oclc6q2e-64c98ba8-w28v

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

uname:

Linux bench-c6616004420-4386-5sjw9 6.12.105+ #1 SMP Sat Sep 19 07:55:25 UTC 2026 aarch64 GNU/Linux

BENCH_COMMAND:

cargo bench --features=arrow,async,test_common,experimental,object_store --bench arithmetic_kernels
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
Resource Usage

base (merge-base)

Metric Value
Wall time 195.0s
Peak memory 15.7 MiB
Avg memory 14.8 MiB
CPU user 189.9s
CPU sys 0.0s
Peak spill 0 B

branch

Metric Value
Wall time 200.0s
Peak memory 15.0 MiB
Avg memory 14.0 MiB
CPU user 194.2s
CPU sys 0.0s
Peak spill 0 B

File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Target: arithmetic_kernels

Comparing vectorize-checked-decimal-arithmetic (c5774ac) to 5cf1987 diff

Run configuration
run benchmark arithmetic_kernels
baseline:
  ref: 5cf1987a91
env:
  BENCH_FILTER: ^decimal
  RUSTFLAGS: -C target-cpu=x86-64-v3
resources:
  arch: amd64
shards: 1
Details
group                                base                                   changed
-----                                ----                                   -------
decimal128_add(0)                    1.94     12.7±0.79µs        ? ?/sec    1.00      6.6±0.22µs        ? ?/sec
decimal128_add(0.1)                  2.53     17.1±0.76µs        ? ?/sec    1.00      6.7±0.21µs        ? ?/sec
decimal128_add_null_slot_overflow    1.00     18.0±0.54µs        ? ?/sec    1.42     25.5±1.07µs        ? ?/sec
decimal128_add_overflow              1.00     14.3±0.50µs        ? ?/sec    1.36     19.4±0.76µs        ? ?/sec
decimal128_add_rescale(0)            1.62     39.7±1.70µs        ? ?/sec    1.00     24.5±0.69µs        ? ?/sec
decimal128_add_rescale(0.1)          1.95     48.2±1.98µs        ? ?/sec    1.00     24.7±0.82µs        ? ?/sec
decimal128_divide(0)                 1.00    104.0±4.77µs        ? ?/sec    1.02    106.2±4.53µs        ? ?/sec
decimal128_divide(0.1)               1.01    101.1±5.61µs        ? ?/sec    1.00    100.5±4.70µs        ? ?/sec
decimal128_multiply(0)               2.07     21.0±1.08µs        ? ?/sec    1.00     10.2±0.47µs        ? ?/sec
decimal128_multiply(0.1)             2.62     27.3±1.22µs        ? ?/sec    1.00     10.4±0.37µs        ? ?/sec
decimal128_subtract(0)               1.98     13.0±0.59µs        ? ?/sec    1.00      6.6±0.24µs        ? ?/sec
decimal128_subtract(0.1)             2.54     17.3±0.77µs        ? ?/sec    1.00      6.8±0.14µs        ? ?/sec
decimal256_add(0)                    1.00     22.7±1.09µs        ? ?/sec    1.04     23.5±2.10µs        ? ?/sec
decimal256_add(0.1)                  1.28     30.6±1.03µs        ? ?/sec    1.00     23.9±1.93µs        ? ?/sec
decimal256_multiply(0)               1.00    106.5±6.41µs        ? ?/sec    1.02    108.9±2.53µs        ? ?/sec
decimal256_multiply(0.1)             1.00    101.3±4.68µs        ? ?/sec    1.05    106.2±2.71µs        ? ?/sec
decimal64_add(0)                     3.74      9.7±0.43µs        ? ?/sec    1.00      2.6±0.13µs        ? ?/sec
decimal64_add(0.1)                   3.88     10.7±1.18µs        ? ?/sec    1.00      2.8±0.13µs        ? ?/sec
decimal64_multiply(0)                1.10      9.4±0.50µs        ? ?/sec    1.00      8.5±0.36µs        ? ?/sec
decimal64_multiply(0.1)              1.23     11.0±1.11µs        ? ?/sec    1.00      9.0±0.16µs        ? ?/sec

Per-runner information
arithmetic_kernels — shard 1/1

Node: gk3-benchmark-cluster-nap-11j2ashw-1b098063-44mm

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

uname:

Linux bench-c6616009972-4389-t6k59 6.12.105+ #1 SMP Sat Sep 19 07:57:03 UTC 2026 x86_64 GNU/Linux

BENCH_COMMAND:

cargo bench --features=arrow,async,test_common,experimental,object_store --bench arithmetic_kernels
CPU Details (lscpu)
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
Resource Usage

base (merge-base)

Metric Value
Wall time 195.0s
Peak memory 15.0 MiB
Avg memory 13.9 MiB
CPU user 188.9s
CPU sys 0.0s
Peak spill 0 B

branch

Metric Value
Wall time 195.0s
Peak memory 14.8 MiB
Avg memory 13.6 MiB
CPU user 191.2s
CPU sys 0.0s
Peak spill 0 B

File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Target: arithmetic_kernels

Comparing vectorize-checked-decimal-arithmetic (c5774ac) to 5cf1987 diff

Run configuration
run benchmark arithmetic_kernels
baseline:
  ref: 5cf1987a91
env:
  BENCH_FILTER: ^decimal
resources:
  arch: amd64
shards: 1
Details
group                                base                                   changed
-----                                ----                                   -------
decimal128_add(0)                    2.02     11.4±0.40µs        ? ?/sec    1.00      5.7±0.09µs        ? ?/sec
decimal128_add(0.1)                  2.57     14.9±0.29µs        ? ?/sec    1.00      5.8±0.09µs        ? ?/sec
decimal128_add_null_slot_overflow    1.00     15.1±0.35µs        ? ?/sec    1.39     21.0±0.54µs        ? ?/sec
decimal128_add_overflow              1.00     12.2±0.21µs        ? ?/sec    1.38     16.9±0.26µs        ? ?/sec
decimal128_add_rescale(0)            1.89     40.6±1.25µs        ? ?/sec    1.00     21.5±0.54µs        ? ?/sec
decimal128_add_rescale(0.1)          2.11     45.5±1.67µs        ? ?/sec    1.00     21.5±0.27µs        ? ?/sec
decimal128_divide(0)                 1.00     97.6±3.43µs        ? ?/sec    1.00     97.2±2.72µs        ? ?/sec
decimal128_divide(0.1)               1.00     91.8±1.05µs        ? ?/sec    1.00     92.1±1.98µs        ? ?/sec
decimal128_multiply(0)               2.41     22.3±0.65µs        ? ?/sec    1.00      9.2±0.15µs        ? ?/sec
decimal128_multiply(0.1)             2.81     25.9±0.60µs        ? ?/sec    1.00      9.2±0.31µs        ? ?/sec
decimal128_subtract(0)               1.99     11.4±0.33µs        ? ?/sec    1.00      5.7±0.21µs        ? ?/sec
decimal128_subtract(0.1)             2.58     14.9±0.33µs        ? ?/sec    1.00      5.8±0.09µs        ? ?/sec
decimal256_add(0)                    2.08     20.9±1.27µs        ? ?/sec    1.00     10.0±0.17µs        ? ?/sec
decimal256_add(0.1)                  2.56     26.2±1.66µs        ? ?/sec    1.00     10.2±0.21µs        ? ?/sec
decimal256_multiply(0)               1.02     93.9±2.54µs        ? ?/sec    1.00     92.1±3.07µs        ? ?/sec
decimal256_multiply(0.1)             1.00     89.3±2.34µs        ? ?/sec    1.00     89.1±2.36µs        ? ?/sec
decimal64_add(0)                     3.15      8.5±0.14µs        ? ?/sec    1.00      2.7±0.21µs        ? ?/sec
decimal64_add(0.1)                   3.36      9.2±0.91µs        ? ?/sec    1.00      2.8±0.09µs        ? ?/sec
decimal64_multiply(0)                1.32      8.5±0.19µs        ? ?/sec    1.00      6.5±0.33µs        ? ?/sec
decimal64_multiply(0.1)              1.42      9.3±0.91µs        ? ?/sec    1.00      6.5±0.09µs        ? ?/sec

Per-runner information
arithmetic_kernels — shard 1/1

Node: gk3-benchmark-cluster-nap-11j2ashw-5b2a8cd0-98fd

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

uname:

Linux bench-c6616005830-4387-xn8p5 6.12.105+ #1 SMP Sat Sep 19 07:57:03 UTC 2026 x86_64 GNU/Linux

BENCH_COMMAND:

cargo bench --features=arrow,async,test_common,experimental,object_store --bench arithmetic_kernels
CPU Details (lscpu)
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
Resource Usage

base (merge-base)

Metric Value
Wall time 195.0s
Peak memory 15.2 MiB
Avg memory 14.2 MiB
CPU user 190.1s
CPU sys 0.0s
Peak spill 0 B

branch

Metric Value
Wall time 200.1s
Peak memory 14.9 MiB
Avg memory 13.7 MiB
CPU user 197.2s
CPU sys 0.0s
Peak spill 0 B

File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Target: arithmetic_kernels

Comparing vectorize-checked-decimal-arithmetic (c5774ac) to 5cf1987 diff

Run configuration
run benchmark arithmetic_kernels
baseline:
  ref: 5cf1987a91
env:
  BENCH_FILTER: ^decimal
  RUSTFLAGS: -C llvm-args=-align-all-functions=6 -C llvm-args=-align-all-nofallthru-blocks=6
resources:
  arch: amd64
shards: 1
Details
group                                base                                   changed
-----                                ----                                   -------
decimal128_add(0)                    1.42      7.8±0.14µs        ? ?/sec    1.00      5.5±0.07µs        ? ?/sec
decimal128_add(0.1)                  1.97     10.9±0.11µs        ? ?/sec    1.00      5.5±0.05µs        ? ?/sec
decimal128_add_null_slot_overflow    1.00     10.9±0.25µs        ? ?/sec    1.52     16.6±0.27µs        ? ?/sec
decimal128_add_overflow              1.00      9.0±0.03µs        ? ?/sec    1.51     13.6±0.19µs        ? ?/sec
decimal128_add_rescale(0)            2.23     44.7±1.07µs        ? ?/sec    1.00     20.1±0.25µs        ? ?/sec
decimal128_add_rescale(0.1)          2.06     41.8±0.50µs        ? ?/sec    1.00     20.3±0.19µs        ? ?/sec
decimal128_divide(0)                 1.01     89.1±0.77µs        ? ?/sec    1.00     88.2±0.78µs        ? ?/sec
decimal128_divide(0.1)               1.00     84.3±0.72µs        ? ?/sec    1.00     84.2±0.78µs        ? ?/sec
decimal128_multiply(0)               2.60     23.1±1.38µs        ? ?/sec    1.00      8.9±0.09µs        ? ?/sec
decimal128_multiply(0.1)             2.67     24.1±0.36µs        ? ?/sec    1.00      9.0±0.22µs        ? ?/sec
decimal128_subtract(0)               1.38      7.7±0.07µs        ? ?/sec    1.00      5.6±0.10µs        ? ?/sec
decimal128_subtract(0.1)             1.98     11.0±0.16µs        ? ?/sec    1.00      5.6±0.06µs        ? ?/sec
decimal256_add(0)                    1.36     14.3±0.12µs        ? ?/sec    1.00     10.5±0.11µs        ? ?/sec
decimal256_add(0.1)                  1.80     19.7±0.34µs        ? ?/sec    1.00     10.9±0.11µs        ? ?/sec
decimal256_multiply(0)               1.00     86.0±1.20µs        ? ?/sec    1.03     88.2±1.26µs        ? ?/sec
decimal256_multiply(0.1)             1.00     84.6±1.06µs        ? ?/sec    1.01     85.5±0.82µs        ? ?/sec
decimal64_add(0)                     2.72      6.8±0.10µs        ? ?/sec    1.00      2.5±0.03µs        ? ?/sec
decimal64_add(0.1)                   3.08      8.3±0.86µs        ? ?/sec    1.00      2.7±0.02µs        ? ?/sec
decimal64_multiply(0)                1.08      6.7±0.05µs        ? ?/sec    1.00      6.2±0.05µs        ? ?/sec
decimal64_multiply(0.1)              1.32      8.3±0.90µs        ? ?/sec    1.00      6.3±0.14µs        ? ?/sec

Per-runner information
arithmetic_kernels — shard 1/1

Node: gk3-benchmark-cluster-nap-11j2ashw-69d831de-tpgp

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

uname:

Linux bench-c6616007503-4388-cfx5g 6.12.105+ #1 SMP Sat Sep 19 07:57:03 UTC 2026 x86_64 GNU/Linux

BENCH_COMMAND:

cargo bench --features=arrow,async,test_common,experimental,object_store --bench arithmetic_kernels
CPU Details (lscpu)
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
Resource Usage

base (merge-base)

Metric Value
Wall time 205.1s
Peak memory 16.4 MiB
Avg memory 15.6 MiB
CPU user 203.1s
CPU sys 0.0s
Peak spill 0 B

branch

Metric Value
Wall time 210.0s
Peak memory 16.0 MiB
Avg memory 14.6 MiB
CPU user 206.2s
CPU sys 0.0s
Peak spill 0 B

File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Target: arithmetic_kernels

Comparing vectorize-checked-decimal-arithmetic (c5774ac) to 5cf1987 diff

Run configuration
run benchmark arithmetic_kernels
baseline:
  ref: 5cf1987a91
env:
  BENCH_FILTER: ^decimal
  RUSTFLAGS: -C target-cpu=x86-64-v3 -C llvm-args=-align-all-functions=6 -C llvm-args=-align-all-nofallthru-blocks=6
resources:
  arch: amd64
shards: 1
Details
group                                base                                   changed
-----                                ----                                   -------
decimal128_add(0)                    2.09     13.6±0.50µs        ? ?/sec    1.00      6.5±0.31µs        ? ?/sec
decimal128_add(0.1)                  2.63     18.0±0.84µs        ? ?/sec    1.00      6.8±0.14µs        ? ?/sec
decimal128_add_null_slot_overflow    1.00     17.9±0.65µs        ? ?/sec    1.38     24.8±1.19µs        ? ?/sec
decimal128_add_overflow              1.00     14.6±0.34µs        ? ?/sec    1.37     20.0±0.55µs        ? ?/sec
decimal128_add_rescale(0)            1.77     41.9±1.58µs        ? ?/sec    1.00     23.6±1.17µs        ? ?/sec
decimal128_add_rescale(0.1)          2.12     50.6±1.62µs        ? ?/sec    1.00     23.9±1.16µs        ? ?/sec
decimal128_divide(0)                 1.07    111.9±1.65µs        ? ?/sec    1.00    104.3±6.30µs        ? ?/sec
decimal128_divide(0.1)               1.06    106.2±3.83µs        ? ?/sec    1.00     99.8±4.60µs        ? ?/sec
decimal128_multiply(0)               2.10     21.6±0.37µs        ? ?/sec    1.00     10.3±0.41µs        ? ?/sec
decimal128_multiply(0.1)             2.63     27.9±1.36µs        ? ?/sec    1.00     10.6±0.31µs        ? ?/sec
decimal128_subtract(0)               2.16     13.6±0.37µs        ? ?/sec    1.00      6.3±0.33µs        ? ?/sec
decimal128_subtract(0.1)             2.63     18.0±0.29µs        ? ?/sec    1.00      6.8±0.11µs        ? ?/sec
decimal256_add(0)                    1.01     23.8±0.45µs        ? ?/sec    1.00     23.5±1.99µs        ? ?/sec
decimal256_add(0.1)                  1.38     31.2±0.99µs        ? ?/sec    1.00     22.5±2.04µs        ? ?/sec
decimal256_multiply(0)               1.03    112.2±3.98µs        ? ?/sec    1.00    108.4±3.71µs        ? ?/sec
decimal256_multiply(0.1)             1.01    105.6±1.57µs        ? ?/sec    1.00    104.1±4.22µs        ? ?/sec
decimal64_add(0)                     3.71     10.1±0.20µs        ? ?/sec    1.00      2.7±0.07µs        ? ?/sec
decimal64_add(0.1)                   3.65     10.0±1.01µs        ? ?/sec    1.00      2.7±0.13µs        ? ?/sec
decimal64_multiply(0)                1.14     10.1±0.20µs        ? ?/sec    1.00      8.9±0.14µs        ? ?/sec
decimal64_multiply(0.1)              1.25     10.4±0.98µs        ? ?/sec    1.00      8.3±0.45µs        ? ?/sec

Per-runner information
arithmetic_kernels — shard 1/1

Node: gk3-benchmark-cluster-nap-11j2ashw-4803721b-kr8v

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

uname:

Linux bench-c6616011753-4390-d5h9z 6.12.105+ #1 SMP Sat Sep 19 07:57:03 UTC 2026 x86_64 GNU/Linux

BENCH_COMMAND:

cargo bench --features=arrow,async,test_common,experimental,object_store --bench arithmetic_kernels
CPU Details (lscpu)
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
Resource Usage

base (merge-base)

Metric Value
Wall time 190.0s
Peak memory 16.3 MiB
Avg memory 15.3 MiB
CPU user 185.9s
CPU sys 0.0s
Peak spill 0 B

branch

Metric Value
Wall time 195.0s
Peak memory 15.7 MiB
Avg memory 14.6 MiB
CPU user 193.2s
CPU sys 0.0s
Peak spill 0 B

File an issue against this benchmark runner

@mbutrovich

Copy link
Copy Markdown
Contributor Author

run benchmark arithmetic_kernels

baseline:
  ref: 5cf1987a91
env:
  BENCH_FILTER: "^decimal"

@mbutrovich

Copy link
Copy Markdown
Contributor Author

run benchmark arithmetic_kernels

baseline:
  ref: 5cf1987a91
env:
  BENCH_FILTER: "^decimal"
  RUSTFLAGS: "-C llvm-args=-align-all-functions=6 -C llvm-args=-align-all-nofallthru-blocks=6"

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark starting (GKE) | trigger

Target: arithmetic_kernels

Sharding factor: 1 (1 workers).

Comparing vectorize-checked-decimal-arithmetic (cffdb05) to 5cf1987 diff

Run configuration
run benchmark arithmetic_kernels
baseline:
  ref: 5cf1987a91
env:
  BENCH_FILTER: ^decimal
shards: 1

Results will be posted when all workers finish.


File an issue against this benchmark runner

@mbutrovich

Copy link
Copy Markdown
Contributor Author

run benchmark arithmetic_kernels

baseline:
  ref: 5cf1987a91
env:
  BENCH_FILTER: "^decimal"
resources:
  arch: amd64

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark starting (GKE) | trigger

Target: arithmetic_kernels

Sharding factor: 1 (1 workers).

Comparing vectorize-checked-decimal-arithmetic (cffdb05) to 5cf1987 diff

Run configuration
run benchmark arithmetic_kernels
baseline:
  ref: 5cf1987a91
env:
  BENCH_FILTER: ^decimal
  RUSTFLAGS: -C llvm-args=-align-all-functions=6 -C llvm-args=-align-all-nofallthru-blocks=6
shards: 1

Results will be posted when all workers finish.


File an issue against this benchmark runner

@mbutrovich

Copy link
Copy Markdown
Contributor Author

run benchmark arithmetic_kernels

baseline:
  ref: 5cf1987a91
env:
  BENCH_FILTER: "^decimal"
  RUSTFLAGS: "-C llvm-args=-align-all-functions=6 -C llvm-args=-align-all-nofallthru-blocks=6"
resources:
  arch: amd64

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark starting (GKE) | trigger

Target: arithmetic_kernels

Sharding factor: 1 (1 workers).

Comparing vectorize-checked-decimal-arithmetic (cffdb05) to 5cf1987 diff

Run configuration
run benchmark arithmetic_kernels
baseline:
  ref: 5cf1987a91
env:
  BENCH_FILTER: ^decimal
resources:
  arch: amd64
shards: 1

Results will be posted when all workers finish.


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark starting (GKE) | trigger

Target: arithmetic_kernels

Sharding factor: 1 (1 workers).

Comparing vectorize-checked-decimal-arithmetic (cffdb05) to 5cf1987 diff

Run configuration
run benchmark arithmetic_kernels
baseline:
  ref: 5cf1987a91
env:
  BENCH_FILTER: ^decimal
  RUSTFLAGS: -C llvm-args=-align-all-functions=6 -C llvm-args=-align-all-nofallthru-blocks=6
resources:
  arch: amd64
shards: 1

Results will be posted when all workers finish.


File an issue against this benchmark runner

@mbutrovich

Copy link
Copy Markdown
Contributor Author

run benchmark arithmetic_kernels

baseline:
  ref: 5cf1987a91
env:
  BENCH_FILTER: "^decimal"
  RUSTFLAGS: "-C target-cpu=x86-64-v3"
resources:
  arch: amd64

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark starting (GKE) | trigger

Target: arithmetic_kernels

Sharding factor: 1 (1 workers).

Comparing vectorize-checked-decimal-arithmetic (f933cfa) to 362eb22 diff

Run configuration
run benchmark arithmetic_kernels
baseline:
  ref: 362eb2294d
env:
  BENCH_FILTER: ^decimal(64_multiply|128_divide)
  RUSTFLAGS: -C target-cpu=x86-64-v3 -C llvm-args=-align-all-functions=6 -C llvm-args=-align-all-nofallthru-blocks=6
resources:
  arch: amd64
shards: 1

Results will be posted when all workers finish.


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Target: arithmetic_kernels

Comparing vectorize-checked-decimal-arithmetic (f933cfa) to 362eb22 diff

Run configuration
run benchmark arithmetic_kernels
baseline:
  ref: 362eb2294d
env:
  BENCH_FILTER: ^decimal(64_multiply|128_divide)
resources:
  arch: amd64
shards: 1
Details
group                      base                                   changed
-----                      ----                                   -------
decimal128_divide(0)       1.04    123.9±1.78µs        ? ?/sec    1.00    118.9±3.00µs        ? ?/sec
decimal128_divide(0.1)     1.02    101.2±2.71µs        ? ?/sec    1.00     99.1±2.35µs        ? ?/sec
decimal64_multiply(0)      2.40      9.0±1.41µs        ? ?/sec    1.00      3.8±0.08µs        ? ?/sec
decimal64_multiply(0.1)    2.76     11.4±1.15µs        ? ?/sec    1.00      4.1±0.11µs        ? ?/sec

Per-runner information
arithmetic_kernels — shard 1/1

Node: gk3-benchmark-cluster-nap-1jwtivje-76dcaf12-5hrm

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

uname:

Linux bench-c6864713381-5060-8pfcc 6.12.105+ #1 SMP Sat Sep 19 07:57:03 UTC 2026 x86_64 GNU/Linux

BENCH_COMMAND:

cargo bench --features=arrow,async,test_common,experimental,object_store --bench arithmetic_kernels
CPU Details (lscpu)
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
Resource Usage

base (merge-base)

Metric Value
Wall time 40.0s
Peak memory 15.9 MiB
Avg memory 12.6 MiB
CPU user 35.7s
CPU sys 0.0s
Peak spill 0 B

branch

Metric Value
Wall time 40.0s
Peak memory 16.2 MiB
Avg memory 13.1 MiB
CPU user 36.0s
CPU sys 0.0s
Peak spill 0 B

File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Target: arithmetic_kernels

Comparing vectorize-checked-decimal-arithmetic (f933cfa) to 362eb22 diff

Run configuration
run benchmark arithmetic_kernels
baseline:
  ref: 362eb2294d
env:
  BENCH_FILTER: ^decimal(64_multiply|128_divide)
  RUSTFLAGS: -C llvm-args=-align-all-functions=6 -C llvm-args=-align-all-nofallthru-blocks=6
resources:
  arch: amd64
shards: 1
Details
group                      base                                   changed
-----                      ----                                   -------
decimal128_divide(0)       1.00    118.4±2.53µs        ? ?/sec    1.00    118.0±1.33µs        ? ?/sec
decimal128_divide(0.1)     1.00    100.3±1.19µs        ? ?/sec    1.00    100.3±1.40µs        ? ?/sec
decimal64_multiply(0)      2.49      9.2±1.39µs        ? ?/sec    1.00      3.7±0.06µs        ? ?/sec
decimal64_multiply(0.1)    2.83     11.2±0.95µs        ? ?/sec    1.00      3.9±0.11µs        ? ?/sec

Per-runner information
arithmetic_kernels — shard 1/1

Node: gk3-benchmark-cluster-nap-1jwtivje-ad4e1533-frd7

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

uname:

Linux bench-c6864715626-5061-8c4tx 6.12.105+ #1 SMP Sat Sep 19 07:57:03 UTC 2026 x86_64 GNU/Linux

BENCH_COMMAND:

cargo bench --features=arrow,async,test_common,experimental,object_store --bench arithmetic_kernels
CPU Details (lscpu)
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
Resource Usage

base (merge-base)

Metric Value
Wall time 40.0s
Peak memory 16.8 MiB
Avg memory 13.4 MiB
CPU user 35.6s
CPU sys 0.0s
Peak spill 0 B

branch

Metric Value
Wall time 40.0s
Peak memory 17.3 MiB
Avg memory 13.7 MiB
CPU user 35.0s
CPU sys 0.0s
Peak spill 0 B

File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Target: arithmetic_kernels

Comparing vectorize-checked-decimal-arithmetic (f933cfa) to 362eb22 diff

Run configuration
run benchmark arithmetic_kernels
baseline:
  ref: 362eb2294d
env:
  BENCH_FILTER: ^decimal(64_multiply|128_divide)
  RUSTFLAGS: -C target-cpu=x86-64-v3
resources:
  arch: amd64
shards: 1
Details
group                      base                                   changed
-----                      ----                                   -------
decimal128_divide(0)       1.00    109.6±3.65µs        ? ?/sec    1.06    115.8±3.22µs        ? ?/sec
decimal128_divide(0.1)     1.00     96.8±1.49µs        ? ?/sec    1.00     96.6±1.15µs        ? ?/sec
decimal64_multiply(0)      2.46      8.9±1.45µs        ? ?/sec    1.00      3.6±0.05µs        ? ?/sec
decimal64_multiply(0.1)    3.10     12.0±1.00µs        ? ?/sec    1.00      3.9±0.13µs        ? ?/sec

Per-runner information
arithmetic_kernels — shard 1/1

Node: gk3-benchmark-cluster-nap-1jwtivje-76dcaf12-2tws

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

uname:

Linux bench-c6864718429-5062-wsld5 6.12.105+ #1 SMP Sat Sep 19 07:57:03 UTC 2026 x86_64 GNU/Linux

BENCH_COMMAND:

cargo bench --features=arrow,async,test_common,experimental,object_store --bench arithmetic_kernels
CPU Details (lscpu)
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
Resource Usage

base (merge-base)

Metric Value
Wall time 45.0s
Peak memory 16.1 MiB
Avg memory 13.4 MiB
CPU user 41.7s
CPU sys 0.0s
Peak spill 0 B

branch

Metric Value
Wall time 40.0s
Peak memory 16.2 MiB
Avg memory 12.7 MiB
CPU user 35.0s
CPU sys 0.0s
Peak spill 0 B

File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Target: arithmetic_kernels

Comparing vectorize-checked-decimal-arithmetic (f933cfa) to 362eb22 diff

Run configuration
run benchmark arithmetic_kernels
baseline:
  ref: 362eb2294d
env:
  BENCH_FILTER: ^decimal(64_multiply|128_divide)
  RUSTFLAGS: -C target-cpu=x86-64-v3 -C llvm-args=-align-all-functions=6 -C llvm-args=-align-all-nofallthru-blocks=6
resources:
  arch: amd64
shards: 1
Details
group                      base                                   changed
-----                      ----                                   -------
decimal128_divide(0)       1.00    111.4±2.06µs        ? ?/sec    1.01    112.2±2.15µs        ? ?/sec
decimal128_divide(0.1)     1.03     97.1±2.12µs        ? ?/sec    1.00     94.5±2.42µs        ? ?/sec
decimal64_multiply(0)      2.47      8.7±1.35µs        ? ?/sec    1.00      3.5±0.12µs        ? ?/sec
decimal64_multiply(0.1)    3.04     11.4±1.04µs        ? ?/sec    1.00      3.7±0.14µs        ? ?/sec

Per-runner information
arithmetic_kernels — shard 1/1

Node: gk3-benchmark-cluster-nap-1jwtivje-ad4e1533-dcrz

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

uname:

Linux bench-c6864720043-5063-dc2pd 6.12.105+ #1 SMP Sat Sep 19 07:57:03 UTC 2026 x86_64 GNU/Linux

BENCH_COMMAND:

cargo bench --features=arrow,async,test_common,experimental,object_store --bench arithmetic_kernels
CPU Details (lscpu)
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
Resource Usage

base (merge-base)

Metric Value
Wall time 40.0s
Peak memory 17.0 MiB
Avg memory 13.5 MiB
CPU user 35.7s
CPU sys 0.0s
Peak spill 0 B

branch

Metric Value
Wall time 40.0s
Peak memory 17.2 MiB
Avg memory 13.6 MiB
CPU user 35.0s
CPU sys 0.0s
Peak spill 0 B

File an issue against this benchmark runner

@mbutrovich

Copy link
Copy Markdown
Contributor Author

Decimal64 mul shares the i64 multiply that #12058 changed to overflowing_mul, and this PR now has the same change (f933cfa). Without and with 10% nulls, decimal64_multiply measured 1.35x and 2.14x on Neoverse-V2, 2.37x and 2.78x on Xeon 8581C, and 2.47x and 3.08x with x86-64-v3. Without nulls on x86-64-v3 it measured 0.76x to 0.99x in the earlier runs. The unchanged decimal128_divide measured 0.95x to 1.04x in the same runs.

@andygrove andygrove left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @mbutrovich, this looks good to me. I checked the sign-bit overflow logic for add/sub, the widening multiplies, the masking of overflow in null slots (including offsets), and the fallback to the checked kernel, and they all look correct. I left a few non-blocking nits.

c.bench_function(&format!("decimal64_add({null_density})"), |bench| {
bench.iter(|| hint::black_box(add(&a64, &b64).unwrap()))
});
c.bench_function(&format!("decimal64_multiply({null_density})"), |bench| {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: The description says Decimal32 and Decimal64 add/sub now vectorize, but there's no Decimal32 benchmark and no decimal64_subtract. Could you add them? The Decimal32 path in particular (widening i32 to i64 for mul, sign-bit add/sub) has no coverage, so a slowdown there like the one you saw for i256 would go unnoticed.

/// through a pointer. The checked `add` cases of the `arithmetic_kernels`
/// benchmark measure this.
#[inline(never)]
fn collect_overflowing<N>(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: Could you add numbers to the PR description comparing this to a safe version (e.g. Vec::with_capacity + push/extend with the same #[inline(never)] boundary)? Since the gain depends on LLVM's inlining choices for a given target, it would be good to have a record that the unsafe is what produces the gain.

overflow |= overflowed;
written += 1;
}
debug_assert!(written <= values.capacity());

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: written <= values.capacity() can't fail, because the zip is bounded by spare_capacity_mut(). It doesn't check the set_len precondition either. Maybe drop it, or capture iter.len() up front and debug_assert_eq!(written, len), which at least catches an iterator that reports the wrong length.

@sunchao sunchao left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the updates. The output reservation is fallible, Decimal256 uses the checked kernel again, and the tests now sweep overflow positions for the vectorized decimal widths. Fork CI passed the arrow-arith debug and release tests. I left two follow-ups on allocations introduced by the revised paths.

Comment thread arrow-arith/src/numeric.rs Outdated
) -> Option<PrimitiveArray<T>> {
let valid_overflow = overflow
&& nulls.as_ref().is_none_or(|n| {
let overflowed = BooleanBuffer::collect_bool(n.len(), overflowed);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could the validity check avoid allocating two temporary bitmaps while holding the output? For nullable array–scalar arithmetic, the old kernel allocated the output and cloned the input validity buffer. If only a null slot overflows, the new check keeps the output but can panic if collect_bool cannot allocate its scratch bitmap. n.valid_indices().any(overflowed) would avoid both scratch buffers and short-circuit on the first valid overflow. If bit packing is faster, MutableBuffer::try_collect_bool and a word-by-word intersection would keep that loop and avoid the second allocation.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Allocation failure is a failing case, and I'd rather not add code for it here. The scratch is 2 KiB for 8192 rows, and if it can't be allocated, the checked kernel this falls back to can't report that on nullable input either (try_binary, try_unary). valid_indices().any(..) is what this check was before, and it slowed down the common case it exists for: nullable UInt32 minus a scalar, where zero-filled null slots overflow, measured 0.70x on Xeon 8581C (run), against 1.17x with the bitmaps (run). test_checked_decimal_null_slot_overflow_sliced now covers a sliced validity buffer across several 64-row chunks.

Comment thread arrow-arith/src/numeric.rs Outdated
return None;
}
let (value, overflow) = array.value(0).mul_overflowing(mul);
(!overflow).then(|| PrimitiveArray::new(vec![value].into(), None))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could we pass the rescaled native value directly or make this temporary reservation fallible? With two valid scalars at different scales, such as 1.50 + 1.0000, the base binary path returns ArrowError::MemoryError if output allocation fails. The new vec![value] can abort first, before either the fast path's fallible reservation or the checked fallback. This also allocates when the other operand is an empty array and will never read the rescaled value.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

rescale_scalar now reserves fallibly and leaves the rescale to the rows if that fails, so 1.50 + 1.0000 reaches the fast path's fallible reservation. test_decimal_rescaled_scalar covers two scalars. Two literals rarely reach this kernel, because DataFusion's ConstEvaluator and Spark's ConstantFolding fold them at plan time, so I kept it to that.

@mbutrovich
mbutrovich requested a review from sunchao November 15, 2026 15:57
@Rich-T-kid Rich-T-kid added the performance Speed or memory optimizations label Nov 16, 2026
mbutrovich and others added 2 commits November 16, 2026 12:09
Replace the BitAnd of the validity and overflow bitmaps with a shared, non-generic word-at-a-time intersection that stops at the first valid overflow, so the check allocates one bitmap instead of two.
@mbutrovich

Copy link
Copy Markdown
Contributor Author

I ran the arith property from arrow-pbt against this PR at aee0225, which contains main at d65329d. It passed seeds 1 to 18 at 10,000 cases each, with one case discarded as the known #11604 (decimal div at the native minimum).

arith calls all eight numeric kernels on every integer and decimal width, Decimal256 included, on two arrays and with a scalar on either side, and checks each row against exact BigInt arithmetic. A checked kernel must fail if and only if a valid row overflows, and when it fails, each row is rerun on its own. Decimal add_wrapping, sub_wrapping and mul_wrapping are checked the same way, since they return the overflow error. The right side of a decimal operation can have another precision and scale, so the rescaled path runs too. The inputs put random values under null slots and slice arrays to nonzero offsets, and they draw values that fit in a narrower width, values just past it, and the type's limits (strategy).

The new paths were reached. Of the decimal add, sub and mul calls in the run, 210,359 returned a result, and in 20,394 of those only null slots overflowed. Another 31,954 returned the error because a valid row overflowed. The property checks that a call errors, but not which error it returns.

To rerun it, put each arrow-rs crate in arrow-pbt's .cargo/config.toml on { git = "https://github.com/apache/arrow-rs", rev = "refs/pull/12062/head" } and run:

ARROW_PBT_REASONS=1 cargo run -q -- run arith 1-18 10000

@sunchao sunchao left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reviewed aee0225d3937ac7ee79b406c5b19eb76d9f94288 with five independent reviewers across correctness, resources, design/reuse, tests, and API/documentation. No new actionable findings.

Checked intermediate rescale overflow, scalar hoisting with empty/all-null inputs, result precision/scale, i128 multiplication boundaries, sliced validity, and checked fallback behavior. The temporary scalar reservation is now fallible, the validity intersection avoids a second bitmap, and Decimal256 retains the checked kernel. Existing bitmap/code-size and measured performance tradeoffs are already covered in the discussion.

The exact-head fork CI passed, including arrow-arith debug and optimized release tests; upstream Required Checks also passed. macOS/Windows were skipped, and this run does not independently establish the reported Miri validation. Published benchmark results identify earlier revisions. No local tests or benchmarks were run.

criterion_group!(benches, add_benchmark);
/// Like `create_primitive_array_range`, but with its own `seed`, so that two
/// arrays hold different values and nulls.
fn seeded_array<T>(

@comphead comphead Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

seeded_array is create_primitive_array_range with a seed, and #12058 adds the same copy. Could it move to arrow/src/util/bench_util.rs as create_primitive_array_range_with_seed, next to create_primitive_array_with_seed? nit: a64 and b64 repeat the same expression, and a decimal64 = |seed| ... closure like decimal32 would remove the repetition.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Could it move to arrow/src/util/bench_util.rs as create_primitive_array_range_with_seed, next to create_primitive_array_with_seed?

The copy here is identical to the one in #12058, so a trial merge of the two heads (git merge-tree fe005b260b aee0225d39) merges it cleanly into one. The file conflicts in the imports, in the new benchmark functions, and in criterion_group!, which the move doesn't change. The two PRs carry identical copies of what they share so that neither depends on the other (#12062 (comment) and #12058 (comment)). Only this file calls it, so I'd keep it here instead of adding a public function to arrow::util::bench_util.

nit: a64 and b64 repeat the same expression, and a decimal64 = |seed| ... closure like decimal32 would remove the repetition.

Done.

Comment thread arrow-arith/src/numeric.rs Resolved
Comment thread arrow-arith/src/numeric.rs Resolved
}

#[test]
fn test_checked_decimal_null_slot_overflow_sliced() {

@comphead comphead Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

After #12058 lands, this test runs the same overflowing_op and any_valid path as test_checked_null_slot_overflow_sliced there, because equal-scale Decimal64 add goes straight to overflowing_op. The only difference is i64 instead of i32. Could it be dropped when rebasing? The Kernel and Checked aliases would also collide, and test_checked_decimal_op and test_checked_integer_op are close enough that one helper taking a closure for the data type could serve both.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Could it be dropped when rebasing?

I'd keep it. It's the only test that runs decimal_op on a sliced array whose null slots overflow. Until #12058 lands, it's also the only test in this PR of any_valid on a sliced validity buffer, which I added for #12062 (comment).

The Kernel and Checked aliases would also collide

Yes. Whichever PR lands second drops its copy of the aliases along with its copy of the shared helpers, as in #12062 (comment) and #12058 (comment).

test_checked_decimal_op and test_checked_integer_op are close enough that one helper taking a closure for the data type could serve both.

They differ in more than the data type. The decimal helper takes the two scales and checks each operation against the rescaled operands, and the integer helper also runs every pair without nulls. A shared helper would need both of those as parameters, so I'd keep them separate.

@mbutrovich

Copy link
Copy Markdown
Contributor Author

Thanks for the feedback, @comphead!

@mbutrovich
mbutrovich requested a review from comphead November 19, 2026 21:02
@alamb

alamb commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

let me know when this is good to merge. @andygrove are you waiting on anything in particular before merging?

@andygrove

Copy link
Copy Markdown
Member

let me know when this is good to merge. @andygrove are you waiting on anything in particular before merging?

Nothing I'm waiting on. LGTM.

@andygrove
andygrove added this pull request to the merge queue Nov 20, 2026
Merged via the queue into apache:main with commit 19c0e23 Nov 20, 2026
22 checks passed
mbutrovich added a commit to mbutrovich/arrow-rs that referenced this pull request Nov 20, 2026
…pache#12058)

# Which issue does this PR close?

N/A.

# Rationale for this change

Checked `add`, `sub` and `mul` on integers [call `try_binary` or
`try_unary`](https://github.com/apache/arrow-rs/blob/b231cf15efa5dbbbe4ae8503849aa6ab3cfc4e0c/arrow-arith/src/numeric.rs#L337-L343),
which return at the first overflow, so LLVM doesn't vectorize them.
DataFusion calls them when `fail_on_overflow` is set
([`binary.rs`](https://github.com/apache/datafusion/blob/32bd81fb226ccf1ae5df67ff340d77baa3e73668/datafusion/physical-expr/src/expressions/binary.rs#L641-L651)),
and Comet calls them for Spark's ANSI mode
([`checked_arithmetic.rs`](https://github.com/apache/datafusion-comet/blob/79b5ddd50ba2e3f605399d641e4c0b3be84c20ef/native/spark-expr/src/math_funcs/checked_arithmetic.rs#L146-L148)).

# What changes are included in this PR?

- Integer `add`, `sub` and `mul` compute the wrapping result and an
overflow flag for every slot in one pass.
- If a slot overflowed and the result has nulls, they recompute the
overflow of every row into a bitmap and mask it with the validity bits.
They rerun the existing checked kernel only if a valid row overflowed,
so errors don't change. An overflow in a null slot, such as unsigned `0
- 1` in a slot that a builder filled with 0, doesn't rerun the batch.
- Signed `add` and `sub` test sign bits, because the signed
`overflowing_add` and `overflowing_sub` don't vectorize.
- Signed `i64` `mul` uses `overflowing_mul`, while the narrower signed
types multiply in the next wider type. Widened to `i128`, the `i64`
multiply stayed a scalar `imul` while LLVM packed each row's overflow
flag into vector registers, and it measured 0.65x with `x86-64-v3`.
- The pass writes into the `Vec`'s spare capacity and calls `set_len`
with the number of slots it wrote. With `collect`, LLVM sometimes left
the loop inside `collect` out of line, where it loaded and stored the
overflow flag on every row. apache#12062 measured that at 0.83x for rescaled
`Decimal128` add on Neoverse-V2. apache#12062 has the same helper.
- The output is reserved with `Vec::try_reserve_exact`, so an allocation
failure returns `ArrowError::MemoryError`.
- Null slots of the result hold the wrapping result instead of zero, as
they already do for `add_wrapping`.
- 48ca288 adds the benchmark cases, so the benchmark bot can compare
against it.

# Are these changes tested?

New tests in `arrow-arith/src/numeric.rs` compare the kernels with the
scalar checked operations at the edge values of every integer type. They
run as arrays with and without nulls, as one-row slices, and with a
scalar on either side. Another test moves one overflowing row through a
300-row batch, so that each lane of the vector loop and the scalar
remainder hold it once.

<img width="1600" height="3700" alt="checked-arith-bot-6035cda"
src="https://github.com/user-attachments/assets/e381c473-b6d2-4056-8dd0-92d976e4ac15"
/>

The overflow cases are expected to be slower, because they pay for the
new pass, the null-slot check, and then the checked kernel. With
`fail_on_overflow` or ANSI mode, an overflow fails the query, so that
cost is paid at most once per partition. A batch that overflows only in
null slots pays for the pass and the null-slot check, and still beats
`main` in the default-layout runs:
`int32_add_checked_null_slot_overflow` measured 2.67x on Neoverse-V2,
1.36x on Xeon 8581C, and 2.76x with `x86-64-v3`. The lowest is
`uint64_add_checked_null_slot_overflow` on Xeon 8581C, at 1.03x default
and 0.86x aligned.

The extra pass also costs code size: 132 KiB for `integer_op` and the
new helpers across the eight integer types, against 18.5 KiB before, in
the thin-LTO bench binary on aarch64. The checked kernels that the
fallback calls are unchanged.

Bot runs: Neoverse-V2
[default](apache#12058 (comment))
and
[aligned](apache#12058 (comment)),
Xeon 8581C
[default](apache#12058 (comment))
and
[aligned](apache#12058 (comment)),
and Xeon 8581C with `-C target-cpu=x86-64-v3`
[default](apache#12058 (comment))
and
[aligned](apache#12058 (comment)).
Those runs measured 8aa2750. 6035cda changes only the `i64`
multiply, and its `Int64` runs are: Neoverse-V2
[default](apache#12058 (comment))
and
[aligned](apache#12058 (comment)),
Xeon 8581C
[default](apache#12058 (comment))
and
[aligned](apache#12058 (comment)),
and `x86-64-v3`
[default](apache#12058 (comment))
and
[aligned](apache#12058 (comment)).

# 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arrow-core Core crates related to representing arrow data arrow-kernels Crates that transform arrow data (e.g. compute, cast) performance Speed or memory optimizations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants