Skip to content

Conversation

@alamb
Copy link

@alamb alamb commented Oct 24, 2025

This is a sketch of an alternate API for

Basically, instead of new free functions and traits, it adds two new methods to MutableBuffer that apply the bitwise operations in an optimized fashion

I have not yet ported the tests, but would do so if you like this

It includes the changes in these two PRs

@alamb alamb changed the title Alamb/combined Proposed alternate API for bitwise operations on mutable buffer Oct 24, 2025
@alamb alamb changed the title Proposed alternate API for bitwise operations on mutable buffer Proposed alternate API for bitwise operations on MutableBuffer Oct 24, 2025
assert_eq!(self.len, rhs.len());

mutable_buffer_bin_or(&mut self.buffer, 0, rhs.inner(), rhs.offset(), self.len);
self.buffer.mutable_bitwise_bin_op_helper(
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this illustrates the new API well -- it becomes a method on MutableBuffer itself and then these functions simply call into that method

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant