Merged
Conversation
Member
dagurval
commented
Jan 15, 2018
- Improve rolling bloom filter performance - Improve rolling bloom filter performance and benchmark bitcoin/bitcoin#7934
- trivial: fix bloom filter init to isEmpty = true - trivial: fix bloom filter init to isEmpty = true bitcoin/bitcoin#9060
- Bloomfilter: parameter variables made constant - Bloomfilter: parameter variables made constant bitcoin/bitcoin#9750
- Fix msvc compiler error C4146 (minus operator applied to unsigned type) - Fix msvc compiler error C4146 (minus operator applied to unsigned type) bitcoin/bitcoin#9916
Member
Author
|
If #298 is merged first, then I can also cherry pick a benchmark commit to this PR |
Member
|
Ok reviewing #298 first. |
This patch changes the implementation from one that stores 16 2-bit integers in one uint32_t's, to one that stores the first bit of 64 2-bit integers in one uint64_t and the second bit in another. This allows for 450x faster refreshing and 2.2x faster average speed.
Fixes newly initialized bloom filters being constructed with isEmpty(false), which still works but loses the possible speedup when checking for key membership in an empty filter.
On msvc14, the compiler error C4146 (unary minus operator applied to unsigned type, result still unsigned) had been occured. Use '0 - x' styled formula instead of '-x' so as to fix the error.
…ed type) On msvc14, int literal '-2147483648' is invalid, because '2147483648' is unsigned type and cant't apply minus operator to unsigned type. To define the int literal correctly, use '-2147483647 - 1' formula that is also used to define INT_MIN in limits.h.
Member
Author
|
Rebased and added benchmark |
Member
|
dgenr8
approved these changes
Jan 18, 2018
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.