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

Make all the bulk operations in BitSet (clear(start, end), set(start, end), and flip(start, end)) fast #5

Merged
merged 6 commits into from
Jul 7, 2012

Conversation

mkeesey
Copy link
Contributor

@mkeesey mkeesey commented Jul 7, 2012

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().

Mike Keesey added 6 commits July 4, 2012 16:00
…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.
@dicej dicej merged commit ba1719f into ReadyTalk:master Jul 7, 2012
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>
@dscho dscho mentioned this pull request Nov 6, 2013
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants