hash table impl
parent
3e5d58fa72
commit
112d0bbb8e
|
@ -0,0 +1,22 @@
|
|||
// A simple/fast(?) hash table.
|
||||
|
||||
#ifndef ED_HT_INCLUDED
|
||||
#define ED_HT_INCLUDED
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include "string.h"
|
||||
|
||||
// see <https://en.wikipedia.org/wiki/Fowler–Noll–Vo_hash_function>
|
||||
#define FNV_OFFSET 14695981039346656037UL
|
||||
#define FNV_PRIME 1099511628211UL
|
||||
|
||||
typedef struct {
|
||||
|
||||
} ed_ht_slot;
|
||||
|
||||
typedef struct {
|
||||
ed_ht_slot *slots;
|
||||
size_t capacity;
|
||||
} ed_ht;
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue