snappy: optimize UnalignedCopy64 and IncrementalCopy for RISC-V#3360
Open
Felix-Gong wants to merge 1 commit into
Open
snappy: optimize UnalignedCopy64 and IncrementalCopy for RISC-V#3360Felix-Gong wants to merge 1 commit into
Felix-Gong wants to merge 1 commit into
Conversation
c9dbd91 to
25a5434
Compare
Use RISC-V inline assembly (ld/sd) for 8-byte copy operations instead of generic macro-based implementation. Changes: - UnalignedCopy64: direct ld/sd pair for 8-byte copy - IncrementalCopy: 8-byte bulk copies when source/dest don't overlap Performance improvement (direct function benchmark): - Decompress compressible-256K: 728 MB/s -> 2205 MB/s (+203%) - Decompress zeros-256K: 543 MB/s -> 1462 MB/s (+169%) Tests: brpc_snappy_compress_unittest passed (7/7) Signed-off-by: Felix-Gong <gongxiaofei24@iscas.ac.cn>
25a5434 to
83cd75a
Compare
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.
Summary
UnalignedCopy64()with directld/sdinline assembly for 8-byte copyIncrementalCopy()with 8-byte bulk copies when source/dest don't overlapPerformance Improvement (direct function benchmark)
Changes
src/butil/third_party/snappy/snappy-stubs-internal.h: +11 linessrc/butil/third_party/snappy/snappy.cc: +24 linesTest Plan