Commit Graph

955 Commits

Author SHA1 Message Date
Yann Collet
753119ebe0 generalized random ingestion pattern test 2020-05-29 10:49:51 -07:00
Yann Collet
d2a00cdabb fixed variable shadowing 2020-05-28 16:30:26 -07:00
Yann Collet
ff07228149 fix streaming checksum
Streaming implementation of XXH3/XXH128 could fail, reporting an incorrect hash value,
for certain specific ranges of length, and providing input in segments of random length.
issue reported by @WayneD
fix #378
updated test case to catch this issue
2020-05-28 16:10:00 -07:00
Yann Collet
ceed8a7153
simplified XXH_PREFETCH_DIST logic (#375)
still distinguishes :
- __clang__ : 320
- AVX512 : 512
- the rest : 384
2020-05-27 15:00:40 -07:00
Witold Baryluk
43deef25ce
Remove "Loading..." from source (#373)
* Remove --quiet and "Loading ..." from manpage

* Remove "Loading ..." from markdown manpage

* Removing "Loading..." from code

* Update tests for "Loading..."

* Remove the remaining "Loading..." from source

Forgot about this one

* Test error message on non-existing file

* Fix a typo in a test (xxhsum vs ./xxhsum)

* Fix a typo for real. noneexistent -> nonexistent

Tested.
2020-05-27 11:43:41 -07:00
Yann Collet
d697d7176b
Merge pull request #369 from Cyan4973/hugeSecret
support for secretSize > 4 GB in streaming mode
2020-05-20 23:43:16 -07:00
Yann Collet
e3ad2c907f support for secretSize > 4 GB in streaming mode
fix #368
2020-05-20 19:21:25 -07:00
Yann Collet
8c689cb878
Merge pull request #366 from Cyan4973/moveXXH3state
make XXH3_state_t movable
2020-05-20 18:47:04 -07:00
Yann Collet
6af67b92b7 Merge branch 'dev' into moveXXH3state 2020-05-20 14:31:11 -07:00
Yann Collet
d82f0c86d1
Merge pull request #367 from easyaspi314/clean_namespace
Clean up namespace
2020-05-20 14:25:48 -07:00
easyaspi314 (Devin)
9405c1ca88 Fix PPC compile errors 2020-05-20 16:49:36 -04:00
easyaspi314 (Devin)
da20cf1156 Fix minor formatting issue 2020-05-20 16:41:53 -04:00
easyaspi314 (Devin)
3eb1a010a0 Clean up namespace
- Every symbol, typedef, and macro is prefixed with XXH or xxh.
 - For compatibility with legacy code that messes with the internals,
   XXH_OLD_NAMES can be defined to wrap the old names in macros. This
   also brings back U32 and friends.
2020-05-20 16:36:24 -04:00
Yann Collet
deeae7f5fd fixed minor conversion warning 2020-05-20 13:05:34 -07:00
Yann Collet
a97e8a88a2 make XXH3_state_t movable
also fix XXH3_copyState()
when copying a state initialized with a seed.

fix #365
2020-05-20 10:45:27 -07:00
Yann Collet
d8bed9a54d
Merge pull request #363 from vrqq/patch-1
Fix issue 362
2020-05-16 01:20:29 -07:00
vrqq
90e5f76687
Fix issue 362
Fixed: https://github.com/Cyan4973/xxHash/issues/362#issue-619394966
2020-05-16 15:43:29 +08:00
Yann Collet
d45288407e
Merge pull request #360 from weaversa/dev
Contribute a Cryptol specification of XXH32 and XXH64 to the documentation
2020-05-09 10:01:03 -07:00
Sean Weaver
f74ee47f93 Contribute a Cryptol specification of XXH32 and XXH64 to the documentation 2020-05-09 12:40:34 -04:00
Yann Collet
dda230e4dd
Merge pull request #349 from Cyan4973/betterHelp
Improved help message
2020-04-08 15:38:30 -07:00
Yann Collet
29ff35da80 Improved help message
following suggestions from #345.

Note : only cosmetic changes in this diff,
I've avoided any change that would impact the behavior of the program.
2020-04-07 15:19:08 -07:00
Yann Collet
fa1368ad7a
Merge pull request #346 from easyaspi314/unicode_fix_3
Fix Unicode hopefully for the last time
2020-04-07 14:18:10 -07:00
Yann Collet
294c403110
Merge pull request #347 from gzm55/work/avx512
add optimized implementation for AVX512 targets
2020-04-07 13:41:52 -07:00
James Z.M. Gao
fbd6bb1414 update avx512 prefetch distance for gcc and clang 2020-04-08 01:36:18 +08:00
James Z.M. Gao
301727fe33 fix ident format 2020-04-06 18:06:33 +08:00
James Z.M. Gao
4b12376862 add optimized implementation for AVX512 targets 2020-04-06 15:58:26 +08:00
easyaspi314 (Devin)
ab2862f867 Fix Unicode hopefully for the last time
Use `__wgetmainargs()` instead of `GetCommandLineW()` and
`CommandLineToArgvW()`. While it is an internal API, aside from
declaring the function, it actually simplifies things a lot, as we can
setup a `wmain()` equivalent in a few lines.

It also avoids linking to `Shell32.dll`, which is a lot of bloat for a
simple command line utility.

Most importantly, this supports wildcards on `cmd.exe`, fixing #341.

Also improved comments and did minor cleanup.
2020-03-28 15:40:51 -04:00
Yann Collet
7fc2b54047
Merge pull request #337 from easyaspi314/arm-speed-hax
[ARM/Clang] Minor speed hacks
2020-03-16 17:31:00 -07:00
Yann Collet
3e6c039a87
Merge pull request #338 from easyaspi314/fix-warnings
Fix a few warnings
2020-03-16 10:18:49 -07:00
easyaspi314 (Devin)
7ea2940fd6 Fix a few warnings
- Trailing comma in enum in xxhsum.c
 - Extra semicolon
 - Non-constant brace list initializers
2020-03-16 12:29:49 -04:00
Yann Collet
607966c900
Merge pull request #335 from easyaspi314/unicode-xp
New Windows Unicode solution, works on XP
2020-03-13 10:15:28 -07:00
Yann Collet
77294d27ae updated version number
in order to distinguish users of the release from potential users of the development version
2020-03-12 14:45:51 -07:00
easyaspi314 (Devin)
a16928e06a [ARMv7] Reroll and block Clang autovec in mergeAccs
Prevents SLP vectorization on Clang ARMv7 resulting in scalarized
multiplies.

Also should be more friendly for sizeopt. Loop should be unrolled
anyways, or the overhead of 128-bit multiplies on 32-bit outweigh
the branch a la XXH64_finalize. Needs to be benchmarked on x86.
2020-03-12 16:51:02 -04:00
easyaspi314 (Devin)
267bf16826 [aarch64] Force memory loads in kSecret seeding on Clang
Prevents Clang from generating MOVK chains and stalling the integer
pipelines.
2020-03-12 16:48:34 -04:00
easyaspi314 (Devin)
090b389778 [NEON] Move veor below if block
Improves interleaving on Clang aarch64, allowing 6 GB/s on a Snapdragon
835.
2020-03-12 16:40:41 -04:00
easyaspi314 (Devin)
7328e217af Re-wrap comments.
Helps when you set your guideline to the correct column.
2020-03-10 14:12:15 -04:00
easyaspi314 (Devin)
a532573cf9 New Windows Unicode solution, works on XP
Now uses WriteConsoleW instead of vfwprintf. This is codepage
independent and works on Windows XP.

Doing this also avoids the _O_U8TEXT hack.
2020-03-10 14:06:09 -04:00
Yann Collet
f6872bf514
Merge pull request #334 from easyaspi314/makefile-fixes
Minor Makefile fixes
2020-03-09 22:57:27 -07:00
easyaspi314 (Devin)
519dc67b23 Replace --std with -std, fix typo
`--std` is improper but accepted. The correct option is `-std`.
2020-03-10 01:21:23 -04:00
easyaspi314 (Devin)
4d4ce34a56 Fix Makefile portability issues
Don't use `-mavx2 -maes` in collisions

It prevents `make test` from passing on non-x86 targets

TODO: proper Windows library flags: bfd accepts Linux flags, but
ld.lld errors on `-Wl,-soname`
2020-03-10 01:20:47 -04:00
Yann Collet
44c3781f12
Merge pull request #333 from easyaspi314/xxhsum-bench
xxhsum bench improvements
2020-03-09 21:39:54 -07:00
easyaspi314 (Devin)
962813dc7d Use better wording for short hash name
XXH3_64b seeded -> XXH3_64b w/seed
XXH3_64b secret -> XXH3_64b w/secret
2020-03-09 21:26:25 -04:00
easyaspi314 (Devin)
e30c5cc908 xxhsum.c: Remove some unused macros
MEM_MODULE and SET_SPARSE_FILE_MODE aren't even used, remove them.
2020-03-09 20:03:15 -04:00
easyaspi314 (Devin)
3e567ea317 Add withSecret variants to the benchmark
Moved sanityBuffer generator to its own function and made a static
buffer to use as a secret. Easier than passing a pointer around.
2020-03-09 19:44:04 -04:00
easyaspi314 (Devin)
a5e21d1da6 Abstract xxhsum bench, increase line length
Uses a table and a loop to reduce copy/paste and allow easy testing of
other hash functions. Create a wrapper and insert it into
g_hashesToBench, and it will automatically be added to the benchmark.

The hash display line has been made longer to actually fit xxHash's
names instead of clipping them. It is also configurable.
2020-03-09 19:02:48 -04:00
Yann Collet
1dc959b74d
Merge pull request #332 from easyaspi314/documentation-v2
More documentation and cleanup
2020-03-09 15:16:40 -07:00
easyaspi314 (Devin)
de893872d5 Document Unicode behavior on XP and 7 2020-03-09 17:53:07 -04:00
easyaspi314 (Devin)
fd42399e87 [WIP] xxh3.h: Wrap some long lines
Breaks up many very long lines.

It isn't perfect but it is a start.
2020-03-09 17:53:07 -04:00
easyaspi314 (Devin)
e2ad7b6427 Minor fixes
Fix XXH128 streaming comment which incorrectly claims that the
initializers are different, slight indentation fixes
2020-03-09 17:53:07 -04:00
easyaspi314 (Devin)
6ce8de0495 Rearrange hashLongs, rename XXH3_hashLong_internal
Reordered the hashLong wrappers so they aren't split by the seed init
code

Renamed XXH3_hashLong_internal to XXH3_hashLong_64b_internal to match
128-bit variant
2020-03-09 17:53:07 -04:00