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

Function Parse1BitState

extern/re2/re2/testing/regexp_benchmark.cc:1228–1241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1226}
1227
1228void Parse1BitState(benchmark::State& state, const char* regexp,
1229 const StringPiece& text) {
1230 for (auto _ : state) {
1231 Regexp* re = Regexp::Parse(regexp, Regexp::LikePerl, NULL);
1232 CHECK(re);
1233 Prog* prog = re->CompileToProg(0);
1234 CHECK(prog);
1235 CHECK(prog->CanBitState());
1236 StringPiece sp[2]; // 2 because sp[0] is whole match.
1237 CHECK(prog->SearchBitState(text, text, Prog::kAnchored, Prog::kFullMatch, sp, 2));
1238 delete prog;
1239 re->Decref();
1240 }
1241}
1242
1243void Parse1PCRE(benchmark::State& state, const char* regexp,
1244 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