Skip to content

Commit

Permalink
[benchmark] Rename parameter state to benchmarkState to be more obvio…
Browse files Browse the repository at this point in the history
…us (prep-work for the future :) )

Signed-off-by: Christian Parpart <[email protected]>
  • Loading branch information
christianparpart committed Mar 17, 2024
1 parent b44f921 commit a5cb20f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 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)
for (auto _: benchmarkState)
{
benchmark::DoNotOptimize(unicode::detail::scan_for_text_ascii(TestText, L + 10));
}
Expand Down

0 comments on commit a5cb20f

Please sign in to comment.