diff --git a/optimized-RV-FindMatchLength-improving-compress-speed--upstream-accepted.patch b/optimized-RV-FindMatchLength-improving-compress-speed--upstream-accepted.patch new file mode 100644 index 0000000000000000000000000000000000000000..73a70ae3eec521826b800efc36f78fd9dae78f24 --- /dev/null +++ b/optimized-RV-FindMatchLength-improving-compress-speed--upstream-accepted.patch @@ -0,0 +1,30 @@ +From d89c9def26081f01ac55aefdb349e44b88023c35 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=E9=83=91=E7=B4=AB=E9=98=B310295048?= + +Date: Wed, 27 Aug 2025 09:11:06 +0800 +Subject: [PATCH] + optimized-RV-FindMatchLength-improving-compress-speed--upstream-accepted + +--- + snappy-internal.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/snappy-internal.h b/snappy-internal.h +index 0923f39..4414e17 100644 +--- a/snappy-internal.h ++++ b/snappy-internal.h +@@ -170,9 +170,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, +-- +2.21.0.windows.1 + diff --git a/snappy.spec b/snappy.spec index b45de6a89ea0bd6a1272c95f216a1f08ddda4515..cc889dd08286ee40c82c234324698528689fcbfd 100644 --- a/snappy.spec +++ b/snappy.spec @@ -1,6 +1,6 @@ Name: snappy Version: 1.1.10 -Release: 2 +Release: 3 Summary: A fast compressor/decompressor License: BSD URL: https://github.com/google/snappy @@ -9,6 +9,8 @@ Source1: snappy.pc Patch0: remove-dependency-on-google-benchmark-and-gmock.patch Patch2: add-option-to-enable-rtti-set-default-to-current-ben.patch +Patch3: optimized-RV-FindMatchLength-improving-compress-speed--upstream-accepted.patch + BuildRequires: gcc-c++ make gtest-devel cmake @@ -69,6 +71,10 @@ make test %doc NEWS README.md %changelog +* Fri Aug 1 2025 liuqingtao -1.1.10-3 +- optimized-RV-FindMatchLength-improving-compress-speed--upstream-accepted +- DESC:Use-high-performance-FindMatchLength-to-Optimize for RV + * Fri Jan 12 2024 zhoupengcheng -1.1.10-2 - Build with C++14 instead of C++11; gtest 1.13.0 requires it