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

Don't use goroutines in SetValue #404

Merged
merged 1 commit into from
Oct 4, 2023
Merged

Conversation

Marreck
Copy link
Contributor

@Marreck Marreck commented Oct 4, 2023

Removed the use of goroutines in SetValue.

My guess is that these made sense when bitmap adding was less efficient. Now they add unnecessary overhead.

Also added a check to make sure bits in their respective bitmaps are only unset for those where columnID is in the existence bitmap.

With goroutines:

goos: windows
goarch: amd64
pkg: github.com/RoaringBitmap/roaring/BitSliceIndexing
cpu: 12th Gen Intel(R) Core(TM) i5-12600K
BenchmarkSetRoaring
BenchmarkSetRoaring-16            157240              8431 ns/op
PASS

Without goroutines:

goos: windows
goarch: amd64
pkg: github.com/RoaringBitmap/roaring/BitSliceIndexing
cpu: 12th Gen Intel(R) Core(TM) i5-12600K
BenchmarkSetRoaring
BenchmarkSetRoaring-16           2262295               498.2 ns/op
PASS

@lemire
Copy link
Member

lemire commented Oct 4, 2023

Sounds good. Let us run the tests.

@lemire
Copy link
Member

lemire commented Oct 4, 2023

There is a failing test, but it is not related to this PR, I expect.

Merging.

@lemire lemire merged commit 36efcdc into RoaringBitmap:master Oct 4, 2023
5 of 9 checks passed
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