martinus / map_benchmark

Comprehensive benchmarks of C++ maps
MIT License
299 stars 29 forks source link

Would please add also the copy-on-write hashmap from Asteria? #21

Closed lhmouse closed 2 years ago

lhmouse commented 2 years ago

Source code is available at https://github.com/lhmouse/asteria/blob/master/rocket/cow_hashmap.hpp.

The interface of this container is very similar to std::unordered_map, except that:

  1. begin(), find() etc. return const_iterator. In order to get mutable iterators, it is necessary to call mut_begin(), mut_find() etc.
  2. equal_range() is not supported.
  3. Iterators are bidirectional.
  4. There are no bucket iterators.
  5. erase() may invalidate iterators.
  6. Incomplete types are allowed, even when the destructor is referenced.

Thanks in advance.

martinus commented 2 years ago

I accept pull requests!

lhmouse commented 2 years ago

Thank you. Will do that.