Skip to content

Commit

Permalink
Add new benchmark cases for hashing string lengths 1,2,4,8.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 713766309
Change-Id: Ibfb26617633d56ddc3765991f5750a2b2a6a3cd1
  • Loading branch information
ezbr authored and copybara-github committed Jan 9, 2025
1 parent 2f016c4 commit f489ceb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions absl/hash/hash_benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@ MAKE_BENCHMARK(AbslHash, PairInt64Int64, std::pair<int64_t, int64_t>{});
MAKE_BENCHMARK(AbslHash, TupleInt32BoolInt64,
std::tuple<int32_t, bool, int64_t>{});
MAKE_BENCHMARK(AbslHash, String_0, std::string());
MAKE_BENCHMARK(AbslHash, String_1, std::string(1, 'a'));
MAKE_BENCHMARK(AbslHash, String_2, std::string(2, 'a'));
MAKE_BENCHMARK(AbslHash, String_4, std::string(4, 'a'));
MAKE_BENCHMARK(AbslHash, String_8, std::string(8, 'a'));
MAKE_BENCHMARK(AbslHash, String_10, std::string(10, 'a'));
MAKE_BENCHMARK(AbslHash, String_30, std::string(30, 'a'));
MAKE_BENCHMARK(AbslHash, String_90, std::string(90, 'a'));
Expand Down

0 comments on commit f489ceb

Please sign in to comment.