Commit Graph

76 Commits

Author SHA1 Message Date
Yann Collet
c7d815c2ad fixed usan warning 2018-03-20 12:51:36 -07:00
Yann Collet
fd7ea04f49 make clean : added removal of Mac OS-X specific bin directories 2018-03-20 12:49:13 -07:00
Yann Collet
c3557bcbfd added target make check
`make test` does not contain platform-specific tests (32-bit, arm, etc.)

`make test-all` still includes them.
2018-03-20 10:50:45 -07:00
Yann Collet
4af72306da removed mingw32 specific declaration 2018-03-20 10:34:08 -07:00
Yann Collet
81118ba2f4 fixed assert() ensuring one-hash time evaluation > 1/2Billions
so that 1/time doesn't overflow U32
2018-02-19 01:36:09 -08:00
Yann Collet
b1175fec76 added make list target 2018-02-19 01:06:07 -08:00
Yann Collet
51edcaba40 added special mode 0 (-qq) for benchmark
only output the result in it/s with a comma
for later retrieval as .csv file
2018-02-18 17:54:58 -08:00
Yann Collet
deb2d0be22 can select to benchmark one specific test
new hidden command -b#
2018-02-18 17:43:16 -08:00
Yann Collet
9a4fe59dda improved timing for short inputs
by calling clock() (much) less often
2018-02-18 16:56:14 -08:00
Yann Collet
b1192827d7 added option -q
makes benchmark results less verbose
for easier storage into file.
2018-02-17 10:53:52 -08:00
Yann Collet
c39e4f9141 benchmark display presents it/s 2018-02-16 18:58:40 -08:00
Soojin Nam
c9c076c75b fix a trivial typo 2017-12-26 10:57:24 +09:00
Yann Collet
5c174cfa4e max line length at 120 (#115) 2017-10-09 12:26:59 -07:00
Yann Collet
75fdb38deb fixed minor display issue with xxh32sum
a final "." was displayed to the right of the filename
2017-08-21 13:27:49 -07:00
Yann Collet
d9e2c7bfd7 fixed potential realloc() error (#150) 2017-06-14 17:07:25 -07:00
Yann Collet
91ce5bf3b4 fixed valgrind warning 2016-08-14 04:28:17 +02:00
Yann Collet
e631a066f7 better, more comparable, bench at small keys 2016-08-14 03:31:34 +02:00
Yann Collet
4fc497b71a fixed minor ARM compilation warnings 2016-08-11 19:07:23 +02:00
Yann Collet
53c4511234 fixed minor warning under ARM compilation 2016-08-11 01:32:10 +02:00
Yann Collet
fd2e3e8bc6 fixed minor conversion warnings 2016-08-10 09:36:58 +02:00
Yann Collet
0e479116d6 removed date for reproducibility
minor `__inline`
2016-08-10 07:08:10 +02:00
Yann Collet
61c628549f Implemented @stbrumme suggestion in #79 2016-08-06 20:48:24 +02:00
Yann Collet
059f79421e fixed static analyzer warning 2016-06-06 14:25:18 +02:00
Yann Collet
5062cb111b changed XXH_PRIVATE_API to XXH_INCLUDE_BODY
now includes `xxhash.h` instead of `xxhash.c`, which feels more natural
2016-06-06 14:12:27 +02:00
Yann Collet
ad4c45bef1 removed useless inclusions 2016-05-28 02:29:32 +02:00
Yann Collet
4a218171ea created protected section XXH_STATIC_LINKING_ONLY within xxhash.h
expose definition of `XXH32_state_t` and `XXH64_state_t` in the new section
2016-05-28 02:14:28 +02:00
Yann Collet
18e0afee86 code simplification : XXH_round() 2016-04-08 03:57:04 +02:00
Yann Collet
01b8a8bd32 switched timer to <time.h> , clock_t 2016-04-08 01:50:06 +02:00
Yann Collet
4606739e54 Merge branch 'dev' of github.com:Cyan4973/xxHash into dev 2016-04-08 01:19:20 +02:00
Yann Collet
873833c81d modified bracket convention 2016-04-08 01:19:06 +02:00
Takayuki MATSUOKA
d3653a7c83 Add help usage_advanced() message for --version and --help 2016-02-22 22:17:12 +09:00
Takayuki MATSUOKA
45c322c8ac Add --help and --version
--help is alias of -h
--version is alias of -V
2016-02-22 22:12:43 +09:00
Takayuki MATSUOKA
7d17c88dec Add -w (alias of --warn) 2016-02-22 22:10:25 +09:00
Takayuki MATSUOKA
80c3562c60 Reorder operation to avoid warning for unary minus operator for unsigned type
For example, VC++ shows the following warnings:

1>  xxhsum.c
1>..\..\xxhsum.c(620): warning C4146: unary minus operator applied to unsigned type, result still unsigned
1>..\..\xxhsum.c(621): warning C4146: unary minus operator applied to unsigned type, result still unsigned

The folliwing thread is good pointer for unary minus operators behaviour:

C: unary minus operator behavior with unsigned operands
http://stackoverflow.com/questions/8026694/

> 6.2.5c9 says: A computation involving unsigned operands can never overflow,
> because a result that cannot be represented by the resulting unsigned
> integer type is reduced modulo the number that is one greater than the
> largest value that can be represented by the resulting type.
2016-02-19 23:33:22 +09:00
Takayuki MATSUOKA
ecfcc51b38 Add usage messages for usage() and usage_advanced()
All messages are copied from md5sum.c in GNU coreutils.
2016-02-19 23:21:43 +09:00
Takayuki MATSUOKA
9a648f76a8 Fix stdin input for "xxhsum -c -" 2016-01-25 18:59:01 +09:00
Takayuki MATSUOKA
2783350952 Add redundant case for gcc -Wswitch-enum
- gcc -Wswitch-enum warns them.  But this is completely false-positive.

xxhsum.c:956:13: warning: enumeration value ‘GetLine_ok’ not handled in switch [-Wswitch-enum]
             switch (getLineResult)
             ^
2016-01-22 15:06:25 +09:00
Takayuki MATSUOKA
779a60563e Remove unused value 2016-01-22 15:02:46 +09:00
Takayuki MATSUOKA
c93b51c22e Implement variable length line reader.
- Basic logic is same as GNU coreutil's lib/getline.c and lib/getdelim.c
 - Since this implementation fully depends on fgetc(), there is possible performance problem.
2016-01-22 14:53:32 +09:00
Takayuki MATSUOKA
2cfc7a2d6a Fix wrong format specifier (%ul -> %lu) 2016-01-22 14:37:27 +09:00
Takayuki MATSUOKA
5c8aab6e6a Fix line number related definitions
- To keep code simple, now line number is "unsigned long" instead of "size_t".
 - We use "%ul" to print unsigned long.
2016-01-22 13:22:35 +09:00
Takayuki MATSUOKA
80897236f9 Fix return value
- Return value must be 0 for error.
2016-01-22 13:19:19 +09:00
Takayuki MATSUOKA
f47e8e1ff8 Add file check mode "-c" and related switches.
- Add the following command line switches
    - "-c"/"--check" : read XXH32/64 sums from FILEs and check them.
    - "--quiet" : Don't print OK.
    - "--status" : Don't output anything to stdout/stderr.
    - "--strict" : Treat any invalid line as error.
    - "--warn" : Show warning message for invalid line.
 - If all checksum procedure is succeeded, exit code is 0.
    - Otherwise exit code is 1.

All avobe functions basic logics are inherited from md5sum.
2016-01-20 23:45:52 +09:00
Takayuki MATSUOKA
1090f766c2 Split hash generation function for reusing
- Add hash generation function BMK_hashStream() which generates hash value from file stream.
 - First argument void* is not violate strict aliasing, but dedicated union may be good for readability.
2016-01-20 23:06:35 +09:00
Takayuki MATSUOKA
36c1981263 Add default hash seed symbols 2016-01-20 22:18:53 +09:00
Yann Collet
a881289521 new canonical API, suggested by @t-mat (#45) 2016-01-14 03:01:39 +01:00
Yann Collet
b5e9b75d84 added _canonicalDigest() functions, as suggested by Takatuki Matsuoka (#45) 2016-01-11 01:31:04 +01:00
Yann Collet
ac50dc0631 Limit notification size to remain within line budget 2016-01-11 00:30:08 +01:00
Yann Collet
5aabc409d1 Added : --little-endian command 2016-01-10 17:06:34 +01:00
Yann Collet
dcf7bbf17a Clarified display convention as big endian (#45) 2016-01-07 23:54:51 +01:00