Skip to content

Commit

Permalink
Merge pull request #99 from contour-terminal/fix/benchmark
Browse files Browse the repository at this point in the history
Tiny fix to benchmark plus minor naming changes
  • Loading branch information
christianparpart authored Mar 17, 2024
2 parents 99c7dc9 + a5cb20f commit 22936a4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/libunicode/benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@
using std::string_view;

template <size_t L>
static void benchmarkWithLength(benchmark::State& state)
static void benchmarkWithLength(benchmark::State& benchmarkState)
{
auto TestText = std::string(L, 'a') + "\u00A9";
for (auto _: state)
for (auto _: benchmarkState)
{
benchmark::DoNotOptimize(unicode::detail::scan_for_text_ascii(TestText, L + 10));
}
}

template <size_t L>
static void benchmarkWithOffset(benchmark::State& state)
static void benchmarkWithOffset(benchmark::State& benchmarkState)
{
auto TestText = std::string(L, 'a') + "\u0001F600" + std::string(1000, 'a');
for (auto _: state)
auto TestText = std::string(L, 'a') + "\U0001F600" + std::string(1000, 'a');
for (auto _: benchmarkState)
{
benchmark::DoNotOptimize(unicode::detail::scan_for_text_ascii(TestText, L + 10));
}
Expand Down

0 comments on commit 22936a4

Please sign in to comment.