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

Function Parse3BitState

extern/re2/re2/testing/regexp_benchmark.cc:1089–1102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1087}
1088
1089void Parse3BitState(benchmark::State& state, const char* regexp,
1090 const StringPiece& text) {
1091 for (auto _ : state) {
1092 Regexp* re = Regexp::Parse(regexp, Regexp::LikePerl, NULL);
1093 CHECK(re);
1094 Prog* prog = re->CompileToProg(0);
1095 CHECK(prog);
1096 CHECK(prog->CanBitState());
1097 StringPiece sp[4]; // 4 because sp[0] is whole match.
1098 CHECK(prog->SearchBitState(text, text, Prog::kAnchored, Prog::kFullMatch, sp, 4));
1099 delete prog;
1100 re->Decref();
1101 }
1102}
1103
1104void Parse3Backtrack(benchmark::State& state, const char* regexp,
1105 const StringPiece& text) {

Callers

nothing calls this directly

Calls 5

ParseFunction · 0.85
CompileToProgMethod · 0.80
CanBitStateMethod · 0.80
SearchBitStateMethod · 0.80
DecrefMethod · 0.45

Tested by

no test coverage detected