Avatar for the vortex-data user
vortex-data
vortex
BlogDocsChangelog

Performance History

Latest Results

perf(array): hoist decimal same-scale cast plan (#8932) ## Summary - Evaluate the `SameScale` cast plan once for each array. - Use a direct closure for each value in a same-scale cast. - Use `cast_decimal_buffer` for dense, null, and masked output buffers. - Keep the existing operation for all other cast plans. ## Problem The previous code called `DecimalCastPlan::cast` for each value. That function matched the cast plan for each value. The benchmark profile uses 16 code-generation units and no LTO. An unrelated source addition changed the LLVM output for this function. The nullable copy benchmark increased from approximately 65 µs to 99 µs. Samply showed the same hot call path in both binaries: ```text try_map_masked_into -> DecimalCastPlan::cast ``` The slow binary used a larger function and more stack loads and stores. The new code moves the common plan match outside the value loop. This makes the loop independent of that match. ## Benchmarks Command: ```console cargo bench -p vortex-array --bench cast_decimal -- --sample-count 100 --min-time 3 --max-time 6 --color never ``` | benchmark | develop median | this PR median | change | |---|---:|---:|---:| | `copy_non_nullable[65536]` | 70.10 µs | 41.18 µs | -41.3% | | `copy_nullable[65536]` | 65.11 µs | 56.44 µs | -13.3% | | `in_place_non_nullable[65536]` | 590.5 ns | 610.7 ns | +20.2 ns | | `in_place_nullable[65536]` | 680.5 ns | 690.7 ns | +10.2 ns | The in-place cases do not use the changed buffer path. Their differences are 10 ns and 20 ns. ## Verification - `cargo nextest run -p vortex-array -E 'test(/arrays::decimal::compute::cast::tests/)'` — 23 passed - `cargo clippy --all-targets --all-features` - `cargo +nightly fmt --all --check` ## AI assistance This PR was prepared with OpenAI Codex. The human author reviewed the code, benchmark results, profile data, and test results. Signed-off-by: 蔡略 <cailue@apache.org>
develop
5 hours ago
Merge branch 'develop' into perf/hoist-decimal-same-scale-cast
ClSlaid:perf/hoist-decimal-same-scale-cast
6 hours ago

Latest Branches

CodSpeed Performance Gauge
+59%
perf(array): hoist decimal same-scale cast plan#8932
6 hours ago
0701551
ClSlaid:perf/hoist-decimal-same-scale-cast
CodSpeed Performance Gauge
+12%
Unify numeric compute kernels with vortex-compute iteration functions#8939
8 hours ago
950cf30
rk/unifydecimal
CodSpeed Performance Gauge
0%
8 hours ago
3c9fce8
rk/deprecate-arrow-arrays
© 2026 CodSpeed Technology
Home Terms Privacy Docs