diff options
author | H. Peter Anvin <hpa@zytor.com> | 2007-10-02 17:40:00 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2007-10-02 17:40:00 -0700 |
commit | a59795c9860a9a31e6ccf3555ef0e0ca04a0dd87 (patch) | |
tree | 608679c4a8021e3e2e28644d1e3059a5e0091e4c /hashtbl.h | |
parent | 17394a7d8e3240c6dafddab7725d953904208e5a (diff) | |
download | nasm-a59795c9860a9a31e6ccf3555ef0e0ca04a0dd87.tar.gz |
Use the crc64 we already use as the perfect hash function prehash
Use the same crc64 that we already use for the symbol table hash as
the perfect hash function prehash. We appear to get radically faster
convergence this way, and the crc64 is probably *faster*, since the
table likely to be resident in memory.
Diffstat (limited to 'hashtbl.h')
-rw-r--r-- | hashtbl.h | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -30,8 +30,10 @@ struct hash_insert { struct hash_tbl_node *where; }; -uint64_t crc64(const char *string); -uint64_t crc64i(const char *string); +uint64_t crc64(uint64_t crc, const char *string); +uint64_t crc64i(uint64_t crc, const char *string); +#define CRC64_INIT UINT64_C(0xffffffffffffffff) + struct hash_table *hash_init(void); void **hash_find(struct hash_table *head, const char *string, struct hash_insert *insert); |