Skip to content

Use canonical widths in decimal compute kernels - #11573

Merged
connortsui20 merged 1 commit into
developfrom
ct/decimal-remove-width-workarounds
Nov 18, 2026
Merged

connortsui20 merged 1 commit into
developfrom
ct/decimal-remove-width-workarounds

Conversation

@connortsui20

@connortsui20 connortsui20 commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Two canonical decimal arrays with the same precision and scale now share an integer width. Comparisons, patching, interleave, row encoding, and builder append can read those buffers directly. Arithmetic still selects its working and result widths independently, and DecimalByteParts still converts values when splitting a high-precision decimal into integer parts.

The public DecimalType::is_compatible_decimal_value_type helper is removed. Use DecimalDType::canonical_values_type() to obtain the required width.

This should also help with the codegen size.

Stacked on #11572

@connortsui20 connortsui20 added the changelog/break A breaking API change label Nov 17, 2026
@connortsui20
connortsui20 force-pushed the ct/decimal-remove-width-workarounds branch from a98f799 to e8220ec Compare November 17, 2026 21:06
@connortsui20
connortsui20 force-pushed the ct/decimal-remove-width-workarounds branch from e8220ec to b1038e4 Compare November 17, 2026 21:07
@connortsui20
connortsui20 force-pushed the ct/decimal-remove-width-workarounds branch from b1038e4 to 7e41269 Compare November 17, 2026 21:38
@connortsui20
connortsui20 force-pushed the ct/decimal-remove-width-workarounds branch 2 times, most recently from 3fee585 to dd20bd0 Compare November 17, 2026 22:36
@connortsui20
connortsui20 force-pushed the ct/decimal-remove-width-workarounds branch from dd20bd0 to af1179e Compare November 17, 2026 22:38
@connortsui20
connortsui20 force-pushed the ct/decimal-remove-width-workarounds branch from af1179e to b4004a0 Compare November 18, 2026 14:48
@connortsui20
connortsui20 force-pushed the ct/decimal-remove-width-workarounds branch from b4004a0 to 72b4e4b Compare November 18, 2026 14:51
@connortsui20
connortsui20 force-pushed the ct/decimal-remove-width-workarounds branch from 72b4e4b to e6ae079 Compare November 18, 2026 15:02
@connortsui20
connortsui20 force-pushed the ct/decimal-remove-width-workarounds branch from e6ae079 to e867f12 Compare November 18, 2026 15:48
@connortsui20
connortsui20 marked this pull request as ready for review November 18, 2026 16:32
@codspeed

codspeed Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Merging this PR will improve performance by 12.25%

1 warning

⚠️ Walltime results may be unreliable

Some benchmarks used the Walltime instrument outside CodSpeed Macro Runners, which can make the results inconsistent.

Learn more about Macro Runners

See affected benchmarks

⚡ 4 improved benchmarks
✅ 1971 untouched benchmarks
⏩ 53 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
⚡ Walltime threshold_avx512[80] 2.4 µs 2.1 µs +13.65%
⚡ CPU Simulation density_sweep_random[0.05] 121.8 µs 108.2 µs +12.59%
⚡ CPU Simulation density_sweep_random[0.02] 55.4 µs 49.3 µs +12.34%
⚡ Walltime decode_blocked_bitpacked_chunked_neon[u32, 524288] 29.8 µs 27 µs +10.44%

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing ct/decimal-remove-width-workarounds (f0250c0) with ct/decimal-value-check (64f44a1)

Open in CodSpeed

Footnotes

  1. 53 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. ↩

@connortsui20
connortsui20 force-pushed the ct/decimal-remove-width-workarounds branch from e867f12 to f0250c0 Compare November 18, 2026 17:04
Comment on lines +18 to +19
fn decimal_values_equal<T: PartialEq>(lhs: &[T], rhs: &[T]) -> bool {
lhs == rhs

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

see #11605

Base automatically changed from ct/decimal-value-check to develop November 18, 2026 19:02
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
@connortsui20
connortsui20 force-pushed the ct/decimal-remove-width-workarounds branch from f0250c0 to 8789792 Compare November 18, 2026 19:03
@connortsui20
connortsui20 enabled stacked auto-merge (squash) November 18, 2026 19:12
@connortsui20
connortsui20 merged commit ac62d8d into develop Nov 18, 2026
102 of 106 checks passed
@connortsui20
connortsui20 deleted the ct/decimal-remove-width-workarounds branch November 18, 2026 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/break A breaking API change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants