Skip to content

xxHash v0.8.2

Latest
Compare
Choose a tag to compare
@Cyan4973 Cyan4973 released this 21 Jul 10:12
bbb27a5

xxHash v0.8.2 is an incremental update featuring multiple small improvements and fixes spread out over ~300 commits.

Faster performance

Several updates by @easyaspi314 and @hzhuang1 impact arm platform, most notably the neon code path. On the M1 Pro, this translates into +20% speed for xxh3 and xxh128 (from 30.0 GB/s to 36 GB/s).
Some of the changes are generic, so other platforms can be affected too, though typically to a lesser extend (~5%).

On wasm, speed fo xxh3 is improved by a large factor x2 to x3 (depending on underlying hardware) through the use of simd128 (@easyaspi314). This is especially efficient under the v8 js engine, notably used by chrome and node.js.

Finally, @hzhuang1 added support for the arm's SVE vector extension. This is useful for server-side aarch64 cpus with hardware support for wide vectors, such as Fujitsu's A64FX.

Fixes and improvements

Notable fixes in this update include the resolution of issues with XXH3 S390x vector implementation, PowerPC vector compilation with IBM XL compiler, and -Og compilation.

Furthermore, the command line interface (CLI) was refined with features such as support for comment lines in check files and commands such as --binary and --ignore-missing (@t-mat). Additionally, issues with filename containing /LF character were resolved.

The build process was also refined, with improvements such as fixing pkgconfig generation with cmake (@ilya-fedin), icc compilation, cmake install directories, and new build options to reduce binary size (@easyaspi314). Dedicated install targets were introduced (@ffontaine), and support for DISPATCH mode in cmake was added (@hzhuang1).

In terms of portability, the update includes the SVE vector implementation of XXH3, compatibility with freestanding environments using XXH_NO_STDLIB, and the ability to build on Haiku. The code has also been validated on m68k and risc-v.

Documentation

XXH3 finally has a written specification, thanks to @adrien1018 !
Source code can also be digested by doxygen to generate code documentation automatically. An instance is now available at homepage.

Erratum

There is a bug in this version when invoking the function XXH3_128bits_withSecretandSeed(), specifically when the parameter seed == 0, and input length < XXH3_MIDSIZE_MAX (< 240 bytes), and the secret is different from the one created with XXH3_generateSecret_fromSeed(), and the user is invoking the Streaming API. The hash values produced in this case are incorrect: as stated in the documentation, they should be == XXH3_128bits_withSeed(). This is fixed in later version and the dev branch , thanks to @hltj.(a9b2f18).

Changelog

  • fix : XXH3 S390x vector implementation (@hzhuang1)
  • fix : PowerPC vector compilation with IBM XL compiler (@MaxiBoether)
  • perf : improved WASM speed by x2/x3 using SIMD128 (@easyaspi314)
  • perf : improved speed (+20%) for XXH3 on ARM NEON (@easyaspi314)
  • cli : Fix filename contain /LF character (@t-mat)
  • cli : Support # comment lines in --check files (@t-mat)
  • cli : Support commands --binary and --ignore-missing (@t-mat)
  • build: fix -Og compilation (@easyaspi314, @t-mat)
  • build: fix pkgconfig generation with cmake (@ilya-fedin)
  • build: fix icc compilation
  • build: fix cmake install directories
  • build: new build options XXH_NO_XXH3, XXH_SIZE_OPT and XXH_NO_STREAM to reduce binary size (@easyaspi314)
  • build: dedicated install targets (@ffontaine)
  • build: support DISPATCH mode in cmake (@hzhuang1)
  • portability: fix x86dispatch when building with Visual + clang-cl (@t-mat)
  • portability: SVE vector implementation of XXH3 (@hzhuang1)
  • portability: compatibility with freestanding environments, using XXH_NO_STDLIB
  • portability: can build on Haiku (@Begasus)
  • portability: validated on m68k and risc-v
  • doc : XXH3 specification (@adrien1018)
  • doc : improved doxygen documentation (@easyaspi314, @t-mat)
  • misc : dedicated sanity test binary (@t-mat)

Full change list (github generated)

New Contributors

Full Changelog: v0.8.1...v0.8.2