add simd for faster magic number searches#72
Open
thomasjungblut wants to merge 2 commits intomainfrom
Open
Conversation
0da2e2d to
c1fc63c
Compare
This implements SIMD based vectorized magic number search with SSE4.2, AVX2 and AVX512. Signed-off-by: Thomas Jungblut <[email protected]>
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.
That PR adds a magic number search based on AVX2. This reduces the sstable disk index search time from:
to
Not an insane improvement, but I think we can use that to very quickly read the recordio file to determine the index offsets. Which in turn allows to binary search/map lookup without additional seeking.
The SSE4.2 version can read 10-12gb/s to find the magic numbers (up from 3gb/s with simple looping), so this allows us to compute the lookup table very quickly.