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

improve performance of AndNot between array and run containers #416

Merged
merged 1 commit into from
Mar 22, 2024

Conversation

neena
Copy link
Contributor

@neena neena commented Mar 20, 2024

Improve the performance of in-place AndNot between array and run containers. The current approach converts both to bitmaps, performs the AndNot, and then returns the result.

Instead, this approach scans the list of runs in the run container, and calls iremoveRange on each one in the array container.

Before:

BenchmarkAndNot/inPlace=true/left=array/right=run-10        	  121395	     11533 ns/op

After:

BenchmarkAndNot/inPlace=true/left=array/right=run-10       	 1308555	      2369 ns/op

@lemire lemire mentioned this pull request Mar 20, 2024
@lemire
Copy link
Member

lemire commented Mar 20, 2024

Tell me what you think of #417

I think that 417 might be faster.

@lemire lemire merged commit 5c4c97c into RoaringBitmap:master Mar 22, 2024
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