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

Function SearchBitState

extern/re2/re2/testing/regexp_benchmark.cc:898–912  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

896}
897
898void SearchBitState(benchmark::State& state, const char* regexp,
899 const StringPiece& text, Prog::Anchor anchor,
900 bool expect_match) {
901 for (auto _ : state) {
902 Regexp* re = Regexp::Parse(regexp, Regexp::LikePerl, NULL);
903 CHECK(re);
904 Prog* prog = re->CompileToProg(0);
905 CHECK(prog);
906 CHECK(prog->CanBitState());
907 CHECK_EQ(prog->SearchBitState(text, text, anchor, Prog::kFirstMatch, NULL, 0),
908 expect_match);
909 delete prog;
910 re->Decref();
911 }
912}
913
914void SearchPCRE(benchmark::State& state, const char* regexp,
915 const StringPiece& text, Prog::Anchor anchor,

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