Hash_map: Changed Unique_hash_map implementation to use CGAL unordered_flat_map#9444
Conversation
|
As the underlying unordered flat map enables to remove we could add a |
We could but why not just call that Likewise add a
Not sure thats why it was fast, std::unordered_map has erase and uses a chained approach. Although I don't know if the scheme links into a block of data at the end of the table as per the LEDA implementation. I created a draft for chained map erase: #6493 Either way, flat maps seem to be the modern faster approach. Adding an erase would be useful for SNC_structure which uses a std::optional<Object_handle> to store "erased" handles in the map. |
Part of the understanding problem is that I am not sure if the other PR's got replaced or are still open, and if they are in a specific order to apply. |
I think despite the misleading comment, it actually falls back to cgal/STL_Extension/include/CGAL/unordered_flat_map.h Lines 31 to 34 in 2e165ee
|
|
Warning concerning the documentation here |
Summary of Changes
The map when using boost::unordered_flat_map uses cache friendly memory layout. The mulx mixing uses Fibonacci hashing, leading to a ~6-7% performance boost in the Nef_3_benchmark.
Release Management