-
-
Notifications
You must be signed in to change notification settings - Fork 180
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 PreviousSet and PreviousClear functions #178
Merged
Merged
Conversation
This file contains 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
These are analogous to NextClear and NextSet but scan backwards. The current implementations are naive.
On an Apple M2 they produces these results: BenchmarkBitsetOps/NextSet-8 2537938 470.0 ns/op BenchmarkBitsetOps/NextClear-8 2564336 468.1 ns/op BenchmarkBitsetOps/PreviousSet-8 19930 59924 ns/op BenchmarkBitsetOps/PreviousClear-8 19912 61002 ns/op A future commit should improve upon this.
On an Apple M2 our benchmark produces these results: BenchmarkBitsetOps/NextSet-8 2552749 468.1 ns/op BenchmarkBitsetOps/NextClear-8 2571921 466.9 ns/op BenchmarkBitsetOps/PreviousSet-8 1760882 682.4 ns/op BenchmarkBitsetOps/PreviousClear-8 1763605 680.0 ns/op Which greatly improves on the prior results of BenchmarkBitsetOps/PreviousSet-8 19930 59924 ns/op BenchmarkBitsetOps/PreviousClear-8 19912 61002 ns/op
The missing coverage was probing multiple words and failing to find anything.
lemire
reviewed
Nov 15, 2024
lemire
reviewed
Nov 15, 2024
@lukesandberg How did you verify that the bound check elimination trick worked? |
Running tests. |
…PreviousClear and PreviousSet There is no impact on performance, just a clean up.
Removed the bounds check elimination since it was non functional. |
Running tests. We shall merge soon after they go green. |
ping |
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.
Add PreviousSet and PreviousClear functions
These are analogous to NextSet and NextClear but probing in the opposite direction.
Fixes #86