From 758804a4bc359fccb75318568023f62999e38caa Mon Sep 17 00:00:00 2001 From: anthony-zy Date: Tue, 29 Jul 2025 14:08:43 +0800 Subject: [PATCH] Use high-performance FindMatchLength to Optimize Snappy compression speed For RISC-V[skip ci] --- snappy-internal.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/snappy-internal.h b/snappy-internal.h index ae78247..53a5110 100644 --- a/snappy-internal.h +++ b/snappy-internal.h @@ -172,9 +172,10 @@ char* CompressFragment(const char* input, // loading from s2 + n. // // Separate implementation for 64-bit, little-endian cpus. +// riscv and little-endian cpu choose this routinue can be done faster too. #if !SNAPPY_IS_BIG_ENDIAN && \ (defined(__x86_64__) || defined(_M_X64) || defined(ARCH_PPC) || \ - defined(ARCH_ARM)) + defined(ARCH_ARM) || defined(__riscv)) static inline std::pair FindMatchLength(const char* s1, const char* s2, const char* s2_limit,