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.
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.
- 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
- 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
- Add missing copyright for generate_unicode_test.c
- use my real name, whatever
- Fix blatantly incorrect copyright years
- Update copyright years in xxhash.c/xxhash.h
- Fix formatting
- More typo fixes in multiInclude.c
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
- Properly detect MSVC x86
- Make ARM more detailed - there are so many variants that change
xxHash's performance that "arm" or "arm + NEON" is not specific
enough.
- Make sure x86_64 and aarch64 show SSE2 and NEON respectively.
- Unicode filenames should now work, with a method that works with
and without Unicode mode on Windows.
- Added a test in the Makefile
- Use unbuffered stderr output on Windows, fixes output not updating
immediately on MinGW.
- Fix some missing $(EXT)s in the Makefile, causing Clang to emit
xxhsum instead of xxhsum.exe on Windows, as well as xxhsum's rule
ignoring $(FLAGS).
answering : https://github.com/Cyan4973/xxHash/issues/175#issuecomment-548108921
The probability of receiving an empty string is larger than random (> 1 / 2^64),
making the generated hash more "common".
For some algorithm, it's an issue if this "more common" value is 0.
Maps it instead to an avalanche of an arbitrary start value (prime64).
The start value is blended with the `seed` and the `secret`,
so that the result is dependent on those ones too.
Fixes#258.
```c
BYTE -> xxh_u8
U32 -> xxh_u32
U64 -> xxh_u64
```
Additionally, I hopefully fixed an issue for targets where int is 16
bits. XXH32 used unsigned int for its seed, and in C90 mode, unsigned
int as its U32. This would cause truncation issues. I check limits.h in
C90 mode to make sure UINT_MAX == 0xFFFFFFFFUL, and if it isn't, use
unsigned long.
We should see if we can set up an AVR CI test. Just to run the
verification program, though, as the benchmark will take a very long
time.
Lastly, the seed types are XXH32_hash_t and XXH64_hash_t for XXH32/64.
This matches xxhash.c and prevents the aforementioned 16-bit int bug.
Previously, XXH3_64bits looked much faster than XXH3_128bits. The truth
is that they are similar in long keys. The difference was that
XXH3_64b's benchmark was unseeded, putting it at an unfair advantage
over XXH128 which is seeded.
I don't think I am going to do the dummy bench. That made things moe
complicated.