From 0e95d2c61da7b7fbce76b0633313128b7440136e Mon Sep 17 00:00:00 2001 From: Soikk Date: Sat, 30 Jul 2022 17:35:47 +0200 Subject: added htable delete function --- hash-testing/main.c | 8 +++++--- hash-testing/main.exe | Bin 0 -> 50706 bytes 2 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 hash-testing/main.exe (limited to 'hash-testing') diff --git a/hash-testing/main.c b/hash-testing/main.c index f95b391..23fdbbd 100644 --- a/hash-testing/main.c +++ b/hash-testing/main.c @@ -344,11 +344,13 @@ int main(){ while (fgets(line, sizeof(line), f)) { uint16_t l; char *nline = normalizeStr(line, &l); - uint64_t hash = crc64(0, nline, l); - if(isInArr(arr, hash)){ + uint64_t hash = crc64(SEED, nline, l); + //uint32_t hash = xcrc32(nline, l, SEED); + //uint32_t hash = murmurhash(nline, l, SEED); + /*if(isInArr(arr, hash)){ ++collisions; } - arr[i] = hash; + arr[i] = hash;*/ //printf("%s\t%08x\n", nline, hash); ++i; } diff --git a/hash-testing/main.exe b/hash-testing/main.exe new file mode 100644 index 0000000..3d96212 Binary files /dev/null and b/hash-testing/main.exe differ -- cgit v1.2.3