Conversation
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.
|
Hi team, Polite follow-up on this PR. The benchmarks show some interesting findings on reserve() performance and load factor impacts. Happy to make any changes or address feedback. |
|
Hi and thanks for your interest in Abseil. We actually do have benchmarks for flat_hash_map, but they are a little hard to find. Since we spend so many cycles across our datacenters in this code, it is pretty critical that actual performance changes are validated on production workloads, not microbenchmarks. See https://abseil.io/fast/39. |
Thanks for the clarification! This makes total sense - I should have checked the internal/ directory more carefully. I appreciate you taking the time to review. I'll close this PR. |
Adds benchmark suite for absl::flat_hash_map, the recommended default hash map that previously had no public benchmarks.
Benchmarks included:
Key findings from benchmark results:
Testing: All benchmarks compile and run successfully with Bazel.