feat(buffer): add allocator-backed storage - #9668
Conversation
0f5a07e to
4911c36
Compare
Merging this PR will regress 20 benchmarks
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Simulation | runend_compress_u32 |
398.3 µs | 625.3 µs | -36.3% |
| ❌ | Simulation | non_nullable[32] |
262.7 µs | 398.5 µs | -34.08% |
| ❌ | Simulation | execute_scalar_struct_simple |
111.5 µs | 167.4 µs | -33.41% |
| ❌ | Simulation | non_nullable[2] |
365.4 µs | 537.6 µs | -32.04% |
| ❌ | Simulation | decompress[u32, (4000, 1024)] |
55.7 µs | 79.1 µs | -29.61% |
| ❌ | Simulation | nullable[2] |
365.6 µs | 499.3 µs | -26.78% |
| ❌ | Simulation | nullable[256] |
259.3 µs | 354.2 µs | -26.78% |
| ❌ | Simulation | nullable[32] |
264.3 µs | 360.5 µs | -26.69% |
| ❌ | WallTime | mul_u64_nonnull_neon |
15.1 µs | 20.3 µs | -25.69% |
| ❌ | Simulation | decompress[u8, (1000, 4)] |
47 µs | 63 µs | -25.41% |
| ❌ | Simulation | non_nullable[256] |
258 µs | 341 µs | -24.34% |
| ❌ | WallTime | lanezip_checked_add_u32_avx512[16384] |
3.5 µs | 4.5 µs | -22.45% |
| ❌ | Simulation | decode_varbin[(1000, 2)] |
52.5 µs | 66.2 µs | -20.77% |
| ❌ | WallTime | mul_i64_nonnull_neon |
17.1 µs | 20.7 µs | -17.64% |
| ❌ | WallTime | arrow_checked_add_u32_avx2[16384] |
17.7 µs | 21.4 µs | -17.03% |
| ❌ | WallTime | multiply_shapes_neon[(16384, PerRowPerRow)] |
17.3 µs | 20.7 µs | -16.47% |
| ❌ | Simulation | compress[(4000, 4)] |
194.4 µs | 232.2 µs | -16.25% |
| ❌ | Simulation | compress[(1000, 4)] |
118.8 µs | 140 µs | -15.13% |
| ❌ | Simulation | compress[(10000, 4)] |
496 µs | 575.4 µs | -13.8% |
| ❌ | Simulation | push_n_vortex_buffer[u32, 128] |
2.8 µs | 3.1 µs | -10.96% |
| ... | ... | ... | ... | ... | ... |
ℹ️ 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 ngates/buffer-allocator-core (719ac2e) with develop (01f147a)
Footnotes
-
64 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. ↩
-
5 benchmarks were run, but are now archived. If they were deleted in another branch, consider rebasing to remove them from the report. Instead if they were added back, click here to restore them. ↩
85d55a8 to
94c47cb
Compare
| pub(crate) length: usize, | ||
| pub(crate) alignment: Alignment, | ||
| pub(crate) _marker: PhantomData<T>, | ||
| pub(crate) backing: Arc<BufferBacking>, |
There was a problem hiding this comment.
since I ran through experiments with this in the past - the Arc overhead here for small length dominates your allocations. tokio::Bytes plays game with pointer masking and stores AtomicPtr<()> and another pointer to avoid synchronistaion for trivial cases
There was a problem hiding this comment.
Yep... that's causing the slow downs I believe
15a66c6 to
6331364
Compare
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
This reverts commit 1186945. Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
This reverts commit b553828. Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
719ac2e to
bb83f1e
Compare
Summary
Add allocator-backed storage to
vortex-buffer.Design: vortex-data/rfcs#65
Changes
allocator_api2for owned buffers.bytes/Arrow interop.API Changes
Owned buffers no longer use
bytes::Bytesas storage. Thebytescrate remains for interop.