perf: test vectorized varint algo#811
Open
anthony-swirldslabs wants to merge 1 commit intomainfrom
Open
Conversation
Signed-off-by: Anthony Petrov <anthony@swirldslabs.com>
Integration Test Report 420 files +1 420 suites +1 20m 13s ⏱️ - 7m 41s Results for commit 8594095. ± Comparison against base commit b629795. This pull request removes 3 and adds 5 tests. Note that renamed tests count towards both. |
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.
Description:
Introducing a vectorized LEB128 algo for reading varint values that uses a fully unrolled loop and employs a "negative limit" trick to avoid explicit limit checks. It's 4x times faster for 1-byte varints than our current implementation. It's consistently and equally fast for 2, 3, 4, and 5-byte varints as well: 2.4x faster for 2 byte and 2x-9x faster for longer encodings.
A
varint.mdis added to describe the algorithm, so that we don't have to repeat the lengthy doc in every implementation. The core PBJ implementations will be replaced in a separate PR in the future.Also, a unit test is added to verify the correctness of the algorithm.
Benchmark results:
Related issue(s):
Fixes #810
Notes for reviewer:
All tests should pass.
Checklist