Move panic case in vortex_expect/bail/ensure to a cold handler - #9903
Conversation
Signed-off-by: Mikhail Kot <mikhail@spiraldb.com>
Merging this PR will regress 1 benchmark
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | WallTime | dict_canonicalize_gt_u8_neon[1000000] |
488.1 µs | 573.3 µs | -14.87% |
| ⚡ | Simulation | slice_vortex_buffer |
6.6 µs | 3.4 µs | +95.9% |
| ⚡ | WallTime | filtered_sink_i64_avx2[OneNullInEight] |
31.3 µs | 21.9 µs | +42.99% |
| ⚡ | WallTime | filtered_sink_i64_avx512[OneNullInEight] |
31.9 µs | 22.8 µs | +40.23% |
| ⚡ | Simulation | runend_decompress_u32 |
241.8 µs | 177 µs | +36.58% |
| ⚡ | Simulation | decode_bool[10000_2_all_false] |
223.8 µs | 175.7 µs | +27.35% |
| ⚡ | Simulation | decode_bool[10000_2_all_true] |
223.2 µs | 175.7 µs | +27.05% |
| ⚡ | Simulation | decode_bool[10000_2_mostly_true] |
230.8 µs | 182.7 µs | +26.35% |
| ⚡ | Simulation | decode_bool[10000_2_mostly_false] |
231.3 µs | 183.3 µs | +26.16% |
| ⚡ | Simulation | decompress[u16, (10000, 4)] |
199 µs | 158.9 µs | +25.22% |
| ⚡ | Simulation | allocate_drop_bytes[0] |
575.7 ns | 466 ns | +23.54% |
| ⚡ | Simulation | decode_bool[10000_2_alternating] |
260.8 µs | 213.5 µs | +22.15% |
| ⚡ | Simulation | decode_bool[10000_10_all_true] |
59.1 µs | 48.4 µs | +22.07% |
| ⚡ | Simulation | decode_bool[10000_10_all_false] |
59.8 µs | 49.2 µs | +21.49% |
| ⚡ | WallTime | filtered_sink_i64_avx2[NineNullsInTen] |
18.2 µs | 14.9 µs | +21.48% |
| ⚡ | Simulation | slice_empty_tight_loop_vortex |
41.2 µs | 34 µs | +21.15% |
| ⚡ | Simulation | new_raw_prim_test_between[i32, 2048] |
77.7 µs | 64.1 µs | +21.11% |
| ⚡ | Simulation | null_count_run_end[(32000, 4, 0.01)] |
433.7 µs | 359.8 µs | +20.54% |
| ⚡ | WallTime | arrow_checked_add_u32_avx2[16384] |
21.3 µs | 17.7 µs | +20.53% |
| ⚡ | Simulation | decode_bool[10000_10_mostly_true] |
61.7 µs | 51.3 µs | +20.4% |
| ... | ... | ... | ... | ... | ... |
ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing myrrc/vortex-panics-cold (b02ec9e) with develop (4af09a9)
Footnotes
-
218 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. ↩
|
Thats a lot of codspeed regressions? Also a load of wins. Want to comment |
Polar Signals Profiling ResultsLatest Run
Previous Runs (2)
Powered by Polar Signals Cloud |
Benchmarks: String Encoding 📖Commits: PR vortex / vortex-file-compressed / ms (0.988x ➖, 0↑ 0↓)
vortex / vortex-file-compressed / % (1.000x ➖, 0↑ 0↓)
|
Benchmarks: PolarSignals Profiling 📖Commits: PR datafusion / vortex-file-compressed / ns (1.002x ➖, 0↑ 0↓)
No file size changes detected. |
Benchmarks: Compression 📖Commits: PR vortex / vortex-file-compressed / ns (0.978x ➖, 0↑ 0↓)
vortex / vortex-file-compressed / bytes (1.000x ➖, 0↑ 0↓)
vortex / vortex-file-compressed / ratio (0.988x ➖, 0↑ 0↓)
vortex / parquet / ns (0.996x ➖, 0↑ 0↓)
vortex / parquet / bytes (1.000x ➖, 0↑ 0↓)
vortex / arrow-ipc / ns (0.968x ➖, 3↑ 0↓)
vortex / arrow-ipc / bytes (1.000x ➖, 0↑ 0↓)
|
Benchmarks: FineWeb NVMe 📖Commits: PR How to read Verdict and Engines
datafusion / vortex-file-compressed / ns (0.996x ➖, 0↑ 0↓)
datafusion / vortex-compact / ns (1.062x ➖, 0↑ 1↓)
datafusion / parquet / ns (1.003x ➖, 0↑ 0↓)
duckdb / vortex-file-compressed / ns (1.066x ➖, 2↑ 3↓)
duckdb / vortex-compact / ns (0.911x ➖, 4↑ 0↓)
duckdb / parquet / ns (1.009x ➖, 0↑ 0↓)
No file size changes detected. |
Benchmarks: TPC-H SF=1 on NVME 📖Commits: PR How to read Verdict and Engines
datafusion / vortex-file-compressed / ns (0.998x ➖, 0↑ 0↓)
datafusion / vortex-compact / ns (1.001x ➖, 0↑ 0↓)
datafusion / parquet / ns (0.999x ➖, 0↑ 0↓)
duckdb / vortex-file-compressed / ns (1.000x ➖, 0↑ 1↓)
duckdb / vortex-compact / ns (1.009x ➖, 0↑ 1↓)
duckdb / parquet / ns (1.018x ➖, 0↑ 0↓)
No file size changes detected. |
Benchmarks: Clickbench Sorted on NVME 📖Commits: PR How to read Verdict and Engines
datafusion / vortex-file-compressed / ns (1.002x ➖, 0↑ 0↓)
datafusion / vortex-compact / ns (0.997x ➖, 0↑ 0↓)
datafusion / parquet / ns (1.008x ➖, 0↑ 0↓)
duckdb / vortex-file-compressed / ns (0.984x ➖, 1↑ 0↓)
duckdb / vortex-compact / ns (0.960x ➖, 2↑ 1↓)
duckdb / parquet / ns (0.985x ➖, 0↑ 0↓)
File Size Changes (200 files changed, -0.0% overall, 104↑ 96↓)
Totals:
|
Benchmarks: FineWeb S3 📖Commits: PR How to read Verdict and Engines
datafusion / vortex-file-compressed / ns (0.868x ➖, 0↑ 0↓)
datafusion / vortex-compact / ns (0.818x ➖, 4↑ 1↓)
datafusion / parquet / ns (0.830x ➖, 1↑ 0↓)
duckdb / vortex-file-compressed / ns (0.986x ➖, 0↑ 1↓)
duckdb / vortex-compact / ns (0.916x ➖, 0↑ 0↓)
duckdb / parquet / ns (0.891x ➖, 0↑ 0↓)
|
Benchmarks: Appian on NVME 📖Commits: PR How to read Verdict and Engines
datafusion / vortex-compact / ns (1.006x ➖, 0↑ 0↓)
datafusion / parquet / ns (0.997x ➖, 0↑ 0↓)
duckdb / vortex-compact / ns (1.009x ➖, 0↑ 0↓)
duckdb / parquet / ns (0.995x ➖, 0↑ 0↓)
No file size changes detected. |
Benchmarks: Statistical and Population Genetics 📖Commits: PR How to read Verdict and Engines
duckdb / vortex-file-compressed / ns (1.004x ➖, 0↑ 0↓)
duckdb / vortex-compact / ns (0.987x ➖, 0↑ 0↓)
duckdb / parquet / ns (1.013x ➖, 0↑ 0↓)
No file size changes detected. |
Benchmarks: Clickbench on NVME 📖Commits: PR How to read Verdict and Engines
datafusion / vortex-file-compressed / ns (1.004x ➖, 0↑ 0↓)
datafusion / vortex-compact / ns (1.003x ➖, 0↑ 1↓)
datafusion / parquet / ns (1.022x ➖, 0↑ 1↓)
duckdb / vortex-file-compressed / ns (1.000x ➖, 0↑ 2↓)
duckdb / vortex-compact / ns (0.986x ➖, 2↑ 1↓)
duckdb / parquet / ns (1.008x ➖, 0↑ 2↓)
No file size changes detected. |
Benchmarks: TPC-DS SF=1 on NVME 📖Commits: PR How to read Verdict and Engines
datafusion / vortex-file-compressed / ns (1.002x ➖, 0↑ 0↓)
datafusion / vortex-compact / ns (0.994x ➖, 1↑ 1↓)
datafusion / parquet / ns (0.999x ➖, 0↑ 0↓)
duckdb / vortex-file-compressed / ns (1.003x ➖, 0↑ 3↓)
duckdb / vortex-compact / ns (1.004x ➖, 1↑ 4↓)
duckdb / parquet / ns (1.001x ➖, 2↑ 1↓)
No file size changes detected. |
Benchmarks: TPC-H SF=10 on NVME 📖Commits: PR How to read Verdict and Engines
datafusion / vortex-file-compressed / ns (0.994x ➖, 0↑ 0↓)
datafusion / vortex-compact / ns (0.993x ➖, 0↑ 0↓)
datafusion / parquet / ns (1.007x ➖, 0↑ 0↓)
duckdb / vortex-file-compressed / ns (0.983x ➖, 0↑ 0↓)
duckdb / vortex-compact / ns (0.998x ➖, 0↑ 0↓)
duckdb / parquet / ns (0.997x ➖, 0↑ 0↓)
No file size changes detected. |
Benchmarks: TPC-H SF=1 on S3 📖Commits: PR How to read Verdict and Engines
datafusion / vortex-file-compressed / ns (0.934x ➖, 1↑ 1↓)
datafusion / vortex-compact / ns (1.055x ➖, 1↑ 3↓)
datafusion / parquet / ns (1.004x ➖, 0↑ 0↓)
duckdb / vortex-file-compressed / ns (0.930x ➖, 0↑ 0↓)
duckdb / vortex-compact / ns (1.146x ➖, 0↑ 4↓)
duckdb / parquet / ns (1.051x ➖, 0↑ 1↓)
|
Benchmarks: TPC-H SF=10 on S3 📖Commits: PR How to read Verdict and Engines
datafusion / vortex-compact / ns (1.038x ➖, 0↑ 4↓)
datafusion / parquet / ns (0.932x ➖, 1↑ 1↓)
duckdb / vortex-compact / ns (1.145x ➖, 0↑ 2↓)
duckdb / parquet / ns (1.013x ➖, 0↑ 0↓)
|
Benchmarks: Random Access 📖Commits: PR How to read Verdict and Engines
vortex / arrow-ipc / ns (0.958x ➖, 2↑ 0↓)
random-access / vortex-file-compressed / ns (0.995x ➖, 0↑ 0↓)
random-access / parquet / ns (0.961x ➖, 3↑ 0↓)
random-access / lance / ns (0.998x ➖, 0↑ 0↓)
|
Signed-off-by: Mikhail Kot <mikhail@spiraldb.com>
|
@joseph-isaacs Regressions were due to fmt_err/panic_err still being invoked on call site, so fsl_* and allocate_* functions stopped being vectorized. |
|
I've moved this out, now we only have wins |
Continuation of #9903. Buffer/BufferMut are used everywhere, so inlining their panic handlers both increases code size and degrades performance. Signed-off-by: Mikhail Kot <mikhail@spiraldb.com>
vortex_ensure/bail/expect macros are inlined. This means caller function
gets a branch with creating the backtrace and throwing a panic. This in turn
makes LLVM inliner see the function as not inline-eligible.
Moving panic handler to a separate cold and inline-never function makes sure
we inline the happy part only. As a result, we generate less unwind tables.