Support mixed decimal multiplication - #9714
Conversation
Derive multiplication result types from both decimal operands and accept signed primitive integers without casting input arrays. Execute directly over canonical integer buffers while preserving checked decimal overflow and null semantics. Signed-off-by: Onur Satici <onur@spiraldb.com>
Merging this PR will regress 1 benchmark
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | WallTime | arrow_checked_add_u32_neon[16384] |
12.4 µs | 20.3 µs | -39.14% |
| ⚡ | WallTime | add_shapes_neon[(128, PerRowPerRow)] |
3.7 µs | 1.9 µs | +88.85% |
| ⚡ | WallTime | subtract_shapes_neon[(128, PerRowPerRow)] |
2.9 µs | 1.9 µs | +50.55% |
| ⚡ | WallTime | multiply_shapes_neon[(128, PerRowPerRow)] |
2.9 µs | 2 µs | +46.75% |
| ⚡ | WallTime | arrow_checked_add_u32_avx512[16384] |
21.3 µs | 17.7 µs | +20.33% |
| ⚡ | WallTime | add_u32_nonnull_neon |
7.9 µs | 6.8 µs | +16.29% |
| ⚡ | WallTime | compare_int_nullable_neon |
5.6 µs | 4.9 µs | +15.87% |
| ⚡ | WallTime | compare_int_constant_neon |
4.4 µs | 3.8 µs | +14.11% |
| ⚡ | WallTime | add_shapes_neon[(16384, PerRowPerRow)] |
11.3 µs | 9.9 µs | +14.07% |
| ⚡ | WallTime | add_i32_nonnull_neon |
9 µs | 7.9 µs | +13.45% |
| ⚡ | WallTime | add_i64_nonnull_neon |
11.3 µs | 10 µs | +13.05% |
| ⚡ | Simulation | cold_misaligned[(16, 64)] |
392.4 µs | 347.3 µs | +13% |
| ⚡ | WallTime | compare_int_eq_neon |
4.9 µs | 4.4 µs | +10.8% |
| ⚡ | WallTime | compare_int_neon |
4.9 µs | 4.4 µs | +10.54% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing os/decimal-mul (c25e1d9) with develop (a67cd1b)
Footnotes
-
206 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
-
4 benchmarks were run, but are now archived. If they were deleted in another branch, consider rebasing to remove them from the report. Instead if they were added back, click here to restore them. ↩
|
I think we want to expand this to all decimal operations |
Summary
Derive multiplication result types from both decimal operands and accept signed primitive integers without casting input arrays. Execute directly over canonical integer buffers while preserving checked decimal overflow and null semantics.