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

Function SimplifyCompileRegexp

extern/re2/re2/testing/regexp_benchmark.cc:676–688  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

674}
675
676void SimplifyCompileRegexp(benchmark::State& state, const std::string& regexp) {
677 for (auto _ : state) {
678 Regexp* re = Regexp::Parse(regexp, Regexp::LikePerl, NULL);
679 CHECK(re);
680 Regexp* sre = re->Simplify();
681 CHECK(sre);
682 Prog* prog = sre->CompileToProg(0);
683 CHECK(prog);
684 delete prog;
685 sre->Decref();
686 re->Decref();
687 }
688}
689
690void CompileRegexp(benchmark::State& state, const std::string& regexp) {
691 for (auto _ : state) {

Callers

nothing calls this directly

Calls 4

ParseFunction · 0.85
CompileToProgMethod · 0.80
SimplifyMethod · 0.45
DecrefMethod · 0.45

Tested by

no test coverage detected