Hope see here full-featured C++-container implementing fast and compact open addressing hash table on C++.
Proof-of-concept (see benchmark.cpp) shows that such map can be 3x faster than std::unordered_map
.
API should be very like to std::unordered_map
, so approximate roadmap is:
- One more template type parameter
class Pred = std::equal_to<Key>
- Member function
at
- Member function
clear
- Member function
empty
- Member function
insert
- Member function
equal_range
- Member function
swap
- Member function
operator=
- Member functions
load_factor
,max_load_factor
,rehash
,reserve
- Constant members
- Member types:
difference_type
,hasher
,key_type
,mapped_type
,reference
,size_type
,value_type
,pointer
,const_reference
,key_equal
- Iterators: member types
iterator
,const_iterator
, member functionsbegin
,end
,cbegin
,cend
- Member function
emplace
- Member function
emplace_hint
- Relational operators
- Non-member function overload: swap
- Move semantics