Skip to content

Optimize decompression speed by RVV - #275

Open
anthony-zy wants to merge 1 commit into
google:mainfrom
anthony-zy:autovector
Open

anthony-zy wants to merge 1 commit into
google:mainfrom
anthony-zy:autovector

Conversation

@anthony-zy

Copy link
Copy Markdown
Contributor

Summary

Refactors the RISC-V Vector (RVV) acceleration path in the short memcpy helper to mirror the existing AVX implementation. Instead of a generic vsetvl loop, this version performs a fixed 32-byte vector copy (with an optional second 32-byte segment), matching the profile-driven assumption that nearly all copies are short.

This eliminates loop overhead in the hot path and aligns RVV behavior with the well-tuned AVX code path.

Performance

Tested with lzbench on Spacemit(R) X60 (RISC-V, RVV 1.0):

  • Before: 269 MB/s
  • After: 310 MB/s
  • Improvement: +15%

Verification

  • Environment: Spacemit(R) X60 (RISC-V, RVV 1.0)
  • Benchmark tool: lzbench
  • Compiled with -march=rv64gcv
  • Passed all existing Snappy unit tests.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant