diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-11-17 07:25:41 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-11-17 07:25:41 -0800 |
commit | 9108e9f8f4434fb29200b08a4b576df47c407c01 (patch) | |
tree | b30b49b3880238899e61de1352eb8e69c8d398b4 /alloca.h | |
parent | 1f2c8c8e1e709a91e6c25f02f3883f9624a1f7f7 (diff) | |
download | txr-9108e9f8f4434fb29200b08a4b576df47c407c01.tar.gz txr-9108e9f8f4434fb29200b08a4b576df47c407c01.tar.bz2 txr-9108e9f8f4434fb29200b08a4b576df47c407c01.zip |
hash: 64 bit string and buffer hashing and seeds.
* hash.c (randbox, hash_c_str, hash_buf): Separate
implementation for 64 bit pointers, using 64 bit random
values, and producing a 64 bit hash, taking in a 64 bit seed.
(gen_hash_seed): Use time_sec_nsec to get nanoseconds.
On 64 bit, put together the seed differently to generate
a wider value.
* tests/009/json.txr: Change from hash tables to lists,
so the order of the output doesn't change between 64 and 32
bits, due to the different string hashing.
* tests/009/json.expected: Updated.
* txr.1: Documented that seeds are up to 64 bits, but
with possibly only the lower 32 bits being used.
Diffstat (limited to 'alloca.h')
0 files changed, 0 insertions, 0 deletions