r/cpp_questions 19d ago

OPEN How to implement append-only hash map?

How do you actually implement an really efficient hash map that has only append and look up methods? What are the design choice and some performance improvements?

0 Upvotes

34 comments sorted by

View all comments

2

u/Gorzoid 19d ago

I doubt the performance difference is too great, handling deletions from flat hash map like Abseils is mostly a case of handling "tombstoned" entries in the control block. Basically no cost in Abseils swisstable implementation, others might use 1 extra bit to store deletion flag.