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

Function Parse1CachedBitState

extern/re2/re2/testing/regexp_benchmark.cc:1283–1291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1281}
1282
1283void Parse1CachedBitState(benchmark::State& state, const char* regexp,
1284 const StringPiece& text) {
1285 Prog* prog = GetCachedProg(regexp);
1286 CHECK(prog->CanBitState());
1287 StringPiece sp[2]; // 2 because sp[0] is whole match.
1288 for (auto _ : state) {
1289 CHECK(prog->SearchBitState(text, text, Prog::kAnchored, Prog::kFullMatch, sp, 2));
1290 }
1291}
1292
1293void Parse1CachedBacktrack(benchmark::State& state, const char* regexp,
1294 const StringPiece& text) {

Callers

nothing calls this directly

Calls 3

GetCachedProgFunction · 0.85
CanBitStateMethod · 0.80
SearchBitStateMethod · 0.80

Tested by

no test coverage detected