move towards BitBuffer/{Mut}View over owned bit buffers#8208
Merged
Conversation
Merging this PR will improve performance by 17.78%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ⚡ | Simulation | chunked_bool_canonical_into[(1000, 10)] |
45.4 µs | 30.3 µs | +49.66% |
| ⚡ | Simulation | chunked_varbinview_into_canonical[(1000, 10)] |
211.8 µs | 176.2 µs | +20.24% |
| ⚡ | Simulation | decompress_rd[f64, (10000, 0.0)] |
140.6 µs | 123.6 µs | +13.74% |
| ⚡ | Simulation | decompress_rd[f64, (10000, 0.01)] |
140.6 µs | 123.6 µs | +13.72% |
| ⚡ | Simulation | decompress_rd[f64, (10000, 0.1)] |
140.9 µs | 124 µs | +13.63% |
| ⚡ | Simulation | chunked_varbinview_canonical_into[(100, 100)] |
309.2 µs | 273.5 µs | +13.05% |
| ⚡ | Simulation | bitwise_not_vortex_buffer_mut[128] |
275.3 ns | 246.1 ns | +11.85% |
| ⚡ | Simulation | extend_from_array_non_zctl_overlapping[(10000, 8)] |
5.3 ms | 4.8 ms | +10.74% |
Tip
Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.
Comparing claude/sweet-ptolemy-bMwms (25d93a3) with develop (f35ef50)
caabf8a to
599ed2b
Compare
…my-bMwms Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk> # Conflicts: # vortex-cuda/src/arrow/canonical.rs
- arrow/canonical.rs:145 still referenced a bare `offset` local that no
longer exists after the destructure was updated to `{ bits, meta }`.
Use `meta.offset()` so the validity buffer export matches the bit offset
that's passed to `export_fixed_size` on the next line.
- canonical.rs:80 passes the `meta` fields to
`BitBuffer::new_with_offset(buffer, len, offset)` in the wrong order
(offset was being passed as len, and vice versa). Swap them.
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
BitBuffer/{Mut}View over owned bit buffers
robert3005
approved these changes
Jun 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces
BitBufferView<'a>andBitBufferMutView<'a>as borrowing analogues to the ownedBitBufferandBitBufferMuttypes. These new types enable zero-copy reading and in-place modification of packed bitsets without cloning the underlyingByteBuffer.This View will replace BitBuffer after the migration.