Commit Graph

1004 Commits

Author SHA1 Message Date
Yann Collet
c1d70f5dd6 fixed XXH3_stream performance with DISPATCH 2020-06-12 18:59:12 -07:00
Yann Collet
dd79edee44 added XXH3_stream and XXH128_stream targets 2020-06-12 18:35:20 -07:00
Yann Collet
de0fe16fc7 disable staticAnalyze
it makes no sense for this test to fail now
on a completely unrelated part of the code base.
2020-06-12 18:11:01 -07:00
Yann Collet
e6683d935f fixed a completely unrelated malloc potential error 2020-06-12 16:19:51 -07:00
Yann Collet
c5867346ee bench: can select multiple variants
using comma separated IDs
2020-06-12 15:07:20 -07:00
Yann Collet
57377539bf can select multiple variants to benchmark
For example, `xxhsum -b1 -b2` will benchmark XXH32 in both aligned and unaligned mode.

Also : modified default list,
now only test main variants (XXH32, XXH64, XXH3 and XXH128).

Also : -bi0 makes it possible to generate a very quick (though inaccurate) evaluation.
2020-06-12 14:52:46 -07:00
Yann Collet
167e0c87b5 -bi0 makes a quick evaluation
modified make check to take advantage of -bi0 (faster test)
2020-06-12 12:25:15 -07:00
Yann Collet
f05d7987b6 print benchID 2020-06-12 11:39:51 -07:00
Yann Collet
c5f497e3c3 updated CHANGELOG
in preparation of v0.7.4
2020-06-12 09:49:57 -07:00
Yann Collet
37d484267a name instruction set in travisCI tests 2020-06-11 21:29:15 -07:00
Yann Collet
afed27cc26
Merge pull request #387 from Cyan4973/x86dispatch_table
Intel vector instruction dispatcher
2020-06-11 20:34:31 -07:00
Yann Collet
972ae45bf5 Merge branch 'dev' into x86dispatch_table 2020-06-11 17:52:14 -07:00
Yann Collet
27e33ac174
Merge pull request #386 from Cyan4973/kdf
Key Derivation function
2020-06-11 17:50:51 -07:00
Yann Collet
8dff3b89ee moved XXH3_generateSecret() into experimental section
so that its outcome remain non-binding
even after XXH3 / XXH128 get stabilized.
2020-06-11 17:22:58 -07:00
Yann Collet
8debcdc6f1 added documentation about DISPATCH environment variable 2020-06-11 00:26:38 -07:00
Yann Collet
f99ef4fd62 added environment variable DISPATCH 2020-06-11 00:13:06 -07:00
Yann Collet
125710950d fix avx512 dispatch 2020-06-11 00:01:39 -07:00
Yann Collet
0e67407e71 adding test for make dispatch 2020-06-10 19:10:43 -07:00
Yann Collet
c94b87eccd fixed minor warnings 2020-06-10 18:12:08 -07:00
Yann Collet
e9a9c7f753 fix minor cast warning 2020-06-10 16:51:10 -07:00
Yann Collet
f533356c96 fixed assert 2020-06-10 16:42:27 -07:00
Yann Collet
0f3ba3f7e4 added XXH128_withSeed 2020-06-10 16:30:12 -07:00
Yann Collet
958abdc9a6 added XXH128_withSecret 2020-06-10 15:58:56 -07:00
Yann Collet
b4ea4f53c7 added XXH128 2020-06-10 15:43:37 -07:00
Yann Collet
ad86c7ca1e added XXH3_128bits_update_dispatch() 2020-06-10 12:16:32 -07:00
Yann Collet
21a9a8c995 added XXH3_64bits_update_dispatch 2020-06-10 12:12:24 -07:00
Yann Collet
7c8b6995ff simplified seed allocation
to be compatible with any vector mode selected by dispatch.
2020-06-10 11:36:58 -07:00
Yann Collet
df5aca4f85 shortened source code for small inputs 2020-06-10 10:51:33 -07:00
Yann Collet
35fad7a3de shortened a few names
handle unused function warning
2020-06-09 21:15:50 -07:00
Yann Collet
710661b6ea replaced function pointers by a table
simplify dispatch logic
2020-06-09 17:14:02 -07:00
Yann Collet
f629e4a7f0 added XXH3_64bits_withSecret_dispatch() 2020-06-09 16:32:01 -07:00
Yann Collet
a80dac4426 added sse2 target 2020-06-09 14:41:51 -07:00
Yann Collet
0e87760b03 fix compilation strategy
starting from "baseline",
adding support for additional vector instructions selectively
2020-06-09 14:10:13 -07:00
Yann Collet
16f728f058 first dispatcher concept
replace 2 functions : XXH3_64bits() and XXH3_64bits_withSeed()
new target : make dispatch
compiled with -mavx2 by default

compiles fine with -mavx512f, but then crash at runtime detection
2020-06-08 23:15:08 -07:00
Yann Collet
1b14f648d6 added auto-test for secret generator 2020-06-08 13:14:44 -07:00
Yann Collet
726e4fa4f4 minor : improve comment and code readability
as suggested in c546d08ff3 (r39708108)

Also :
fix : `seeds[]` was incorrectly initialized.
2020-06-07 23:11:07 -07:00
Yann Collet
c546d08ff3 kdf v3
Following comments from @koraa :
- fix endianess issue, by using canonical representation
- all segments are derived from first one, in order to reduce dependency chain
- all derived segments use a seed, which is a combination raw custom seed content and segNb
- updated documentation

This variant breaks the possibility for an actor
to derive the entire secret from the knowledge of one of its segments
since it requires the seed, which is derived from original custom seed,
which is not present anywhere, condensed in the scrambling operation.
2020-06-05 16:46:55 -07:00
Yann Collet
58922a773b secret generator v2
update 128-bit scrambler at each 16-bytes round.
ensure there is no delta-correlation possible between segments,
even when the initial custom seed is poor (<= 16 bytes, or full of `\0` characters).
2020-06-05 00:37:56 -07:00
Yann Collet
16890b5c01
Merge pull request #385 from Cyan4973/aarch64_unaligned
remove alignment check on aarch64
2020-06-04 18:59:29 -07:00
Yann Collet
37a68f29df remove alignment check on aarch64
as this architecture offers decent performance for unaligned memory accesses (like x86/x64).

This circumvent the problem described in #383,
as the direct read path using `const xxh_u32*` will not be generated by default.

Note however that this does not go at the root of the problem,
which is a possibility of strict-aliasing issue
when using the direct read path _and_ inlining xxh32.
This issue however is more difficult to solve without a reproduction case.

I also used this opportunity to fix or reinforce documentation.
2020-06-04 00:05:24 -07:00
Yann Collet
4d0ec6e6ed first version of kdf 2020-06-02 22:41:24 -07:00
Yann Collet
1d2811fc17
Merge pull request #381 from WayneD/dev
Make xxhsum check if fread() failed
2020-05-29 13:50:43 -07:00
Yann Collet
2a80fa27a0
Merge pull request #379 from Cyan4973/fix378
fix streaming checksum
2020-05-29 13:16:09 -07:00
Wayne Davison
082399bfe8 Make xxhsum check if fread() failed
If fread() fails reading a file, output an error and exit.  The new code
also avoids an update call on a 0-length buffer at end of file.
2020-05-29 12:59:27 -07:00
Yann Collet
226d3ffd88 fixed constant 2020-05-29 11:30:52 -07:00
Yann Collet
753119ebe0 generalized random ingestion pattern test 2020-05-29 10:49:51 -07:00
Yann Collet
2934bd02b6
Merge pull request #377 from Cyan4973/initCustomSecret
Vectorized initCustomSecret()
2020-05-28 21:34:35 -07:00
Yann Collet
be37c619bf added aarch64 + clang tests
fixed the const property for the asm hack to work
2020-05-28 18:01:11 -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