MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / FullMatchRE2

Function FullMatchRE2

extern/re2/re2/testing/regexp_benchmark.cc:1493–1501  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1491}
1492
1493void FullMatchRE2(benchmark::State& state, const char *regexp) {
1494 std::string s = RandomText(state.range(0));
1495 s += "ABCDEFGHIJ";
1496 RE2 re(regexp, RE2::Latin1);
1497 for (auto _ : state) {
1498 CHECK(RE2::FullMatch(s, re));
1499 }
1500 state.SetBytesProcessed(state.iterations() * state.range(0));
1501}
1502
1503void FullMatch_DotStar_CachedPCRE(benchmark::State& state) { FullMatchPCRE(state, "(?s).*"); }
1504void FullMatch_DotStar_CachedRE2(benchmark::State& state) { FullMatchRE2(state, "(?s).*"); }

Calls 4

RandomTextFunction · 0.85
rangeMethod · 0.80
SetBytesProcessedMethod · 0.80
iterationsMethod · 0.80

Tested by

no test coverage detected