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 usingSIMD128
(@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 withcmake
(@ilya-fedin) - build: fix
icc
compilation - build: fix
cmake
install directories - build: new build options
XXH_NO_XXH3
,XXH_SIZE_OPT
andXXH_NO_STREAM
to reduce binary size (@easyaspi314) - build: dedicated install targets (@ffontaine)
- build: support
DISPATCH
mode incmake
(@hzhuang1) - portability: fix
x86dispatch
when building withVisual
+ 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
andrisc-v
- doc : XXH3 specification (@adrien1018)
- doc : improved doxygen documentation (@easyaspi314, @t-mat)
- misc : dedicated sanity test binary (@t-mat)
Full change list (github generated)
- Fix an assert comparison the same values (flagged by PVS Studio in 0.8.1) by @kcgen in #628
- Add GitHub Actions badge for release branch by @t-mat in #633
- Add windows-2022 to ci.yml by @t-mat in #634
- Add macOS matrix to ci.yml by @t-mat in #635
- Fix compilation on RHEL 7 ppc64le (gcc 4.8) by @ellert in #631
- Add clang-cl for MSVC 2019 to ci.yml by @t-mat in #637
- [NEON] Split XXH3 into 6 NEON lanes and 2 scalar lanes on aarch64 by @easyaspi314 in #632
- Fix some ARM/clang-cl feature detection issues by @easyaspi314 in #623
- Add QEMU/gcc matrix to ci.yml by @t-mat in #640
- fix #625 by @Cyan4973 in #638
- fix #627 by @Cyan4973 in #639
- added m68k emulation tests to GA by @Cyan4973 in #643
- Document some nerdy ARM stuff, move scalarRound down. by @easyaspi314 in #642
- fix minor static analyzer warning by @Cyan4973 in #644
- fix man page installation by @Cyan4973 in #648
- fix cmake --install by @Cyan4973 in #649
- Use attribute((aligned)) instead of packed by @Hello71 in #650
- [ARM/AArch64] Fix multiple GCC codegen problems by @easyaspi314 in #651
- removed XXH3 declarations when XXH_NO_XXH3 is defined by @Cyan4973 in #653
- new build macro XXH_NO_STDLIB by @Cyan4973 in #654
- improved nostdlib test by @Cyan4973 in #656
- added attribute((const)) by @Cyan4973 in #657
- added attribute((malloc)) by @Cyan4973 in #658
- added attribute((pure)) by @Cyan4973 in #659
- Documentation update by @easyaspi314 in #661
- Makefile: add dedicated install targets by @ffontaine in #665
- XXH_HAS_C_ATTRIBUTE(x)?! by @easyaspi314 in #662
- do no longer depend on
<assert.h>
for XXH_STATIC_ASSERT by @Cyan4973 in #670 - Properly fix altivec namespace collisions by @easyaspi314 in #672
- Introduce XXH_SIZE_OPT and XXH_NO_STREAM by @easyaspi314 in #667
- Remove duplicated definition of XXH3_128bits by @mterron in #676
- Removed windows-2016 from ci.yml by @t-mat in #690
- tipi.build instructions by @pysco68 in #688
- Fix issue #695 by @t-mat in #698
- Build fix for Haiku by @Begasus in #696
- Use inline assembler for Power/IBM XL Compiler by @MaxiBoether in #708
- test filename-escape by @Cyan4973 in #710
- avoid add_compile_definitions for cmake < v3.12 by @Cyan4973 in #711
- just more cmake v2.8.12 tests by @Cyan4973 in #721
- CPack Added in #719
- Remove stream loads and slightly improve avx512 seed generation by @goldsteinn in #726
- Fix: brace expansion by @t-mat in #729
- Fix issue #724 by @t-mat in #730
- Remove macOS-10.15 from ci.yml by @t-mat in #736
- blind fix for fallthrough on icc by @Cyan4973 in #718
- Optimize XXH3_accumulate_512_neon by @dougallj in #734
- Fix typos found by codespell by @DimitriPapadopoulos in #739
- ci: fix tipi build error on github CI workflow by @hzhuang1 in #749
- Update GitHub Actions by @DimitriPapadopoulos in #742
- xxhash: support SVE by intrinsic code by @hzhuang1 in #752
- fix issues reported by cppcheck by @hzhuang1 in #746
- CI: fix missing space by @hzhuang1 in #758
- Fixing tipi-build / Build as dependency CI step by @pysco68 in #760
- Customize full accumulating loop for SVE by @hzhuang1 in #756
- added macos-12 test to GH CI by @Cyan4973 in #765
- Small improvement to x86 vectorized hashes and medium-sizes hash. by @goldsteinn in #754
- dispatch: Use attribute((constructor)) on XXH_setDispatch by @goldsteinn in #773
- Fix typo found by codespell by @DimitriPapadopoulos in #777
- http:// → https:// by @DimitriPapadopoulos in #778
- Add attribute((noescape)) on pointers in public API by @goldsteinn in #782
- Annotate xxh_x86dispatch with XXH_NOESCAPE by @goldsteinn in #786
- [NEON] Refactor NEON code by @easyaspi314 in #787
- Makefile: add install_libxxhash.includes target by @ffontaine in #776
- s390x: add memory barrier to avoid fault issue by @hzhuang1 in #785
- Define XXH_RESTRICT for some C++ compilers (gcc/clang/msvc/icc) by @goldsteinn in #788
- Fix spelling. by @dwsteele in #797
- cmake: support dispatch mode by @hzhuang1 in #790
- Fix
XXH_UNREACHABLE
feature test for C++23 and remove for C23 #791 by @goldsteinn in #792 - Rewrite XXH3_update by @easyaspi314 in #805
- fix: GH-Actions - remove ubuntu-18.04 by @t-mat in #817
- Fix: add gcc -Og check and fix its false positive warnings by @t-mat in #814
- Fix off-by-one in XXH3_consumeStripes() (Fixes #816) by @easyaspi314 in #818
- added read-all permission status to Github Actions Workflow by @Cyan4973 in #807
- XXH_ASSUME macro using
__builtin_assume
if supported (clang only fo… by @devnexen in #803 - Fix GCC 12 -Og by @easyaspi314 in #804
- Add
gcc-12
to ci.yml by @t-mat in #819 - benchmark : adjust initial speed target to 10 MB/s by @Cyan4973 in #822
- added one test length for xxh sanity checks by @Cyan4973 in #820
- Various AArch64 speed hacks by @easyaspi314 in #809
- Dedicated sanity test program by @t-mat in #823
- Add Security Policy by @gabibguti in #828
- Reference actions by commit SHA by @gabibguti in #833
- Bump actions/checkout from 3.5.2 to 3.5.3 by @dependabot in #837
- removed tipi test from CI suite because it's unstable by @Cyan4973 in #841
- reworded the AVX error message when compiling xxh_x86dispatch.c by @Cyan4973 in #840
- Feature: Support # comment lines in --check files by @t-mat in #838
- Fix double prefix when building with cmake by @ilya-fedin in #723
- added a cmake pkgconfig generation test by @Cyan4973 in #845
- added RISC-V emulation to CI by @Cyan4973 in #846
- Add algorithm specification of XXH3 by @adrien1018 in #750
- minor follow-ups for XXH3 specification (#750) by @Cyan4973 in #847
- Remove
0.8.1
s by @t-mat in #848 - Detect and display SVE when active by @Cyan4973 in #849
- Fix doxygen warnings (2nd attempt) by @t-mat in #851
- feature: CLI: --binary by @t-mat in #852
- Add WebAssembly SIMD128 implementation and Node.JS support by @easyaspi314 in #825
- Add --ignore-missing by @t-mat in #853
- Add missing doxygen style comments to XXH64 family by @t-mat in #855
- Add missing doxygen style comments to XXH3 family by @t-mat in #856
- Add --ignore-missing and --binary to --help and xxhsum.1 by @t-mat in #857
- added a compilation warning message for XXH_OLD_NAMES by @Cyan4973 in #860
- fix: __cpuidex pointer type warning by @t-mat in #864
- Fix clang-cl dispatch by @t-mat in #865
- add a test combining Windows + Visual + Clang-Cl + DISPATCH=1 by @Cyan4973 in #863
- fix: enable clang-cl test for VC++2022 by @t-mat in #866
- fix: Intel compiler's warning for XXH_ASSERT() by @t-mat in #867
- fix: hide internal macros from doxygen by @t-mat in #868
- hide x86 dispatcher internals by @t-mat in #869
- CI: Add gcc-13 and clang-{13,14,15} by @t-mat in #872
- revert XXH3's 17to128 variant to single accumulator by @Cyan4973 in #871
- v0.8.2 by @Cyan4973 in #873
New Contributors
- @kcgen made their first contribution in #628
- @Hello71 made their first contribution in #650
- @ffontaine made their first contribution in #665
- @mterron made their first contribution in #676
- @pysco68 made their first contribution in #688
- @MaxiBoether made their first contribution in #708
- @goldsteinn made their first contribution in #726
- @dougallj made their first contribution in #734
- @DimitriPapadopoulos made their first contribution in #739
- @hzhuang1 made their first contribution in #749
- @dwsteele made their first contribution in #797
- @devnexen made their first contribution in #803
- @gabibguti made their first contribution in #828
- @dependabot made their first contribution in #837
- @ilya-fedin made their first contribution in #723
- @adrien1018 made their first contribution in #750
Full Changelog: v0.8.1...v0.8.2