Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add in-place shift operations to mutable.BitSet #57

Merged
merged 1 commit into from
Sep 26, 2019

Conversation

linasm
Copy link
Contributor

@linasm linasm commented Sep 24, 2019

Shift operations that mutate the contents of mutable.BitSet: <<= and >>=.
This complements the previously submitted #43 (which implemented << and >>).

@linasm linasm changed the title Add in-place shift operations to mutable.BitSet [WIP] Add in-place shift operations to mutable.BitSet Sep 25, 2019
@linasm
Copy link
Contributor Author

linasm commented Sep 25, 2019

I've realized I should have used System.arrayCopy for whole-word shifts (less code, better performance). Will update soon.

@linasm linasm force-pushed the mutable-bit-set-shifts-in-place branch from f48626b to e51ad97 Compare September 25, 2019 19:17
@linasm
Copy link
Contributor Author

linasm commented Sep 25, 2019

Replaced while loops with System.arrayCopy for whole-word shifts. No big deal since thats just 1/64 of use cases, but still, less code is nice.

@linasm linasm changed the title [WIP] Add in-place shift operations to mutable.BitSet Add in-place shift operations to mutable.BitSet Sep 26, 2019
@linasm
Copy link
Contributor Author

linasm commented Sep 26, 2019

Removed the [WIP] marker. @julienrf

@julienrf
Copy link
Collaborator

Thanks @linasm. I should be able to review it at the beginning of October.

@julienrf julienrf merged commit 0a1df6b into scala:master Sep 26, 2019
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.

None yet

2 participants