ctl
ctl copied to clipboard
Add stanford hash/swisstable as hashmap
stanford is optimal for integers (i.e. literals divisible by 256), greg7mdp/parallel-hashmap for strings and structs.
Converting swiss table or greg7mdp/parallel-hashmap from C++/SIMD might be too much work. stanford_hash is similar and good enough for now. EDIT: see LIMachi/swiss-table on github.
Try the o1hash from wyhash as default, but add security measures (collision counting or tree conversion, no sorted_vector yet)
See the hmap branch
Most of the work is needed for a proper/better map/umap API. Either
- go with pairs (a custom struct as strint.hh),
- or seperate the key from the value: TK for key type, T for the value. And have seperate free,copy methods for both.