1 #include "benchmark/benchmark.h" 2 3 static void BM_StringCreation(benchmark::State& state) { 4 while (state.KeepRunning()) 5 std::string empty_string; 6 } 7 // Register the function as a benchmark 8 BENCHMARK(BM_StringCreation); 9 10