-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
distinct: avoid floating-point computation in the Add step
Instead of tracking the current eviction probability as floating-point, take advantage of the fact that it always has the form 1/2^k and use an integer threshold instead. This lets us avoid floating-point computations both for RNG sampling and for updates. While here, make the Count method return unsigned instead of signed, since the value will never be negative (even in a case of undercount).
- Loading branch information
1 parent
ed06c2c
commit 192e85d
Showing
2 changed files
with
31 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters