github Cyan4973/xxHash v0.8.4
xxHash v0.8.4

5 hours ago

xxHash v0.8.4 is a general maintenance update, offering broader hardware acceleration, command line enhancements, and more predictable builds across platforms. No change to the API entry points.

Faster performance with vectorization

This release adds several vectorized implementations: for the RISC-V Vector extension and LoongArch LASX, together with improvements to the existing LSX implementation.

On aarch64, XXH3 now prefers NEON over SVE. On tested processors, this improves performance by 25–40%. XXH3 streaming performance has also been improved for workloads made of small updates.

Command-line enhancements

xxhsum can now receive a full 64-bit seed through -s or --seed.

Command-line parsing is more flexible: options may appear anywhere, even after filenames, while -- explicitly terminates option processing.

When processing a list of files, read errors no longer prevent subsequent files from being processed.

Windows support received a substantial update, notably for long paths, UNC paths and filenames containing components that require extended Win32 path handling.

Build and integration

Runtime dispatch detection has been corrected for cross-compilation and non-x86 targets.

make builds now isolate object files by configuration, avoiding accidental reuse across incompatible flag sets and allowing parallel test builds.

The cmake integration moved from cmake_unofficial to build/cmake. Projects referring directly to the previous directory must update that path.

Low-level integrations can now redirect XXH_memcpy(), XXH_memset() and XXH_memcmp(). A new XXH_NO_EXTERNC_GUARD macro is also available for projects that need to manage C++ linkage themselves.

Correctness and portability

A strict-aliasing issue that could cause gcc to miscompile some unaligned reads has been fixed. This release also addresses combinations involving XXH_INLINE_ALL, namespaces and x86 runtime dispatch, system headers included from an extern "C" block, and MSVC link-time optimization with warnings enabled as errors.

Portability improvements include compatibility with ARM builds using GCC versions older than 8, C++ compilation on Solaris and illumos, and improved installation metadata and paths on Windows and FreeBSD.

Detailed changelist

  • perf : added RISC-V Vector extension (RVV) implementation, by @zijianli1234, @BoBoDai and @camel-cdr
  • perf : added LoongArch LASX implementation and improved LSX, by @24bit-xjkp
  • perf : prefer NEON over SVE on AArch64, improving XXH3 speed by 25–40%, by @Nicoshev
  • perf : improved XXH3 streaming speed for very small updates, suggested by @aleksazr
  • api : XXH_memcpy(), XXH_memset() and XXH_memcmp() can be redirected at compile time
  • api : new XXH_NO_EXTERNC_GUARD build macro for complex C++ integration
  • cli : added 64-bit seed support (-s, --seed), by @d06i
  • cli : options can appear after filenames; -- terminates option parsing, #1098 reported by @unterkomplex
  • cli : continue processing subsequent files after read errors, #1064 reported by @ZoomRmc
  • cli : support long and special Windows paths, #1060, based on #1061 by @t-mat
  • cli : improved benchmark accuracy, error handling and unit labels, #1051 reported by @calgray
  • fix : unaligned reads could be miscompiled by GCC under strict aliasing, #1013 by @lassipulkkinen
  • fix : XXH_INLINE_ALL compatibility with XXH_NAMESPACE and x86 runtime dispatch, by @pps83, #1071 reported by @Dr-Hex
  • fix : avoid including system headers inside an extern "C" block, #1122 reported by @andreas-schwab
  • fix : compilation with MSVC link-time optimization and warnings as errors, #1038 reported by @mi2think
  • build: improved runtime dispatch detection for cross-compilation and non-x86 targets, with help from @eworm-de, #1081 reported by @PotMJ
  • build: LIBXXH_DISPATCH=1 now applies to static and dynamic libraries, #1058 reported by @xiota
  • build: Make builds now isolate objects by configuration and support parallel test builds
  • build: moved CMake integration to build/cmake and improved cross-compilation detection
  • install: improved package metadata and installation paths on Windows and FreeBSD, by @iwamatsu, @chitao1234 and @sunpoet
  • portability: fixed compilation on ARM with GCC < 8, by @mstorsjo
  • portability: fixed C++ compilation on Solaris and illumos, by @luqmana
  • doc : expanded xxhsum documentation and clarified the algorithm specification files
  • doc : documented non-cryptographic collision properties, notably for XXH3's mid-size path, #1127 by @thomasahle

Full changelog: v0.8.3...v0.8.4

New Contributors

Don't miss a new xxHash release

NewReleases is sending notifications on new releases.