Fast Generic Hash-Table Update

2 weeks ago 15

Recently, I wrote a post about my ee_dict generic C hash-table implementation (link)
ee_dict works without any template-like macro declarations required, all necessary information about type (size and alignment) is specified in runtime

u/jacksaccountonreddit did a benchmark (link) and compared my table with fast C/C++ ones (absl::flat_hash_map, boost::unordered_flat_map, CC, khashl, STC and Verstable)
The results show that ee_dict is often faster than khashl and STC, and in some cases even faster than absl.

We also had interesting discussions, and I implemented some of the reasonable suggestions:

  • Custom hash-functions support
  • Proper alignment for safe access to keys and values
  • Iterator over (key, value) pairs
  • Usage example

GitHub repository: https://github.com/eesuck1/eelib/tree/master

submitted by /u/eesuck0 to r/C_Programming
[link] [comments]
Read Entire Article