Skip to content

Conversation

@loci-dev
Copy link

Mirrored from abseil/abseil-cpp#1996

Adds benchmark suite for absl::flat_hash_map, the recommended default hash map that previously had no public benchmarks.

Benchmarks included:

  • Basic operations (insert, lookup hit/miss) for int and string keys
  • Load factor analysis at 25%, 50%, 75%, and 87% capacity
  • Iteration performance at different load factors
  • Reserve vs no-reserve comparison across multiple sizes

Key findings from benchmark results:

  • reserve() provides 20-24% performance improvement for known sizes
  • Load factor has minimal impact on lookup speed (~2.1-2.2M ops/sec)
  • Higher load factors improve iteration by 30% (better cache locality)
  • Failed lookups are 50% faster than successful lookups

Testing: All benchmarks compile and run successfully with Bazel.

Adds benchmark suite for absl::flat_hash_map, the recommended default
hash map that previously had no public benchmarks.

Benchmarks included:
- Basic operations (insert, lookup hit/miss) for int and string keys
- Load factor analysis at 25%, 50%, 75%, and 87% capacity
- Iteration performance at different load factors
- Reserve vs no-reserve comparison across multiple sizes

Key findings from benchmark results:
- reserve() provides 20-24% performance improvement for known sizes
- Load factor has minimal impact on lookup speed (~2.1-2.2M ops/sec)
- Higher load factors improve iteration by 30% (better cache locality)
- Failed lookups are 50% faster than successful lookups

Testing: All benchmarks compile and run successfully with Bazel.
@loci-agentic-ai
Copy link

Explore the complete analysis inside the Version Insights

@loci-dev loci-dev force-pushed the master branch 3 times, most recently from 4069466 to bba4b70 Compare January 22, 2026 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants