Skip to content

Remove BitBuffer::into_mut and require callers to handle failure to acquire unique ownership#7136

Merged
robert3005 merged 4 commits into
developfrom
rk/bitbufferintomut
Mar 24, 2026
Merged

Remove BitBuffer::into_mut and require callers to handle failure to acquire unique ownership#7136
robert3005 merged 4 commits into
developfrom
rk/bitbufferintomut

Conversation

@robert3005

Copy link
Copy Markdown
Contributor

BitBuffer::into_mut is an escape hatch that will make the callers copy the whole
buffer while they can implement better logic by fusing their buffer operation
with the copy

Signed-off-by: Robert Kruszewski github@robertk.io

…cquire unique ownership

Signed-off-by: Robert Kruszewski <github@robertk.io>
Signed-off-by: Robert Kruszewski <github@robertk.io>
@codspeed-hq

codspeed-hq Bot commented Mar 24, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 11.88%

⚡ 2 improved benchmarks
✅ 1014 untouched benchmarks
⏩ 1522 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation bitwise_not_vortex_buffer[1024] 4.5 µs 4 µs +11.88%
Simulation bitwise_not_vortex_buffer[2048] 4.6 µs 4.2 µs +10.07%

Comparing rk/bitbufferintomut (c960faf) with develop (f03a0c7)

Open in CodSpeed

Footnotes

  1. 1522 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.

Signed-off-by: Robert Kruszewski <github@robertk.io>
Signed-off-by: Robert Kruszewski <github@robertk.io>
@robert3005 robert3005 enabled auto-merge (squash) March 24, 2026 14:00
@robert3005 robert3005 added the changelog/break A breaking API change label Mar 24, 2026
@robert3005 robert3005 merged commit 04776cc into develop Mar 24, 2026
110 of 112 checks passed
@robert3005 robert3005 deleted the rk/bitbufferintomut branch March 24, 2026 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/break A breaking API change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants