Commit Graph

37 Commits

Author SHA1 Message Date
Yann Collet
dbea33e47e added benchHash_avx512 target 2024-08-17 12:32:27 -07:00
Haojian Zhuang
dde858b9a2 fix issues reported by cppcheck
Run command "make clean cppcheck".

---- static analyzer - cppcheck ----
cppcheck . --force --enable=warning,portability,performance,style --error-exitcode=1 > /dev/null
cli/xsum_os_specific.c:220:9: style: The scope of the variable 'ret' can be reduced. [variableScope]
    int ret;
        ^
cli/xsum_sanity_check.c:571:19: style: Condition 'len>0' is always true [knownConditionTrueFalse]
    } else if (len>0) {
                  ^
cli/xsum_sanity_check.c:569:13: note: Assuming that condition 'len==0' is not redundant
    if (len == 0) {
            ^
cli/xsum_sanity_check.c:571:19: note: Condition 'len>0' is always true
    } else if (len>0) {
                  ^
tests/bench/benchHash.c:112:55: error: Uninitialized variables: result.internal_never_ever_use_directly, result.error_result_never_ever_use_directly, result.error_tag_never_ever_use_directly [uninitvar]
    BMK_runTime_t const runTime = BMK_extract_runTime(result);
                                                      ^
tests/bench/benchHash.c:107:12: note: Assuming condition is false
    while (!BMK_isCompleted_TimedFn(txf)) {
           ^
tests/bench/benchHash.c:107:12: note: Assuming condition is false
    while (!BMK_isCompleted_TimedFn(txf)) {
           ^
tests/bench/benchHash.c:107:12: note: Assuming condition is false
    while (!BMK_isCompleted_TimedFn(txf)) {
           ^
tests/bench/benchHash.c:112:55: note: Uninitialized variables: result.internal_never_ever_use_directly, result.error_result_never_ever_use_directly, result.error_tag_never_ever_use_directly
    BMK_runTime_t const runTime = BMK_extract_runTime(result);
                                                      ^
tests/bench/benchfn.c:95:12: error: Uninitialized variable: outcome.error_result_never_ever_use_directly [uninitvar]
    return outcome;
           ^
tests/collisions/main.c:209:14: style: Same expression on both sides of '<='. [duplicateExpression]
    assert(m <= m);
             ^
make: *** [Makefile:387: cppcheck] Error 1

Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
2022-10-19 13:10:12 +08:00
Yann Collet
f035303b8a updated copyright years 2021-12-08 11:04:22 -08:00
Yann Collet
c11b0b96f8 fix #563
ensure that building test tools preserves compilation flags
including -std=c99 and -std=c++11
when invoked with CFLAGS pre-set
so that it properly compiles with gcc <= 4.8 .

reported by @t-mat.
2021-08-17 08:58:09 -07:00
Yann Collet
b23f2e19e5 simplify XXH3 reset
single function XXH3_reset_internal()
2020-12-09 15:40:03 -08:00
Yann Collet
88c11374f2 display boundaries of small tests 2020-11-26 10:19:04 -08:00
Yann Collet
2c992d0cc7 merge xxh3 implementation within xxhash.h
xxh3.h is no longer necessary
but remains available,
in case some programs do #include "xxh3.h" directly.

Also : bumped version number to v0.8.0
2020-07-23 10:24:51 -07:00
Yann Collet
49a4dd0c43 benchhash : removed fractional part 2020-06-20 07:52:56 -07:00
Yann Collet
ec2d1a7ec0 removed fractional part of bench measurement
to simplify importation
2020-06-20 00:08:42 -07:00
easyaspi314 (Devin)
c994f5c9ef Fix copyright years
- Replace '-present' with '-2020' (fixes #329)
 - Use correct format: Copyright (C) <year> <name of author>
 - Fix some obviously incorrect years from copy/paste i.e. avoid time travel
2020-03-08 21:28:43 -04:00
Yann Collet
ff5df558b7 changed xxhash.com links to https 2020-03-04 18:36:13 -08:00
easyaspi314 (Devin)
87e7d8b999 More typos, add some more documentation
- Remove most remaining spaces before punctuation
 - Fix a few missed copyright messages
 - Document the timer resolution workaround
 - Document XXH_mult32to64
   - I compiled GCC 3.2 and 4.2 just to test this, both are affected.
   - Make sure we downcast for __emulu
 - Other minor fixes
2020-03-03 12:10:19 -05:00
Yann Collet
a6c1ff95d9 updated a few links to https 2020-03-02 14:26:49 -08:00
easyaspi314 (Devin)
9eb91a3b53 Let the Great Typo Hunt commence!
Work in progress.

 - Fix many spelling/grammar issues, primarily in comments
 - Remove most spaces before punctuation
 - Update XXH3 comment
 - Wrap most comments to 80 columns
 - Unify most comments to use the same style
 - Use hexadecimal in the xxhash spec
 - Update help messages to better match POSIX/GNU conventions
 - Use HTML escapes in README.md to avoid UTF-8
 - Mark outdated benchmark/scores
2020-03-02 15:20:49 -05:00
Yann Collet
9e8468459f updated license
test tools are GPLv2
2020-03-01 14:27:29 -08:00
Yann Collet
dadcbc4a0f first commit of the brute-force collision tester 2020-02-28 16:28:43 -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
d3a76b3a28 attempt to reconcile usan and benchHash 2019-11-04 17:25:42 -08:00
Yann Collet
8e5fdcbe70 added benchHash compilation to test target 2019-10-11 08:12:25 -07:00
Yann Collet
da9fd1df10 aligned streaming implementation of 128bits with 64bits
also : added XXH128() to benchmark program
2019-07-19 17:28:09 -07:00
Yann Collet
03cfe3e5b1 benchHash : can distinguish hash names with same beginning 2019-06-18 13:48:59 -07:00
Yann Collet
593c514654 first midsize version
just for test with benchHash
2019-06-17 12:38:49 -07:00
Yann Collet
5902eb1cc1 Merge branch 'dev' into xxh3streamv2 2019-06-13 15:56:41 -07:00
Yann Collet
ac897bec29 alignment hint for auto-vectorizer
works great for AVX2, but not for SSE2 (?)

also : use char* to explicitly tell that no alignment guarantee is being made

also : slightly changed start address of last stripe's secret (-1)
so that it doesn't correspond to scrambler's secret.
2019-06-13 13:45:07 -07:00
Yann Collet
f083d6ed4a added make help target
fixed minor static analyzer warnings (cppcheck)
2019-05-03 10:14:42 -07:00
Yann Collet
10fa93895a benchhash: changed last length
save memory for long inputs
2019-05-02 15:54:21 -07:00
Yann Collet
d2b4af6d3f benchHash: added border case check 2019-05-02 14:23:52 -07:00
Yann Collet
893ed9ae24 benchHash : can select a hash by its name 2019-05-02 14:21:21 -07:00
Yann Collet
9faa336afc added command --list
to get all hash names
2019-05-02 14:03:59 -07:00
Yann Collet
6a5128ed38 benchHash : added -h command
to get detailed help.
2019-05-02 13:47:30 -07:00
Yann Collet
25d701cd79 updated benchfn from zstd
fixing a few portability issues
2019-04-16 16:46:21 -07:00
Leonid Yuriev
5008b9377e xxhash-bench: enable C99 explicitly. 2019-03-20 12:14:36 +03:00
Leonid Yuriev
803545993a xxhash-bench: fix U64/PTime confusion. 2019-03-20 11:51:26 +03:00
Yann Collet
51d90ffa88 minor adjustments 2019-03-19 19:09:10 -07:00
Yann Collet
0294aa4c3e removed LICENSE file
which was incorrect
2019-03-19 17:16:59 -07:00
Yann Collet
7e641ccaa5 reduced benchfn dependencies
makes it possible to remove
util.c, platform.h and mem.h
2019-03-19 17:13:54 -07:00
Yann Collet
feea6cbca4 added project tests/benchHash
designed for external integration.
2019-03-19 15:56:00 -07:00