summaryrefslogtreecommitdiff
path: root/absl/time/internal/cctz/src/cctz_benchmark.cc
diff options
context:
space:
mode:
Diffstat (limited to 'absl/time/internal/cctz/src/cctz_benchmark.cc')
-rw-r--r--absl/time/internal/cctz/src/cctz_benchmark.cc14
1 files changed, 6 insertions, 8 deletions
diff --git a/absl/time/internal/cctz/src/cctz_benchmark.cc b/absl/time/internal/cctz/src/cctz_benchmark.cc
index f13cb4ee..c97df78c 100644
--- a/absl/time/internal/cctz/src/cctz_benchmark.cc
+++ b/absl/time/internal/cctz/src/cctz_benchmark.cc
@@ -754,23 +754,21 @@ void BM_Zone_LoadAllTimeZonesCached(benchmark::State& state) {
}
BENCHMARK(BM_Zone_LoadAllTimeZonesCached);
-void BM_Zone_TimeZoneImplGetImplicit(benchmark::State& state) {
+void BM_Zone_TimeZoneEqualityImplicit(benchmark::State& state) {
cctz::time_zone tz; // implicit UTC
- cctz::time_zone::Impl::get(tz);
while (state.KeepRunning()) {
- cctz::time_zone::Impl::get(tz);
+ benchmark::DoNotOptimize(tz == tz);
}
}
-BENCHMARK(BM_Zone_TimeZoneImplGetImplicit);
+BENCHMARK(BM_Zone_TimeZoneEqualityImplicit);
-void BM_Zone_TimeZoneImplGetExplicit(benchmark::State& state) {
+void BM_Zone_TimeZoneEqualityExplicit(benchmark::State& state) {
cctz::time_zone tz = cctz::utc_time_zone(); // explicit UTC
- cctz::time_zone::Impl::get(tz);
while (state.KeepRunning()) {
- cctz::time_zone::Impl::get(tz);
+ benchmark::DoNotOptimize(tz == tz);
}
}
-BENCHMARK(BM_Zone_TimeZoneImplGetExplicit);
+BENCHMARK(BM_Zone_TimeZoneEqualityExplicit);
void BM_Zone_UTCTimeZone(benchmark::State& state) {
cctz::time_zone tz;