diff options
| author | Soikk | 2022-07-30 17:35:47 +0200 |
|---|---|---|
| committer | Soikk | 2022-07-30 17:35:47 +0200 |
| commit | 0e95d2c61da7b7fbce76b0633313128b7440136e (patch) | |
| tree | 0b48a36d254376848c4b590663f34e7bbefed5ae /hash-testing | |
| parent | 272d8a037822e870ffbdfca4bc1df9d973e4de06 (diff) | |
| download | soikk-DB-0e95d2c61da7b7fbce76b0633313128b7440136e.tar.xz soikk-DB-0e95d2c61da7b7fbce76b0633313128b7440136e.tar.zst | |
added htable delete function
Diffstat (limited to 'hash-testing')
| -rw-r--r-- | hash-testing/main.c | 8 | ||||
| -rw-r--r-- | hash-testing/main.exe | bin | 0 -> 50706 bytes |
2 files changed, 5 insertions, 3 deletions
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 Binary files differnew file mode 100644 index 0000000..3d96212 --- /dev/null +++ b/hash-testing/main.exe |
