ctl icon indicating copy to clipboard operation
ctl copied to clipboard

Add stanford hash/swisstable as hashmap

Open rurban opened this issue 4 years ago • 2 comments

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)

rurban avatar Feb 08 '21 18:02 rurban

See the hmap branch

rurban avatar Mar 26 '21 21:03 rurban

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.

rurban avatar Apr 24 '21 16:04 rurban