Commit Graph

758 Commits

Author SHA1 Message Date
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
Yann Collet
3109b8ef98
Merge pull request #278 from Cyan4973/xxh_implem
transferred implementation inside xxhash.h
2019-12-03 16:41:15 -08:00
Yann Collet
cff3643459 fixed make command
on Windows, command line doesn't accept environment variables before the command
2019-12-03 15:55:50 -08:00
Yann Collet
8f6e9c92e6 fixed mingw+clang compilation test
which do not work using c90 strict mode,
due to the (incorrect) presence of `inline` keyword
in some standard library's header files.

The previous method was disabling the `inline` keyword,
but this introduces other problems with more complex multi-files project,
such as benchHash, which has been recently added as part of `make test`.

Added a new environment variable to disable the c90 compatibility test :
NO_C90_TEST=true

note : apparently, Appveyor doesn't like comments inside () sub-blocks :(
2019-12-02 17:32:56 -08:00
Yann Collet
4e2199def8
Merge pull request #280 from clockfort/patch-2
fix docs link
2019-11-24 11:49:53 -08:00
Chris Lockfort
a96cd994e7
fix docs link 2019-11-24 04:15:44 -08:00
Yann Collet
aa61b378b3 removed extraneous include
also : attempts to fix benchHash compilation on Windows
using msys2 environment with clang compiler
2019-11-04 21:17:07 -08:00
Yann Collet
d3a76b3a28 attempt to reconcile usan and benchHash 2019-11-04 17:25:42 -08:00
Yann Collet
a642aba0f5 transferred implementation inside xxhash.h
instead of xxhash.c .

This seems preferable for some build systems,
which don't like the `#include "xxhash.c"` statement
when inlining xxhash, as reported by @pdillinger .

Note that `xxhash.c` still exists,
it just includes the implementation and instantiates it.
2019-11-04 16:04:28 -08:00
Yann Collet
44cd858d49 removed non-ascii character 2019-10-24 15:57:00 -07:00
Yann Collet
8e5fdcbe70 added benchHash compilation to test target 2019-10-11 08:12:25 -07:00
Yann Collet
e6dc2443f0 fix: multiple include with/without XXH_STATIC_LINKING 2019-10-11 07:50:06 -07:00
Yann Collet
1cc9634053 improve speed for large inputs
by up to +20%
2019-10-08 20:58:02 -07:00