bloom icon indicating copy to clipboard operation
bloom copied to clipboard

bloom: Improve the `TestAndAdd` function.

Open SimFG opened this issue 3 years ago • 2 comments

For the TestAndAdd function, when the f.b.Test(l) gets the true result, executing the f.b.Set(l) and not are same. So only getting false to execute f.b.Set(l) will decrease one step. Changing it will find the TestAndAdd function is same as the TestOrAdd.

SimFG avatar Aug 17 '22 02:08 SimFG

@lemire Help me review this pull request :>

SimFG avatar Aug 18 '22 06:08 SimFG

I would want someone who relies on these functions to comment before I merge. It appears that you are changing the semantics... not something I would do without understanding what effect it would have on running production code.

lemire avatar Aug 18 '22 15:08 lemire