Skip to content

Skip codegen of unreachable int to decimal carrier arms - #10735

Open
robert3005 wants to merge 1 commit into
developfrom
rk/size-decimal-cast-carrier
Open

robert3005 wants to merge 1 commit into
developfrom
rk/size-decimal-cast-carrier

Conversation

@robert3005

@robert3005 robert3005 commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

The scaled-down integer to decimal cast selects its carrier as max(carrier(S), T). The source type S and the target type T fix the carrier, but match_each_decimal_value_type! compiled the kernel for all six decimal widths in each of the 48 (S, T) pairs. An if const condition now removes the five arms that cannot match before code generation. The arm that runs is the same as before.

primitive_decimal_carrier_type becomes a const fn so that the condition can use it.

before after
vortex-array release __text (macOS arm64) 14,012,988 B 13,697,852 B (-315 KB)
vortex-array LLVM IR lines 5,405,422 5,200,767

@robert3005 robert3005 added the changelog/chore A trivial change label Oct 23, 2026
The scaled-down integer to decimal cast selects the carrier as
max(carrier(S), T). The source and target types fix the carrier, but
the dispatch macro compiled the kernel for all six decimal widths in
each (S, T) pair. A const condition now removes the five arms that
cannot match before codegen.

vortex-array release __text: 14,012,988 -> 13,697,852 bytes (-315 KB).
LLVM IR lines: 5,405,422 -> 5,200,767.

Signed-off-by: Robert Kruszewski <robert@spiraldb.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codspeed

codspeed Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Merging this PR will degrade performance by 3.21%

2 warnings, 1 note

⚠️ 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

⚠️ 16 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

ℹ️ 40 benchmarks have no flamegraph

The flamegraph wasn't generated: the symbols of the profiling trace could not be resolved, because no information about the language frames was collected.

See affected benchmarks

⚡ 1 improved benchmark
❌ 4 regressed benchmarks
✅ 2403 untouched benchmarks
⏩ 12 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ CPU Simulation decode_primitives[i64, (1000, 8)] 24.8 µs 37.8 µs -34.35%
❌ Walltime threshold_avx512[80] 2.4 µs 2.8 µs -12.78%
❌ Walltime compare_u8_neon 1.7 µs 1.9 µs -11.61%
❌ Walltime starts_with_avx2[64, VarBin] 53.7 µs 60.6 µs -11.23%
⚡ Walltime mul_u64_nonnull_neon 39.4 µs 20.8 µs +89.11%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing rk/size-decimal-cast-carrier (ec5286e) with develop (8c680f2)2

Open in CodSpeed

Footnotes

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

  2. No successful run was found on develop (c88edde) during the generation of this report, so 8c680f2 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/chore A trivial change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant