Repository navigation
move Buffer/BufferMut panic helpers into separate functions - #9927
Conversation
Signed-off-by: Mikhail Kot <mikhail@spiraldb.com>
Merging this PR will regress 4 benchmarks
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | WallTime | dict_canonicalize_gt_u8_avx512[16000000] |
6.8 ms | 11.3 ms | -39.92% |
| ❌ | WallTime | arrow_checked_add_u32_neon[16384] |
12.9 µs | 20.3 µs | -36.68% |
| ❌ | Simulation | decompress[u64, (4000, 1024)] |
72.1 µs | 86.7 µs | -16.86% |
| ❌ | WallTime | dict_canonicalize_gt_u8_avx512[1000000] |
419.7 µs | 471.5 µs | -11% |
| ⚡ | Simulation | slice_empty_tight_loop_vortex |
37.5 µs | 9.2 µs | ×4.1 |
| ⚡ | WallTime | mul_u64_nonnull_neon |
20.5 µs | 15.6 µs | +31.79% |
| ⚡ | Simulation | slice_tight_loop_vortex[65536] |
56.1 µs | 45.8 µs | +22.62% |
| ⚡ | Simulation | allocate_drop_bytes[0] |
635.5 ns | 527.2 ns | +20.55% |
| ⚡ | WallTime | filtered_sink_i64_avx2[OneNullInEight] |
26.4 µs | 21.9 µs | +20.36% |
| ⚡ | WallTime | multiply_shapes_neon[(16384, PerRowPerRow)] |
20.1 µs | 17.4 µs | +15.38% |
| ⚡ | WallTime | mul_i64_nonnull_neon |
20.1 µs | 17.4 µs | +15.3% |
| ⚡ | WallTime | words_gather_scalar_avx2[65536] |
9.4 µs | 8.2 µs | +13.74% |
| ⚡ | WallTime | filtered_sink_i64_neon[NineNullsInTen] |
19.6 µs | 17.4 µs | +12.93% |
| ⚡ | WallTime | mul_u32_nonnull_avx512 |
6.3 µs | 5.6 µs | +11.51% |
| ⚡ | Simulation | slice_vortex_buffer |
3.4 µs | 3.1 µs | +11.3% |
| ⚡ | Simulation | decompress[u64, (4000, 4)] |
140.2 µs | 126.7 µs | +10.6% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing myrrc/buffer-cold-helpers (6edcb0f) with develop (48985d5)
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. ↩
|
|
|
dict_canonicalize_gt_u8_avx512[16000000] is very instable in CI, also unrelated |
|
One downside here is that the backtrace location will be inside the util function instead of the original callsite. |
|
Yeah, this is +1 frame, but I think it's fine since our messages point to the right place anyway |
|
I think you can fix the frame problem that Adam mentioned by adding |
|
@robert3005 We have a chain of helper -> vortex_panic! -> __private::panic. The correct way of propagating this to caller would be to track_caller on every of them, but this adds to function's costs and inlining works worse. I still think the messages are informative enough for us (or user) to determine where the error happened. |
|
Also, on vortex_expect! this won't work because then vortex_expect should be a track_caller, but it's not |
robert3005
left a comment
There was a problem hiding this comment.
ok, we can clean the call sites in the future
Continuation of #9903. Buffer/BufferMut are used everywhere, so inlining their panic handlers both increases code size and degrades performance.