perf: add hex-simd benchmarks and optimize SIMD implementations#35
Closed
zerosnacks wants to merge 1 commit intoDaniPopes:masterfrom
Closed
perf: add hex-simd benchmarks and optimize SIMD implementations#35zerosnacks wants to merge 1 commit intoDaniPopes:masterfrom
zerosnacks wants to merge 1 commit intoDaniPopes:masterfrom
Conversation
Adds hex-simd to benchmarks (closes DaniPopes#25) and significantly improves performance of check and encode operations. Performance optimizations: - Replace check algorithm with signed overflow trick (3x faster) - Add AVX2 check path processing 32 bytes per iteration - Double encode throughput (32→64 bytes/iter) via new AVX2 path Testing: - Add 13 new edge case tests covering SIMD boundaries and all byte values References: - http://0x80.pl/notesen/2022-01-17-validating-hex-parse.html Co-authored-by: Amp <amp@ampcode.com> Amp-Thread-ID: https://ampcode.com/threads/T-019bf1ee-2643-76af-8139-99d7c2c02486
36017f8 to
64f908a
Compare
This was referenced Feb 25, 2026
Owner
|
Split into #38 (benchmarks) and #39 (optimizations). Thanks @zerosnacks! |
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.
Adds hex-simd to benchmarks (closes #25) and optimizes SIMD implementations to match/exceed hex-simd performance.
Benchmark results
CPU: Intel Core i9-13900K (x86_64, AVX2)
check
encode
encode_to_slice
decode
decode_to_slice
format
Changes