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

Function Parse1CachedOnePass

extern/re2/re2/testing/regexp_benchmark.cc:1273–1281  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1271}
1272
1273void Parse1CachedOnePass(benchmark::State& state, const char* regexp,
1274 const StringPiece& text) {
1275 Prog* prog = GetCachedProg(regexp);
1276 CHECK(prog->IsOnePass());
1277 StringPiece sp[2]; // 2 because sp[0] is whole match.
1278 for (auto _ : state) {
1279 CHECK(prog->SearchOnePass(text, text, Prog::kAnchored, Prog::kFullMatch, sp, 2));
1280 }
1281}
1282
1283void Parse1CachedBitState(benchmark::State& state, const char* regexp,
1284 const StringPiece& text) {

Callers

nothing calls this directly

Calls 3

GetCachedProgFunction · 0.85
IsOnePassMethod · 0.80
SearchOnePassMethod · 0.80

Tested by

no test coverage detected