feat: implement RISC-V Vector Extension (RVV) optimization #97
Merged
feat: implement RISC-V Vector Extension (RVV) optimization #97
Conversation
Add comprehensive RVV optimizations for all three compression algorithms: • Chameleon: Vectorized hash computation with 8-element SIMD batching - Parallel processing using vle32_v_u32m1, vmul_vv_u32m1, vsrl_vx_u32m1 - Conflict detection and scalar fallback mechanisms - 2.5+ GB/s compression speed with 1.75x compression ratio • Cheetah: Adaptive RVV optimization for complex prediction logic - 4-element batching with intelligent conflict handling - Dynamic fallback for complex state dependencies - 1.4+ GB/s compression speed with 1.86x compression ratio • Lion: Conservative RVV approach for maximum compression - Vectorized hash computation with scalar prediction logic - Preserves complex prediction accuracy while accelerating hashing - 714+ MB/s compression speed with 1.97x compression ratio Key features: - Non-destructive integration: No modifications to existing code structure - Conditional compilation: Uses #[cfg(all(target_arch = "riscv64", target_feature = "v"))] - Runtime detection: Dynamic VLEN capability assessment - Automatic fallback: Seamless degradation to standard implementation - Full backward compatibility: Zero impact on non-RISC-V platforms Performance achievements: - Outperforms LZ4 by 5.8x in compression speed (2.577 GB/s vs 444.6 MB/s) - Outperforms Snappy by 6.4x in compression speed (2.577 GB/s vs 402.7 MB/s) - Maintains GB/s-level decompression speeds across all algorithms Added comprehensive documentation and demonstration examples. Co-authored-by: gong-flying <gongxiaofei24@iscas.ac.cn>
Co-authored-by: gong-flying <gongxiaofei24@iscas.ac.cn>
…ementation documentation Co-authored-by: gong-flying <gongxiaofei24@iscas.ac.cn>
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.
Add comprehensive RVV optimizations for all three compression algorithms:
• Chameleon: Vectorized hash computation with 8-element SIMD batching
• Cheetah: Adaptive RVV optimization for complex prediction logic
• Lion: Conservative RVV approach for maximum compression
Key features:
Added comprehensive documentation and demonstration examples.