Skip to content

[Core] Adding benchmarks for unordered_set and unordered_map#13570

Merged
loumalouomega merged 3 commits intomasterfrom
core/benchmark-unordered_set-and-unordered_map
Jul 1, 2025
Merged

[Core] Adding benchmarks for unordered_set and unordered_map#13570
loumalouomega merged 3 commits intomasterfrom
core/benchmark-unordered_set-and-unordered_map

Conversation

@loumalouomega
Copy link
Member

📝 Description

Adding benchmarks for unordered_set and unordered_map, ported from #12861, as transition PR, as it looks like that we may finally use a different library.

🆕 Changelog

@loumalouomega loumalouomega requested a review from a team as a code owner June 27, 2025 09:20
@loumalouomega loumalouomega added Kratos Core Benchmarking FastPR This Pr is simple and / or has been already tested and the revision should be fast Transition labels Jun 27, 2025
@loumalouomega loumalouomega enabled auto-merge June 27, 2025 09:21
loumalouomega and others added 2 commits June 30, 2025 17:22
Co-authored-by: Máté Kelemen <44344022+matekelemen@users.noreply.github.com>
@loumalouomega
Copy link
Member Author

Done

}
for (auto _ : state) {
for (const auto& val : data) {
benchmark::DoNotOptimize(umap.find(val));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this will really not be optimized out. I imagine this function allocates no memory, and the result is discarded immediately.

Anyway, we'll only find out when we actually run these benchmarks.

@loumalouomega loumalouomega merged commit f7d3184 into master Jul 1, 2025
11 checks passed
@loumalouomega loumalouomega deleted the core/benchmark-unordered_set-and-unordered_map branch July 1, 2025 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Benchmarking FastPR This Pr is simple and / or has been already tested and the revision should be fast Kratos Core Transition

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants