gzip already has UNALIGNED_OK-based fast paths, but tailor.h does not enable them automatically for RISC-V.
This patch defines UNALIGNED_OK when building for RISC-V targets that advertise efficient misaligned accesses via __riscv_misaligned_fast or __riscv_zicclsm. That lets the existing unaligned match code be used on those targets without affecting other configurations. Local test results on a 2044 system: Compression: -1: 4.848 s -> 4.771 s (+1.59%) -6: 16.459 s -> 15.273 s (+7.21%) -9: 36.200 s -> 34.537 s (+4.59%) Decompression: -1: 1.335 s -> 1.320 s (+1.12%) -6: 1.167 s -> 1.201 s (-2.91%) -9: 1.179 s -> 1.171 s (+0.68%) The compression improvement is consistent across the tested levels. Decompression is roughly neutral overall, with a small regression in the -6 measurement. Thanks.
0001-tailor-enable-unaligned_ok-on-supported-risc-v.patch
Description: Binary data
