Commit Graph

770 Commits

Author SHA1 Message Date
Yann Collet
741400a5b1 disabled checksum validation
while formula is in flux
2020-02-19 16:08:36 -08:00
Yann Collet
f1051cda49 joined len==8 into 4to8 2020-02-19 16:01:20 -08:00
Yann Collet
123db71fd0 improvement vs mul0 2020-02-19 15:58:19 -08:00
Yann Collet
f486b3c7c4 try a mul32to64 formula for len_4to8 2020-02-19 15:45:43 -08:00
Yann Collet
6456c04490 added likely
removed bijectivity
2020-02-19 14:41:56 -08:00
Yann Collet
993dcf89f7 fixed xxhsum verification values (partial) 2020-02-13 21:53:35 -08:00
Yann Collet
9df2729931 Merge branch 'dev' into smallInputs 2020-02-13 21:31:16 -08:00
Yann Collet
0a5f34f8cf modified small inputs for xxh3
in order to pass the new Perlin_noise test.

Sizes 4-8 should also be slightly faster.
2020-02-13 19:14:58 -08:00
Yann Collet
16f6cee1bf
Merge pull request #303 from Cyan4973/nullstring
return non-zero on empty string :
2020-02-12 16:45:03 -08:00
Yann Collet
fa0a6ebc7f fixed emptry-string results on Big-Endian 2020-02-12 15:32:45 -08:00
Yann Collet
1a67ed4437 return non-zero on empty string :
answering : https://github.com/Cyan4973/xxHash/issues/175#issuecomment-548108921

The probability of receiving an empty string is larger than random (> 1 / 2^64),
making the generated hash more "common".

For some algorithm, it's an issue if this "more common" value is 0.

Maps it instead to an avalanche of an arbitrary start value (prime64).
The start value is blended with the `seed` and the `secret`,
so that the result is dependent on those ones too.
2020-02-12 15:22:13 -08:00
Yann Collet
aee51d5e7b
Merge pull request #302 from Cyan4973/inline_all
xxhash can be inlined even when previously included
2020-02-12 15:01:41 -08:00
Yann Collet
dadf1ef766 fix xxhash.h include from xxh3.h 2020-02-12 14:36:11 -08:00
Yann Collet
b8d761e5a7 Merge branch 'dev' into inline_all 2020-02-12 14:19:13 -08:00
Yann Collet
99077eca58
Merge pull request #301 from Cyan4973/s390x
S390x
2020-02-12 14:18:37 -08:00
Yann Collet
b63643ddc1 Always use intrinsics with s390x 2020-02-12 13:51:50 -08:00
Yann Collet
160e37d349 Merge branch 'dev' into s390x 2020-02-12 12:12:46 -08:00
Yann Collet
19cd4ffed3 xxhash can be inlined even if it was previously included
Inlining hash functions is generally beneficial for performance.
It becomes extremely beneficial whenever input size is a compile-time constant.

To inline xxhash functions, one just needs to include it this way :

One potential issue is that "xxhash.h" may have already been included previously,
typically as part of another included `*.h` .
In which case, the second `#include` statement will have no effect.

This patch fixes this situation :
now, when XXH_INLINE_ALL is defined, all identifiers are renamed,
in order to avoid name collision and confusion with already included indentifiers.

The renaming process uses XXH_NAMESPACE.
XXH_NAMESPACE must be available (i.e. not already used) for renaming to work.

A test has been added in `tests/` to ensure this scenario works correctly.
2020-02-12 11:43:33 -08:00
Yann Collet
8ae09480cf
Merge pull request #300 from easyaspi314/unified_neon_v2
Unify NEON code, fully document the VZIP.32 hack.
2020-02-11 13:40:17 -08:00
easyaspi314 (Devin)
5bcd55f32f Unify NEON code, fully document the VZIP.32 hack.
AArch64 and ARMv7 now use the same codepath, with the VZIP.32 hack being
abstracted away in a macro.

I also fully (over?) documented it to explain the hack.
2020-02-11 14:36:56 -05:00
Yann Collet
fa5541242f
Merge pull request #299 from easyaspi314/sizeopt_v2
Implement XXH_NO_INLINE_HINTS to disable forced inlining.
2020-02-11 10:01:19 -08:00
easyaspi314 (Devin)
b8dfa44bbc Implement XXH_NO_INLINE_HINTS to disable forced inlining.
This marks all internal functions as `static`, and gives the compiler
full control over whether to inline functions or not.

This is automatically defined on GCC and Clang when `-O0`, `-Os`, `-Oz`,
or `-fno-inline` is used.

With clang -Oz for AArch64, the .text section goes from 16880 bytes to
8136 bytes.
2020-02-11 11:55:17 -05:00
Yann Collet
76a3546eee
Merge pull request #298 from Cyan4973/cygwin
removed cygwin code path
2020-02-10 21:47:41 -08:00
Yann Collet
6a4e870843 removed cygwin code path
it's not useful :
cygwin uses the posix code path

fix #100
2020-02-10 16:37:04 -08:00
Yann Collet
48022182ac
Merge pull request #297 from ellert/gcc10-altivec
gcc10 altivec
2020-02-07 10:14:57 -08:00
Mattias Ellert
3e3f5f7c2f Fix build with gcc 10 on ppc64le
When gcc was updated to version 10 in Fedora the build of the xxhash
package started failing. The compilation succeeds, but the checks
trigger an error. This change, suggested by the maintainers of the gcc
package in Fedora, addresses the issue. F0r details see:

https://bugzilla.redhat.com/show_bug.cgi?id=1798908
2020-02-07 07:38:48 +01:00
Yann Collet
e6dab1ca0a
Merge pull request #290 from LilyWangL/vcpkg-instructions
Add vcpkg installation instructions
2020-01-16 09:14:09 -08:00
wangli28
e1f86b3c63 Add vcpkg installation instructions 2020-01-16 08:08:30 +00:00
wangli28
1012b7bba9 Add vcpkg installation instructions 2020-01-16 07:07:10 +00:00
Yann Collet
061753e16c
Merge pull request #289 from Cyan4973/cppcheck
fixed a bunch of minor cppcheck warnings
2020-01-03 17:40:59 -08:00
Yann Collet
21aca06ff7
Merge pull request #288 from Cyan4973/manfix
updated man page
2020-01-02 10:19:28 -08:00
Yann Collet
7d4c33a025 fixed a bunch of cppcheck minor warnings
not all, as some are plain false positives with no obvious replacement.
2019-12-27 16:17:33 -08:00
Yann Collet
549c24d09a updated man page
so that it better reflects advanced functionalities.
fix #286
Reported by @LEARAX
2019-12-27 15:21:26 -08:00
Yann Collet
83af030943
Merge pull request #285 from easyaspi314/s390x
Unified VSX and S390X code path, remove vpermxor
2019-12-15 12:44:23 -08:00
easyaspi314 (Devin)
8254152c1a [Testing] Dump CPU info on Travis builds 2019-12-15 11:52:16 -05:00
easyaspi314 (Devin)
bf005cdf89 Dumb typo 2019-12-14 22:53:31 -05:00
easyaspi314 (Devin)
0828f90ffb [WIP] Simplify VSX code
- Removes permxor optimization, it isn't worth the boilerplate
 - Uses memcpy and automatically swaps in the load

This removes big endian checks in the loop and improves portability,
hopefully maintaining performance.
2019-12-14 22:45:57 -05:00
easyaspi314 (Devin)
387a1ba1d3 [VSX/ZV] Improve commenting, switch to inline func
I think memcpy is fine for now.
2019-12-14 22:35:11 -05:00
easyaspi314 (Devin)
b1636275d8 Apparently vec_revb is not available in GCC. 2019-12-14 19:05:14 -05:00
easyaspi314 (Devin)
21c235f859 Switch s390x to bionic, temp cpuinfo hack 2019-12-14 18:54:22 -05:00
easyaspi314 (Devin)
4e39449563 Fix copy paste error 2019-12-14 18:50:44 -05:00
easyaspi314 (Devin)
8719a6afc5 [WIP] Start porting VSX code to s390x
- Loads are ugly. I haven't found any good documentation about
   unaligned loads.
 - Hopefully reduce the conditionals

I mostly want to test on Travis, as I don't have an s390x toolchain
at the moment.
2019-12-14 18:34:32 -05:00
easyaspi314 (Devin)
240196fec2 Merge branch 'dev' of https://github.com/Cyan4973/xxHash into s390x 2019-12-14 18:33:09 -05:00
Yann Collet
1c3bfee5f0
Merge pull request #284 from Cyan4973/s390x
added s390x tests on travis
2019-12-14 13:31:36 -08:00
easyaspi314 (Devin)
6aa9beeb50 [s390x] Identify s390x in xxhsum 2019-12-14 16:30:22 -05:00
Yann Collet
4863cba0fa added s390x tests on travis 2019-12-14 13:07:04 -08:00
Yann Collet
9fd98d7c5f
Merge pull request #283 from adamretter/dev
Use Travis CI Arm64 and PPC64le arch
2019-12-14 12:50:25 -08:00
Adam Retter
618dd731b6 Use Travis CI Arm64 and PPC64le arch 2019-12-14 21:34:07 +01:00
Yann Collet
ae245428b8 update internal benchmark
to reduce risks of rounding bias
when a measurement uses a too small amount of time.
2019-12-10 13:12:28 -08:00
Yann Collet
c173142da0 removed ===== comment separators
for easier compatibility with git merge conflict.

fix #277
2019-12-03 16:44:41 -08:00