bloom
bloom copied to clipboard
bloom: Improve the `TestAndAdd` function.
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.
@lemire Help me review this pull request :>
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.