-
Notifications
You must be signed in to change notification settings - Fork 172
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
Make all the bulk operations in BitSet (clear(start, end), set(start, end), and flip(start, end)) fast #5
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
…propriate mask to each partition instead of setting each bit individually.
…for start and end values into an iterator. This is to use one code path for several bulk-modification operations like flip(start, end) and set(start, end).
…n bulk operations - now just return the predefined MASK which has all the bits set when requesting that all the bits be set.
…peration to run faster instead of adding each element individually.
dscho
added a commit
to dscho/avian
that referenced
this pull request
Nov 5, 2013
... for proper statistics (I thought I was ReadyTalk#5 contributor at the moment, but I am only ReadyTalk#6). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho
added a commit
to dscho/avian
that referenced
this pull request
Nov 5, 2013
... for proper statistics (I thought I was ReadyTalk#5 contributor at the moment, but I am only ReadyTalk#6). WIP: still need to find Stan, frustaci and unknown. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho
added a commit
to dscho/avian
that referenced
this pull request
Nov 6, 2013
... for proper statistics (I thought I was ReadyTalk#5 contributor at the moment, but I am only ReadyTalk#6). WIP: still need to find Stan and frustaci. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho
added a commit
to dscho/avian
that referenced
this pull request
Nov 6, 2013
... for proper statistics (I thought I was ReadyTalk#5 contributor at the moment, but I am only ReadyTalk#6). WIP: still need to find Stan. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho
added a commit
to dscho/avian
that referenced
this pull request
Nov 6, 2013
... for proper statistics (I thought I was ReadyTalk#5 contributor at the time I started the mailmap, but I was only ReadyTalk#6). Unfortunately, I could not find the full name of Stan <goo.in.my.shoes@gmail.com> for proper credit. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Merged
dicej
pushed a commit
to dicej/avian
that referenced
this pull request
Apr 21, 2014
... for proper statistics (I thought I was ReadyTalk#5 contributor at the time I started the mailmap, but I was only ReadyTalk#6). Unfortunately, I could not find the full name of Stan <goo.in.my.shoes@gmail.com> for proper credit. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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.
Previously, when clearing or setting more than one value we would loop through and modify each bit individually. Instead, we now apply operations on a partition-by-partition basis with up to 64 bits being operated on at a time. This runs about 4000x faster when modifying 1,000,000 elements on my core i5 laptop.
This pull request also fixes a subtle bug I had when generating the mask for a 64 bit modification operation which exists in the current code with flip().