KratosMultiphysics / Kratos

Kratos Multiphysics (A.K.A Kratos) is a framework for building parallel multi-disciplinary simulation software. Modularity, extensibility and HPC are the main objectives. Kratos has BSD license and is written in C++ with extensive Python interface.
https://kratosmultiphysics.github.io/Kratos/
Other
1.05k stars 246 forks source link

[Core] Adding hashed containers (currently STL) #12856

Closed loumalouomega closed 6 days ago

loumalouomega commented 6 days ago

📝 Description

This PR introduces unordered_set and unordered_map aliases, in line with the way Kratos defines smart pointers as replacements for STL ones. Historically, this practice originated from our use of Boost smart pointers.

Implementation Details

This lays the groundwork for potential optimizations while maintaining compatibility with existing functionality.

🆕 Changelog

roigcarlo commented 6 days ago

Mm I don't really see the reason to start changing all the containers now.

Which alternatives are you planning to use? Will be compatible with ranges etc?

loumalouomega commented 6 days ago

Mm I don't really see the reason to start changing all the containers now.

In this PR I am not changing anything. Just adding aliases, I will not full replace all unordered_set and maps at once, if someone wants to replace should do it by himself. For example I have several implementation that may benefice from this.

Which alternatives are you planning to use? Will be compatible with ranges etc?

https://martin.ankerl.com/2022/08/27/hashmap-bench-01/

ankerl in my tests is also the faster solution.