Skip to content

Commit

Permalink
added XXH_REROLL consistency test
Browse files Browse the repository at this point in the history
to catch issues such as #240.
Also added XXH64 test for len==4
  • Loading branch information
Cyan4973 committed Aug 10, 2019
1 parent 67a5024 commit 10904c1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ matrix:
- CPPFLAGS=-DXXH_VECTOR=1 make check # SSE2 code path
- make clean
- CPPFLAGS="-mavx2 -DXXH_VECTOR=2" make check # AVX2 code path
- make clean
- CPPFLAGS=-DXXH_REROLL=1 make check # reroll code path (#240)
- make -C tests/bench

- name: ARM + aarch64 compilation and consistency checks
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ they modify libxxhash behavior. They are all disabled by default.
with performance improvements observed in the +200% range .
See [this article](https://fastcompression.blogspot.com/2018/03/xxhash-for-small-keys-impressive-power.html) for details.
Note: there is no need for an `xxhash.o` object file in this case.
- `XXH_REROLL` : reduce size of generated code
- `XXH_REROLL` : reduce size of generated code. Impact on performance vary, depending on platform and algorithm.
- `XXH_ACCEPT_NULL_INPUT_POINTER` : if set to `1`, when input is a `NULL` pointer,
xxhash result is the same as a zero-length input
(instead of a dereference segfault).
Expand Down
1 change: 1 addition & 0 deletions xxhsum.c
Original file line number Diff line number Diff line change
Expand Up @@ -739,6 +739,7 @@ static void BMK_sanityCheck(void)
BMK_testXXH64(NULL , 0, prime, 0xAC75FDA2929B17EFULL);
BMK_testXXH64(sanityBuffer, 1, 0, 0xE934A84ADB052768ULL);
BMK_testXXH64(sanityBuffer, 1, prime, 0x5014607643A9B4C3ULL);
BMK_testXXH64(sanityBuffer, 4, 0, 0x9136A0DCA57457EEULL);
BMK_testXXH64(sanityBuffer, 14, 0, 0x8282DCC4994E35C8ULL);
BMK_testXXH64(sanityBuffer, 14, prime, 0xC3BD6BF63DEB6DF0ULL);
BMK_testXXH64(sanityBuffer,222, 0, 0xB641AE8CB691C174ULL);
Expand Down

0 comments on commit 10904c1

Please sign in to comment.