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

Clean up new bloom filter implementation #244

Merged
merged 1 commit into from Mar 23, 2021

Conversation

dbaggerman
Copy link
Collaborator

Cleaned up to use math/rand to distribute the numbers rather than handrolled maths.

It seems like the better number distribution leads to a slightly more efficient bloom filter (as I suspected). It's not a huge improvement, but 2-3% faster is still a win.

Benchmark #1: ./scc-master ../../torvalds/linux
  Time (mean ± σ):     699.7 ms ±   7.6 ms    [User: 9.277 s, System: 0.908 s]
  Range (min … max):   683.8 ms … 716.0 ms    50 runs

Benchmark #2: ./scc-bloom2 ../../torvalds/linux
  Time (mean ± σ):     678.1 ms ±   9.5 ms    [User: 8.846 s, System: 0.929 s]
  Range (min … max):   653.0 ms … 698.4 ms    50 runs

Summary
  './scc-bloom2 ../../torvalds/linux' ran
    1.03 ± 0.02 times faster than './scc-master ../../torvalds/linux'

@dbaggerman dbaggerman requested a review from boyter March 22, 2021 23:21
@dbaggerman dbaggerman merged commit d98709e into boyter:master Mar 23, 2021
@dbaggerman dbaggerman deleted the bloom2 branch March 23, 2021 03:01
@boyter boyter added this to Done in 3.1.0 Apr 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
3.1.0
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants