Files
Matthew Fioravante c9f8ab57c7 ReplacePlaceholders - optimize using span
Eliminates memory allocations from temporary vectors
2020-08-23 14:29:44 -04:00

20 lines
429 B
C++

#include <benchmark/benchmark.h>
#include <font.h>
#include <rect.h>
#include <bitmap.h>
#include <text.h>
#include <pixel_format.h>
#include <cache.h>
static void BM_ReplacePlaceholders(benchmark::State& state) {
for (auto _: state) {
Utils::ReplacePlaceholders("One night is %V %U",
Utils::MakeArray('V', 'U'),
Utils::MakeSvArray("Rest", "Do not Rest"));
}
}
BENCHMARK(BM_ReplacePlaceholders);
BENCHMARK_MAIN();