Open loumalouomega opened 5 days ago
* [`tsl::robin_map`](https://github.com/Tessil/robin-map)
This one is super slow at least for moderate sizes in my own tests.
If you are not familiar with google's benchmark framework, I can shoot you an example with
std::unordered_map
and you can build on top of that for the other implementations.
I would like to have something standarized in Kratos instead of just hand made each time. It is not possible to reuse our GTest infrastructure?
* [`tsl::robin_map`](https://github.com/Tessil/robin-map)
This one is super slow at least for moderate sizes in my own tests.
Maybe, but that just highlights the dangers of taking devs benchmarks of their own libs at face value. The author of tsl::robin_map
also did a benchmark that painted his own implementation in a rather flattering light.
If you are not familiar with google's benchmark framework, I can shoot you an example with
std::unordered_map
and you can build on top of that for the other implementations.I would like to have something standarized in Kratos instead of just hand made each time. It is not possible to reuse our GTest infrastructure?
I'm all for something standardized, but GTest is definitely not a benchmarking library. Google's framework is pretty simple and very popular, but I'm open to other suggestions.
* [`tsl::robin_map`](https://github.com/Tessil/robin-map)
This one is super slow at least for moderate sizes in my own tests.
Maybe, but that just highlights the dangers of taking devs benchmarks of their own libs at face value. The author of
tsl::robin_map
also did a benchmark that painted his own implementation in a rather flattering light.
Yes, in fcat this was the first one I tried and it was the slowest one of all I tried.
If you are not familiar with google's benchmark framework, I can shoot you an example with
std::unordered_map
and you can build on top of that for the other implementations.I would like to have something standarized in Kratos instead of just hand made each time. It is not possible to reuse our GTest infrastructure?
I'm all for something standardized, but GTest is definitely not a benchmarking library. Google's framework is pretty simple and very popular, but I'm open to other suggestions.
Maybe we can at least add a cmake loop to compile the benchmarks ...
Maybe we can at least add a cmake loop to compile the benchmarks ...
I'd put the benchmarks in a different repo, similar to how we deal with examples.
Maybe we can at least add a cmake loop to compile the benchmarks ...
I'd put the benchmarks in a different repo, similar to how we deal with examples.
Usually code of benchmakes is not very different from tests. Examples are huge in comparison.
Tonadd my two cents to Mate'@ comments:
📝 Description
Introduction
Adding
ankerl
unordered_dense
, which provides top performance hashsed iterators: https://martin.ankerl.com/2022/08/27/hashmap-bench-01/. MIT license and header only.Initial testing during efforts to modernize
data_value_container, at the end current brute force solution for small number of variables is faster, but I found that
ankerl` in my tests was the faster solution.The using them to replace our current containers (not used anywhere).
Key Features
Performance:
Robin Hood Hashing:
Template Customization:
Hashing Algorithm:
wyhash
, a fast and high-quality hashing algorithm.API Compatibility:
std::unordered_map
andstd::unordered_set
.extract
for moving data andreplace
for bulk updates.Exception Safety:
Modular and Extensible:
C++17 and Higher:
std::optional
,std::tuple
, and advanced template metaprogramming.Main Components
Hashing:
hash
template, supporting standard types, strings, and custom objects.Buckets:
Bucket
structure stores metadata (distance
andfingerprint
) and an index into the value container.Data Storage:
segmented_vector
orstd::vector
to store data contiguously.segmented_map
orsegmented_set
) improves memory management for large datasets.Load Factor:
Transparent Lookup:
std::string_view
forstd::string
keys).Iterators:
std::unordered_map
.🆕 Changelog
ankerl
unordered_dense