diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2020-01-03 04:13:47 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2020-01-03 04:13:47 +0300 |
commit | 42820c4161edcabb1e36336d175bb8645f529df3 (patch) | |
tree | c65cec6d00a0494ea26b9f45903eb512f5e6e302 /test | |
parent | cmake: don't install benchmark the library (diff) | |
download | math-server-42820c4161edcabb1e36336d175bb8645f529df3.tar.gz math-server-42820c4161edcabb1e36336d175bb8645f529df3.zip |
lexer: add alternative boost::regex implementations
Diffstat (limited to '')
-rw-r--r-- | test/benchmarks/lexer.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/test/benchmarks/lexer.cpp b/test/benchmarks/lexer.cpp index 0f3151f..4279d8b 100644 --- a/test/benchmarks/lexer.cpp +++ b/test/benchmarks/lexer.cpp @@ -15,11 +15,20 @@ protected: }; }; -BENCHMARK_F(SelectionOfNumbers, ParseStdRegex)(benchmark::State &state) { +BENCHMARK_F(SelectionOfNumbers, ParseStdRegex)(benchmark::State& state) { using namespace math::server::lexer::details; for (auto _ : state) { for (const auto& src : m_numbers) { - parse_number(src); + impl::std_parse_number(src); + } + } +} + +BENCHMARK_F(SelectionOfNumbers, ParseBoostRegex)(benchmark::State& state) { + using namespace math::server::lexer::details; + for (auto _ : state) { + for (const auto& src : m_numbers) { + impl::boost_parse_number(src); } } } |