aboutsummaryrefslogtreecommitdiff
path: root/CONTRIBUTING.md
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2018-05-18 18:39:46 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2018-05-18 18:46:35 +0200
commitd9ebb63919fb311ace0ae977e3183ccb80ed7d3c (patch)
treeb70e82a08a22fb810bf6879c31c8d768a1251512 /CONTRIBUTING.md
parent1a8b12c69c0158e6440c53a34b03a32fc0580878 (diff)
parent9aac9f90d5e56752cc6cbfac48063ad29a01143c (diff)
Merge #13176: Improve CRollingBloomFilter performance: replace modulus with FastMod
9aac9f90d5e56752cc6cbfac48063ad29a01143c replace modulus with FastMod (Martin Ankerl) Pull request description: Not sure if this is optimization is necessary, but anyway I have some spare time so here it is. This replaces the slow modulo operation with a much faster 64bit multiplication & shift. This works when the hash is uniformly distributed between 0 and 2^32-1. This speeds up the benchmark by a factor of about 1.3: ``` RollingBloom, 5, 1500000, 3.73733, 4.97569e-07, 4.99002e-07, 4.98372e-07 # before RollingBloom, 5, 1500000, 2.86842, 3.81630e-07, 3.83730e-07, 3.82473e-07 # FastMod ``` Be aware that this changes the internal data of the filter, so this should probably not be used for CBloomFilter because of interoperability problems. Tree-SHA512: 04104f3fb09f56c9d14458a6aad919aeb0a5af944e8ee6a31f00e93c753e22004648c1cd65bf36752b6addec528d19fb665c27b955ce1666a85a928e17afa47a
Diffstat (limited to 'CONTRIBUTING.md')
0 files changed, 0 insertions, 0 deletions