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

Refine some functions #105

Merged
merged 1 commit into from
Jul 21, 2022
Merged

Refine some functions #105

merged 1 commit into from
Jul 21, 2022

Conversation

SimFG
Copy link
Contributor

@SimFG SimFG commented Jul 21, 2022

  1. Extract wordsIndex to calculate the index of words in a uint64, and use it to replace i % wordSize.
    image
  2. In addition, change the InsertAt function to reduce one bit operation.
    image

…nd use it to replace `i % wordSize`. In addition, change the `InsertAt` function to reduce one bit operation.
@lemire
Copy link
Member

lemire commented Jul 21, 2022

Looks sensible to me. We hope that Go will inline the function !!!

@SimFG
Copy link
Contributor Author

SimFG commented Jul 21, 2022

@lemire >v<

@lemire lemire merged commit 510f5c6 into bits-and-blooms:master Jul 21, 2022
@lemire
Copy link
Member

lemire commented Jul 21, 2022

Merged.

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