Avoid allocating Vec of chunks just to copy it in ChunkedArray constructor - #9922
robert3005 wants to merge 2 commits into
Conversation
…uctor Signed-off-by: Robert Kruszewski <github@robertk.io>
Signed-off-by: Robert Kruszewski <github@robertk.io>
Merging this PR will regress 4 benchmarks
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | WallTime | mul_u64_nonnull_neon |
15.3 µs | 21.5 µs | -28.65% |
| ❌ | Simulation | decompress[u64, (4000, 1024)] |
72.2 µs | 86.7 µs | -16.68% |
| ❌ | WallTime | mul_i64_nonnull_neon |
17.3 µs | 20.6 µs | -16.26% |
| ❌ | WallTime | multiply_shapes_neon[(16384, PerRowPerRow)] |
17.3 µs | 20.6 µs | -16.06% |
| ⚡ | WallTime | filtered_owned_i64_avx2[OneNullInEight] |
25.7 µs | 22.1 µs | +16.23% |
| ⚡ | WallTime | dict_canonicalize_gt_u8_avx512[16000000] |
7.7 ms | 6.8 ms | +14.32% |
| ⚡ | Simulation | canonicalize[256, 32] |
50.9 µs | 44.7 µs | +13.93% |
| ⚡ | Simulation | canonicalize[1024, 32] |
50.7 µs | 44.5 µs | +13.73% |
| ⚡ | Simulation | canonicalize[16, 32] |
52.5 µs | 46.4 µs | +13.18% |
| ⚡ | Simulation | allocate_drop_vortex_minimal_alignment[0] |
1,077.2 ns | 968.9 ns | +11.18% |
| ⚡ | Simulation | allocate_drop_vortex[0] |
1.1 µs | 1 µs | +10.57% |
| ⚡ | Simulation | decompress[u64, (4000, 4)] |
140 µs | 126.7 µs | +10.53% |
| ⚡ | Simulation | allocate_drop_bytes[0] |
581.3 ns | 527.2 ns | +10.27% |
| ⚡ | Simulation | canonicalize[1024, 8] |
38.1 µs | 34.5 µs | +10.26% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing rk/new_unchecked (d5424e5) with develop (90bee5f)
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. ↩
We fix cases where we were passing a vec that was immediately deallocated by
passing an impl IntoIterator where possible
For other cases we add a new constructor that leverages process_results in the
caller and a size hint to avoid materialising list of items just to check the
error case