Lines Matching full:benchmark
14 #include "util/benchmark.h"
128 typedef void SearchImpl(benchmark::State& state, const char* regexp,
136 typedef void ParseImpl(benchmark::State& state, const char* regexp,
151 // Benchmark: failed search for regexp in random text.
170 void Search(benchmark::State& state, const char* regexp, SearchImpl* search) { in Search()
200 void Search_Easy0_CachedDFA(benchmark::State& state) { Search(state, EASY0, SearchCachedDFA); } in Search_Easy0_CachedDFA()
201 void Search_Easy0_CachedNFA(benchmark::State& state) { Search(state, EASY0, SearchCachedNFA); } in Search_Easy0_CachedNFA()
202 void Search_Easy0_CachedPCRE(benchmark::State& state) { Search(state, EASY0, SearchCachedPCRE); } in Search_Easy0_CachedPCRE()
203 void Search_Easy0_CachedRE2(benchmark::State& state) { Search(state, EASY0, SearchCachedRE2); } in Search_Easy0_CachedRE2()
212 void Search_Easy1_CachedDFA(benchmark::State& state) { Search(state, EASY1, SearchCachedDFA); } in Search_Easy1_CachedDFA()
213 void Search_Easy1_CachedNFA(benchmark::State& state) { Search(state, EASY1, SearchCachedNFA); } in Search_Easy1_CachedNFA()
214 void Search_Easy1_CachedPCRE(benchmark::State& state) { Search(state, EASY1, SearchCachedPCRE); } in Search_Easy1_CachedPCRE()
215 void Search_Easy1_CachedRE2(benchmark::State& state) { Search(state, EASY1, SearchCachedRE2); } in Search_Easy1_CachedRE2()
224 void Search_Medium_CachedDFA(benchmark::State& state) { Search(state, MEDIUM, SearchCachedDFA);… in Search_Medium_CachedDFA()
225 void Search_Medium_CachedNFA(benchmark::State& state) { Search(state, MEDIUM, SearchCachedNFA);… in Search_Medium_CachedNFA()
226 void Search_Medium_CachedPCRE(benchmark::State& state) { Search(state, MEDIUM, SearchCachedPCRE)… in Search_Medium_CachedPCRE()
227 void Search_Medium_CachedRE2(benchmark::State& state) { Search(state, MEDIUM, SearchCachedRE2);… in Search_Medium_CachedRE2()
236 void Search_Hard_CachedDFA(benchmark::State& state) { Search(state, HARD, SearchCachedDFA); } in Search_Hard_CachedDFA()
237 void Search_Hard_CachedNFA(benchmark::State& state) { Search(state, HARD, SearchCachedNFA); } in Search_Hard_CachedNFA()
238 void Search_Hard_CachedPCRE(benchmark::State& state) { Search(state, HARD, SearchCachedPCRE); } in Search_Hard_CachedPCRE()
239 void Search_Hard_CachedRE2(benchmark::State& state) { Search(state, HARD, SearchCachedRE2); } in Search_Hard_CachedRE2()
248 void Search_Fanout_CachedDFA(benchmark::State& state) { Search(state, FANOUT, SearchCachedDFA);… in Search_Fanout_CachedDFA()
249 void Search_Fanout_CachedNFA(benchmark::State& state) { Search(state, FANOUT, SearchCachedNFA);… in Search_Fanout_CachedNFA()
250 void Search_Fanout_CachedPCRE(benchmark::State& state) { Search(state, FANOUT, SearchCachedPCRE)… in Search_Fanout_CachedPCRE()
251 void Search_Fanout_CachedRE2(benchmark::State& state) { Search(state, FANOUT, SearchCachedRE2);… in Search_Fanout_CachedRE2()
260 void Search_Parens_CachedDFA(benchmark::State& state) { Search(state, PARENS, SearchCachedDFA);… in Search_Parens_CachedDFA()
261 void Search_Parens_CachedNFA(benchmark::State& state) { Search(state, PARENS, SearchCachedNFA);… in Search_Parens_CachedNFA()
262 void Search_Parens_CachedPCRE(benchmark::State& state) { Search(state, PARENS, SearchCachedPCRE)… in Search_Parens_CachedPCRE()
263 void Search_Parens_CachedRE2(benchmark::State& state) { Search(state, PARENS, SearchCachedRE2);… in Search_Parens_CachedRE2()
272 void SearchBigFixed(benchmark::State& state, SearchImpl* search) { in SearchBigFixed()
283 void Search_BigFixed_CachedDFA(benchmark::State& state) { SearchBigFixed(state, SearchCachedDFA… in Search_BigFixed_CachedDFA()
284 void Search_BigFixed_CachedNFA(benchmark::State& state) { SearchBigFixed(state, SearchCachedNFA… in Search_BigFixed_CachedNFA()
285 void Search_BigFixed_CachedPCRE(benchmark::State& state) { SearchBigFixed(state, SearchCachedPCR… in Search_BigFixed_CachedPCRE()
286 void Search_BigFixed_CachedRE2(benchmark::State& state) { SearchBigFixed(state, SearchCachedRE2… in Search_BigFixed_CachedRE2()
295 // Benchmark: FindAndConsume
297 void FindAndConsume(benchmark::State& state) { in FindAndConsume()
313 // Benchmark: successful anchored search.
315 void SearchSuccess(benchmark::State& state, const char* regexp, in SearchSuccess()
325 void Search_Success_DFA(benchmark::State& state) { SearchSuccess(state, ".*$", SearchDFA); } in Search_Success_DFA()
326 void Search_Success_NFA(benchmark::State& state) { SearchSuccess(state, ".*$", SearchNFA); } in Search_Success_NFA()
327 void Search_Success_PCRE(benchmark::State& state) { SearchSuccess(state, ".*$", SearchPCRE); } in Search_Success_PCRE()
328 void Search_Success_RE2(benchmark::State& state) { SearchSuccess(state, ".*$", SearchRE2); } in Search_Success_RE2()
329 void Search_Success_OnePass(benchmark::State& state) { SearchSuccess(state, ".*$", SearchOnePass); } in Search_Success_OnePass()
339 void Search_Success_CachedDFA(benchmark::State& state) { SearchSuccess(state, ".*$", SearchCach… in Search_Success_CachedDFA()
340 void Search_Success_CachedNFA(benchmark::State& state) { SearchSuccess(state, ".*$", SearchCach… in Search_Success_CachedNFA()
341 void Search_Success_CachedPCRE(benchmark::State& state) { SearchSuccess(state, ".*$", SearchCach… in Search_Success_CachedPCRE()
342 void Search_Success_CachedRE2(benchmark::State& state) { SearchSuccess(state, ".*$", SearchCach… in Search_Success_CachedRE2()
343 void Search_Success_CachedOnePass(benchmark::State& state) { SearchSuccess(state, ".*$", SearchCach… in Search_Success_CachedOnePass()
356 void Search_Success1_DFA(benchmark::State& state) { SearchSuccess(state, ".*\\C$", SearchDFA);… in Search_Success1_DFA()
357 void Search_Success1_NFA(benchmark::State& state) { SearchSuccess(state, ".*\\C$", SearchNFA);… in Search_Success1_NFA()
358 void Search_Success1_PCRE(benchmark::State& state) { SearchSuccess(state, ".*\\C$", SearchPCRE)… in Search_Success1_PCRE()
359 void Search_Success1_RE2(benchmark::State& state) { SearchSuccess(state, ".*\\C$", SearchRE2);… in Search_Success1_RE2()
360 void Search_Success1_BitState(benchmark::State& state) { SearchSuccess(state, ".*\\C$", SearchBitSt… in Search_Success1_BitState()
370 void Search_Success1_CachedDFA(benchmark::State& state) { SearchSuccess(state, ".*\\C$", Searc… in Search_Success1_CachedDFA()
371 void Search_Success1_CachedNFA(benchmark::State& state) { SearchSuccess(state, ".*\\C$", Searc… in Search_Success1_CachedNFA()
372 void Search_Success1_CachedPCRE(benchmark::State& state) { SearchSuccess(state, ".*\\C$", Searc… in Search_Success1_CachedPCRE()
373 void Search_Success1_CachedRE2(benchmark::State& state) { SearchSuccess(state, ".*\\C$", Searc… in Search_Success1_CachedRE2()
374 void Search_Success1_CachedBitState(benchmark::State& state) { SearchSuccess(state, ".*\\C$", Searc… in Search_Success1_CachedBitState()
384 // Benchmark: AltMatch optimisation (just to verify that it works)
387 void SearchAltMatch(benchmark::State& state, SearchImpl* search) { in SearchAltMatch()
394 void Search_AltMatch_DFA(benchmark::State& state) { SearchAltMatch(state, SearchDFA); } in Search_AltMatch_DFA()
395 void Search_AltMatch_NFA(benchmark::State& state) { SearchAltMatch(state, SearchNFA); } in Search_AltMatch_NFA()
396 void Search_AltMatch_OnePass(benchmark::State& state) { SearchAltMatch(state, SearchOnePass); } in Search_AltMatch_OnePass()
397 void Search_AltMatch_BitState(benchmark::State& state) { SearchAltMatch(state, SearchBitState); } in Search_AltMatch_BitState()
398 void Search_AltMatch_PCRE(benchmark::State& state) { SearchAltMatch(state, SearchPCRE); } in Search_AltMatch_PCRE()
399 void Search_AltMatch_RE2(benchmark::State& state) { SearchAltMatch(state, SearchRE2); } in Search_AltMatch_RE2()
410 void Search_AltMatch_CachedDFA(benchmark::State& state) { SearchAltMatch(state, SearchCachedDF… in Search_AltMatch_CachedDFA()
411 void Search_AltMatch_CachedNFA(benchmark::State& state) { SearchAltMatch(state, SearchCachedNF… in Search_AltMatch_CachedNFA()
412 void Search_AltMatch_CachedOnePass(benchmark::State& state) { SearchAltMatch(state, SearchCachedOn… in Search_AltMatch_CachedOnePass()
413 void Search_AltMatch_CachedBitState(benchmark::State& state) { SearchAltMatch(state, SearchCachedBi… in Search_AltMatch_CachedBitState()
414 void Search_AltMatch_CachedPCRE(benchmark::State& state) { SearchAltMatch(state, SearchCachedPC… in Search_AltMatch_CachedPCRE()
415 void Search_AltMatch_CachedRE2(benchmark::State& state) { SearchAltMatch(state, SearchCachedRE… in Search_AltMatch_CachedRE2()
426 // Benchmark: use regexp to find phone number.
428 void SearchDigits(benchmark::State& state, SearchImpl* search) { in SearchDigits()
434 void Search_Digits_DFA(benchmark::State& state) { SearchDigits(state, SearchDFA); } in Search_Digits_DFA()
435 void Search_Digits_NFA(benchmark::State& state) { SearchDigits(state, SearchNFA); } in Search_Digits_NFA()
436 void Search_Digits_OnePass(benchmark::State& state) { SearchDigits(state, SearchOnePass); } in Search_Digits_OnePass()
437 void Search_Digits_PCRE(benchmark::State& state) { SearchDigits(state, SearchPCRE); } in Search_Digits_PCRE()
438 void Search_Digits_RE2(benchmark::State& state) { SearchDigits(state, SearchRE2); } in Search_Digits_RE2()
439 void Search_Digits_BitState(benchmark::State& state) { SearchDigits(state, SearchBitState); } in Search_Digits_BitState()
441 BENCHMARK(Search_Digits_DFA)->ThreadRange(1, NumCPUs());
442 BENCHMARK(Search_Digits_NFA)->ThreadRange(1, NumCPUs());
443 BENCHMARK(Search_Digits_OnePass)->ThreadRange(1, NumCPUs());
445 BENCHMARK(Search_Digits_PCRE)->ThreadRange(1, NumCPUs());
447 BENCHMARK(Search_Digits_RE2)->ThreadRange(1, NumCPUs());
448 BENCHMARK(Search_Digits_BitState)->ThreadRange(1, NumCPUs());
450 // Benchmark: use regexp to parse digit fields in phone number.
452 void Parse3Digits(benchmark::State& state, in Parse3Digits()
453 void (*parse3)(benchmark::State&, const char*, in Parse3Digits()
459 void Parse_Digits_NFA(benchmark::State& state) { Parse3Digits(state, Parse3NFA); } in Parse_Digits_NFA()
460 void Parse_Digits_OnePass(benchmark::State& state) { Parse3Digits(state, Parse3OnePass); } in Parse_Digits_OnePass()
461 void Parse_Digits_PCRE(benchmark::State& state) { Parse3Digits(state, Parse3PCRE); } in Parse_Digits_PCRE()
462 void Parse_Digits_RE2(benchmark::State& state) { Parse3Digits(state, Parse3RE2); } in Parse_Digits_RE2()
463 void Parse_Digits_Backtrack(benchmark::State& state) { Parse3Digits(state, Parse3Backtrack); } in Parse_Digits_Backtrack()
464 void Parse_Digits_BitState(benchmark::State& state) { Parse3Digits(state, Parse3BitState); } in Parse_Digits_BitState()
466 BENCHMARK(Parse_Digits_NFA)->ThreadRange(1, NumCPUs());
467 BENCHMARK(Parse_Digits_OnePass)->ThreadRange(1, NumCPUs());
469 BENCHMARK(Parse_Digits_PCRE)->ThreadRange(1, NumCPUs());
471 BENCHMARK(Parse_Digits_RE2)->ThreadRange(1, NumCPUs());
472 BENCHMARK(Parse_Digits_Backtrack)->ThreadRange(1, NumCPUs());
473 BENCHMARK(Parse_Digits_BitState)->ThreadRange(1, NumCPUs());
475 void Parse_CachedDigits_NFA(benchmark::State& state) { Parse3Digits(state, Parse3CachedNFA)… in Parse_CachedDigits_NFA()
476 void Parse_CachedDigits_OnePass(benchmark::State& state) { Parse3Digits(state, Parse3CachedOneP… in Parse_CachedDigits_OnePass()
477 void Parse_CachedDigits_PCRE(benchmark::State& state) { Parse3Digits(state, Parse3CachedPCRE… in Parse_CachedDigits_PCRE()
478 void Parse_CachedDigits_RE2(benchmark::State& state) { Parse3Digits(state, Parse3CachedRE2)… in Parse_CachedDigits_RE2()
479 void Parse_CachedDigits_Backtrack(benchmark::State& state) { Parse3Digits(state, Parse3CachedBack… in Parse_CachedDigits_Backtrack()
480 void Parse_CachedDigits_BitState(benchmark::State& state) { Parse3Digits(state, Parse3CachedBitS… in Parse_CachedDigits_BitState()
482 BENCHMARK(Parse_CachedDigits_NFA)->ThreadRange(1, NumCPUs());
483 BENCHMARK(Parse_CachedDigits_OnePass)->ThreadRange(1, NumCPUs());
485 BENCHMARK(Parse_CachedDigits_PCRE)->ThreadRange(1, NumCPUs());
487 BENCHMARK(Parse_CachedDigits_Backtrack)->ThreadRange(1, NumCPUs());
488 BENCHMARK(Parse_CachedDigits_RE2)->ThreadRange(1, NumCPUs());
489 BENCHMARK(Parse_CachedDigits_BitState)->ThreadRange(1, NumCPUs());
491 void Parse3DigitDs(benchmark::State& state, in Parse3DigitDs()
492 void (*parse3)(benchmark::State&, const char*, in Parse3DigitDs()
498 void Parse_DigitDs_NFA(benchmark::State& state) { Parse3DigitDs(state, Parse3NFA); } in Parse_DigitDs_NFA()
499 void Parse_DigitDs_OnePass(benchmark::State& state) { Parse3DigitDs(state, Parse3OnePass); } in Parse_DigitDs_OnePass()
500 void Parse_DigitDs_PCRE(benchmark::State& state) { Parse3DigitDs(state, Parse3PCRE); } in Parse_DigitDs_PCRE()
501 void Parse_DigitDs_RE2(benchmark::State& state) { Parse3DigitDs(state, Parse3RE2); } in Parse_DigitDs_RE2()
502 void Parse_DigitDs_Backtrack(benchmark::State& state) { Parse3DigitDs(state, Parse3CachedBacktrac… in Parse_DigitDs_Backtrack()
503 void Parse_DigitDs_BitState(benchmark::State& state) { Parse3DigitDs(state, Parse3CachedBitState… in Parse_DigitDs_BitState()
505 BENCHMARK(Parse_DigitDs_NFA)->ThreadRange(1, NumCPUs());
506 BENCHMARK(Parse_DigitDs_OnePass)->ThreadRange(1, NumCPUs());
508 BENCHMARK(Parse_DigitDs_PCRE)->ThreadRange(1, NumCPUs());
510 BENCHMARK(Parse_DigitDs_RE2)->ThreadRange(1, NumCPUs());
511 BENCHMARK(Parse_DigitDs_Backtrack)->ThreadRange(1, NumCPUs());
512 BENCHMARK(Parse_DigitDs_BitState)->ThreadRange(1, NumCPUs());
514 void Parse_CachedDigitDs_NFA(benchmark::State& state) { Parse3DigitDs(state, Parse3CachedNF… in Parse_CachedDigitDs_NFA()
515 void Parse_CachedDigitDs_OnePass(benchmark::State& state) { Parse3DigitDs(state, Parse3CachedOn… in Parse_CachedDigitDs_OnePass()
516 void Parse_CachedDigitDs_PCRE(benchmark::State& state) { Parse3DigitDs(state, Parse3CachedPC… in Parse_CachedDigitDs_PCRE()
517 void Parse_CachedDigitDs_RE2(benchmark::State& state) { Parse3DigitDs(state, Parse3CachedRE… in Parse_CachedDigitDs_RE2()
518 void Parse_CachedDigitDs_Backtrack(benchmark::State& state) { Parse3DigitDs(state, Parse3CachedBa… in Parse_CachedDigitDs_Backtrack()
519 void Parse_CachedDigitDs_BitState(benchmark::State& state) { Parse3DigitDs(state, Parse3CachedBi… in Parse_CachedDigitDs_BitState()
521 BENCHMARK(Parse_CachedDigitDs_NFA)->ThreadRange(1, NumCPUs());
522 BENCHMARK(Parse_CachedDigitDs_OnePass)->ThreadRange(1, NumCPUs());
524 BENCHMARK(Parse_CachedDigitDs_PCRE)->ThreadRange(1, NumCPUs());
526 BENCHMARK(Parse_CachedDigitDs_Backtrack)->ThreadRange(1, NumCPUs());
527 BENCHMARK(Parse_CachedDigitDs_RE2)->ThreadRange(1, NumCPUs());
528 BENCHMARK(Parse_CachedDigitDs_BitState)->ThreadRange(1, NumCPUs());
530 // Benchmark: splitting off leading number field.
532 void Parse1Split(benchmark::State& state, in Parse1Split()
533 void (*parse1)(benchmark::State&, const char*, in Parse1Split()
539 void Parse_Split_NFA(benchmark::State& state) { Parse1Split(state, Parse1NFA); } in Parse_Split_NFA()
540 void Parse_Split_OnePass(benchmark::State& state) { Parse1Split(state, Parse1OnePass); } in Parse_Split_OnePass()
541 void Parse_Split_PCRE(benchmark::State& state) { Parse1Split(state, Parse1PCRE); } in Parse_Split_PCRE()
542 void Parse_Split_RE2(benchmark::State& state) { Parse1Split(state, Parse1RE2); } in Parse_Split_RE2()
543 void Parse_Split_BitState(benchmark::State& state) { Parse1Split(state, Parse1BitState); } in Parse_Split_BitState()
545 BENCHMARK(Parse_Split_NFA)->ThreadRange(1, NumCPUs());
546 BENCHMARK(Parse_Split_OnePass)->ThreadRange(1, NumCPUs());
548 BENCHMARK(Parse_Split_PCRE)->ThreadRange(1, NumCPUs());
550 BENCHMARK(Parse_Split_RE2)->ThreadRange(1, NumCPUs());
551 BENCHMARK(Parse_Split_BitState)->ThreadRange(1, NumCPUs());
553 void Parse_CachedSplit_NFA(benchmark::State& state) { Parse1Split(state, Parse1CachedNFA); } in Parse_CachedSplit_NFA()
554 void Parse_CachedSplit_OnePass(benchmark::State& state) { Parse1Split(state, Parse1CachedOnePas… in Parse_CachedSplit_OnePass()
555 void Parse_CachedSplit_PCRE(benchmark::State& state) { Parse1Split(state, Parse1CachedPCRE);… in Parse_CachedSplit_PCRE()
556 void Parse_CachedSplit_RE2(benchmark::State& state) { Parse1Split(state, Parse1CachedRE2); } in Parse_CachedSplit_RE2()
557 void Parse_CachedSplit_BitState(benchmark::State& state) { Parse1Split(state, Parse1CachedBitSta… in Parse_CachedSplit_BitState()
559 BENCHMARK(Parse_CachedSplit_NFA)->ThreadRange(1, NumCPUs());
560 BENCHMARK(Parse_CachedSplit_OnePass)->ThreadRange(1, NumCPUs());
562 BENCHMARK(Parse_CachedSplit_PCRE)->ThreadRange(1, NumCPUs());
564 BENCHMARK(Parse_CachedSplit_RE2)->ThreadRange(1, NumCPUs());
565 BENCHMARK(Parse_CachedSplit_BitState)->ThreadRange(1, NumCPUs());
567 // Benchmark: splitting off leading number field but harder (ambiguous regexp).
569 void Parse1SplitHard(benchmark::State& state, in Parse1SplitHard()
570 void (*run)(benchmark::State&, const char*, in Parse1SplitHard()
576 void Parse_SplitHard_NFA(benchmark::State& state) { Parse1SplitHard(state, Parse1NFA); } in Parse_SplitHard_NFA()
577 void Parse_SplitHard_PCRE(benchmark::State& state) { Parse1SplitHard(state, Parse1PCRE); } in Parse_SplitHard_PCRE()
578 void Parse_SplitHard_RE2(benchmark::State& state) { Parse1SplitHard(state, Parse1RE2); } in Parse_SplitHard_RE2()
579 void Parse_SplitHard_BitState(benchmark::State& state) { Parse1SplitHard(state, Parse1BitState);… in Parse_SplitHard_BitState()
582 BENCHMARK(Parse_SplitHard_PCRE)->ThreadRange(1, NumCPUs());
584 BENCHMARK(Parse_SplitHard_RE2)->ThreadRange(1, NumCPUs());
585 BENCHMARK(Parse_SplitHard_BitState)->ThreadRange(1, NumCPUs());
586 BENCHMARK(Parse_SplitHard_NFA)->ThreadRange(1, NumCPUs());
588 void Parse_CachedSplitHard_NFA(benchmark::State& state) { Parse1SplitHard(state, Parse1Cached… in Parse_CachedSplitHard_NFA()
589 void Parse_CachedSplitHard_PCRE(benchmark::State& state) { Parse1SplitHard(state, Parse1Cached… in Parse_CachedSplitHard_PCRE()
590 void Parse_CachedSplitHard_RE2(benchmark::State& state) { Parse1SplitHard(state, Parse1Cached… in Parse_CachedSplitHard_RE2()
591 void Parse_CachedSplitHard_BitState(benchmark::State& state) { Parse1SplitHard(state, Parse1Cached… in Parse_CachedSplitHard_BitState()
592 void Parse_CachedSplitHard_Backtrack(benchmark::State& state) { Parse1SplitHard(state, Parse1Cached… in Parse_CachedSplitHard_Backtrack()
595 BENCHMARK(Parse_CachedSplitHard_PCRE)->ThreadRange(1, NumCPUs());
597 BENCHMARK(Parse_CachedSplitHard_RE2)->ThreadRange(1, NumCPUs());
598 BENCHMARK(Parse_CachedSplitHard_BitState)->ThreadRange(1, NumCPUs());
599 BENCHMARK(Parse_CachedSplitHard_NFA)->ThreadRange(1, NumCPUs());
600 BENCHMARK(Parse_CachedSplitHard_Backtrack)->ThreadRange(1, NumCPUs());
602 // Benchmark: Parse1SplitHard, big text, small match.
604 void Parse1SplitBig1(benchmark::State& state, in Parse1SplitBig1()
605 void (*run)(benchmark::State&, const char*, in Parse1SplitBig1()
614 void Parse_CachedSplitBig1_PCRE(benchmark::State& state) { Parse1SplitBig1(state, SearchParse1… in Parse_CachedSplitBig1_PCRE()
615 void Parse_CachedSplitBig1_RE2(benchmark::State& state) { Parse1SplitBig1(state, SearchParse1… in Parse_CachedSplitBig1_RE2()
618 BENCHMARK(Parse_CachedSplitBig1_PCRE)->ThreadRange(1, NumCPUs());
620 BENCHMARK(Parse_CachedSplitBig1_RE2)->ThreadRange(1, NumCPUs());
622 // Benchmark: Parse1SplitHard, big text, big match.
624 void Parse1SplitBig2(benchmark::State& state, in Parse1SplitBig2()
625 void (*run)(benchmark::State&, const char*, in Parse1SplitBig2()
634 void Parse_CachedSplitBig2_PCRE(benchmark::State& state) { Parse1SplitBig2(state, SearchParse1… in Parse_CachedSplitBig2_PCRE()
635 void Parse_CachedSplitBig2_RE2(benchmark::State& state) { Parse1SplitBig2(state, SearchParse1… in Parse_CachedSplitBig2_RE2()
638 BENCHMARK(Parse_CachedSplitBig2_PCRE)->ThreadRange(1, NumCPUs());
640 BENCHMARK(Parse_CachedSplitBig2_RE2)->ThreadRange(1, NumCPUs());
642 // Benchmark: measure time required to parse (but not execute)
645 void ParseRegexp(benchmark::State& state, const std::string& regexp) { in ParseRegexp()
653 void SimplifyRegexp(benchmark::State& state, const std::string& regexp) { in SimplifyRegexp()
664 void NullWalkRegexp(benchmark::State& state, const std::string& regexp) { in NullWalkRegexp()
673 void SimplifyCompileRegexp(benchmark::State& state, const std::string& regexp) { in SimplifyCompileRegexp()
687 void CompileRegexp(benchmark::State& state, const std::string& regexp) { in CompileRegexp()
698 void CompileToProg(benchmark::State& state, const std::string& regexp) { in CompileToProg()
709 void CompileByteMap(benchmark::State& state, const std::string& regexp) { in CompileByteMap()
721 void CompilePCRE(benchmark::State& state, const std::string& regexp) { in CompilePCRE()
728 void CompileRE2(benchmark::State& state, const std::string& regexp) { in CompileRE2()
735 void RunBuild(benchmark::State& state, const std::string& regexp, in RunBuild()
736 void (*run)(benchmark::State&, const std::string&)) { in RunBuild()
748 void BM_PCRE_Compile(benchmark::State& state) { RunBuild(state, GetFlag(FLAGS_compile_r… in BM_PCRE_Compile()
749 void BM_Regexp_Parse(benchmark::State& state) { RunBuild(state, GetFlag(FLAGS_compile_r… in BM_Regexp_Parse()
750 void BM_Regexp_Simplify(benchmark::State& state) { RunBuild(state, GetFlag(FLAGS_compile_r… in BM_Regexp_Simplify()
751 void BM_CompileToProg(benchmark::State& state) { RunBuild(state, GetFlag(FLAGS_compile_r… in BM_CompileToProg()
752 void BM_CompileByteMap(benchmark::State& state) { RunBuild(state, GetFlag(FLAGS_compile_r… in BM_CompileByteMap()
753 void BM_Regexp_Compile(benchmark::State& state) { RunBuild(state, GetFlag(FLAGS_compile_r… in BM_Regexp_Compile()
754 void BM_Regexp_SimplifyCompile(benchmark::State& state) { RunBuild(state, GetFlag(FLAGS_compile_r… in BM_Regexp_SimplifyCompile()
755 void BM_Regexp_NullWalk(benchmark::State& state) { RunBuild(state, GetFlag(FLAGS_compile_r… in BM_Regexp_NullWalk()
756 void BM_RE2_Compile(benchmark::State& state) { RunBuild(state, GetFlag(FLAGS_compile_r… in BM_RE2_Compile()
759 BENCHMARK(BM_PCRE_Compile)->ThreadRange(1, NumCPUs());
761 BENCHMARK(BM_Regexp_Parse)->ThreadRange(1, NumCPUs());
762 BENCHMARK(BM_Regexp_Simplify)->ThreadRange(1, NumCPUs());
763 BENCHMARK(BM_CompileToProg)->ThreadRange(1, NumCPUs());
764 BENCHMARK(BM_CompileByteMap)->ThreadRange(1, NumCPUs());
765 BENCHMARK(BM_Regexp_Compile)->ThreadRange(1, NumCPUs());
766 BENCHMARK(BM_Regexp_SimplifyCompile)->ThreadRange(1, NumCPUs());
767 BENCHMARK(BM_Regexp_NullWalk)->ThreadRange(1, NumCPUs());
768 BENCHMARK(BM_RE2_Compile)->ThreadRange(1, NumCPUs());
772 void SearchPhone(benchmark::State& state, ParseImpl* search) { in SearchPhone()
780 void SearchPhone_CachedPCRE(benchmark::State& state) { in SearchPhone_CachedPCRE()
784 void SearchPhone_CachedRE2(benchmark::State& state) { in SearchPhone_CachedRE2()
854 (new ::testing::Benchmark(#n, NewPermanentCallback(&n)))->ThreadRange(1, NumCPUs());
880 void SearchDFA(benchmark::State& state, const char* regexp, in SearchDFA()
898 void SearchNFA(benchmark::State& state, const char* regexp, in SearchNFA()
914 void SearchOnePass(benchmark::State& state, const char* regexp, in SearchOnePass()
930 void SearchBitState(benchmark::State& state, const char* regexp, in SearchBitState()
946 void SearchPCRE(benchmark::State& state, const char* regexp, in SearchPCRE()
959 void SearchRE2(benchmark::State& state, const char* regexp, in SearchRE2()
976 void SearchCachedDFA(benchmark::State& state, const char* regexp, in SearchCachedDFA()
994 void SearchCachedNFA(benchmark::State& state, const char* regexp, in SearchCachedNFA()
1010 void SearchCachedOnePass(benchmark::State& state, const char* regexp, in SearchCachedOnePass()
1026 void SearchCachedBitState(benchmark::State& state, const char* regexp, in SearchCachedBitState()
1042 void SearchCachedPCRE(benchmark::State& state, const char* regexp, in SearchCachedPCRE()
1055 void SearchCachedRE2(benchmark::State& state, const char* regexp, in SearchCachedRE2()
1071 void Parse3NFA(benchmark::State& state, const char* regexp, in Parse3NFA()
1086 void Parse3OnePass(benchmark::State& state, const char* regexp, in Parse3OnePass()
1101 void Parse3BitState(benchmark::State& state, const char* regexp, in Parse3BitState()
1116 void Parse3Backtrack(benchmark::State& state, const char* regexp, in Parse3Backtrack()
1130 void Parse3PCRE(benchmark::State& state, const char* regexp, in Parse3PCRE()
1140 void Parse3RE2(benchmark::State& state, const char* regexp, in Parse3RE2()
1150 void Parse3CachedNFA(benchmark::State& state, const char* regexp, in Parse3CachedNFA()
1165 void Parse3CachedOnePass(benchmark::State& state, const char* regexp, in Parse3CachedOnePass()
1180 void Parse3CachedBitState(benchmark::State& state, const char* regexp, in Parse3CachedBitState()
1195 void Parse3CachedBacktrack(benchmark::State& state, const char* regexp, in Parse3CachedBacktrack()
1209 void Parse3CachedPCRE(benchmark::State& state, const char* regexp, in Parse3CachedPCRE()
1219 void Parse3CachedRE2(benchmark::State& state, const char* regexp, in Parse3CachedRE2()
1232 void Parse1NFA(benchmark::State& state, const char* regexp, in Parse1NFA()
1247 void Parse1OnePass(benchmark::State& state, const char* regexp, in Parse1OnePass()
1262 void Parse1BitState(benchmark::State& state, const char* regexp, in Parse1BitState()
1277 void Parse1PCRE(benchmark::State& state, const char* regexp, in Parse1PCRE()
1287 void Parse1RE2(benchmark::State& state, const char* regexp, in Parse1RE2()
1297 void Parse1CachedNFA(benchmark::State& state, const char* regexp, in Parse1CachedNFA()
1312 void Parse1CachedOnePass(benchmark::State& state, const char* regexp, in Parse1CachedOnePass()
1327 void Parse1CachedBitState(benchmark::State& state, const char* regexp, in Parse1CachedBitState()
1342 void Parse1CachedBacktrack(benchmark::State& state, const char* regexp, in Parse1CachedBacktrack()
1356 void Parse1CachedPCRE(benchmark::State& state, const char* regexp, in Parse1CachedPCRE()
1366 void Parse1CachedRE2(benchmark::State& state, const char* regexp, in Parse1CachedRE2()
1376 void SearchParse2CachedPCRE(benchmark::State& state, const char* regexp, in SearchParse2CachedPCRE()
1386 void SearchParse2CachedRE2(benchmark::State& state, const char* regexp, in SearchParse2CachedRE2()
1396 void SearchParse1CachedPCRE(benchmark::State& state, const char* regexp, in SearchParse1CachedPCRE()
1406 void SearchParse1CachedRE2(benchmark::State& state, const char* regexp, in SearchParse1CachedRE2()
1416 void EmptyPartialMatchPCRE(benchmark::State& state) { in EmptyPartialMatchPCRE()
1423 void EmptyPartialMatchRE2(benchmark::State& state) { in EmptyPartialMatchRE2()
1430 BENCHMARK(EmptyPartialMatchPCRE)->ThreadRange(1, NumCPUs());
1432 BENCHMARK(EmptyPartialMatchRE2)->ThreadRange(1, NumCPUs());
1434 void SimplePartialMatchPCRE(benchmark::State& state) { in SimplePartialMatchPCRE()
1441 void SimplePartialMatchRE2(benchmark::State& state) { in SimplePartialMatchRE2()
1448 BENCHMARK(SimplePartialMatchPCRE)->ThreadRange(1, NumCPUs());
1450 BENCHMARK(SimplePartialMatchRE2)->ThreadRange(1, NumCPUs());
1456 void HTTPPartialMatchPCRE(benchmark::State& state) { in HTTPPartialMatchPCRE()
1464 void HTTPPartialMatchRE2(benchmark::State& state) { in HTTPPartialMatchRE2()
1473 BENCHMARK(HTTPPartialMatchPCRE)->ThreadRange(1, NumCPUs());
1475 BENCHMARK(HTTPPartialMatchRE2)->ThreadRange(1, NumCPUs());
1480 void SmallHTTPPartialMatchPCRE(benchmark::State& state) { in SmallHTTPPartialMatchPCRE()
1488 void SmallHTTPPartialMatchRE2(benchmark::State& state) { in SmallHTTPPartialMatchRE2()
1497 BENCHMARK(SmallHTTPPartialMatchPCRE)->ThreadRange(1, NumCPUs());
1499 BENCHMARK(SmallHTTPPartialMatchRE2)->ThreadRange(1, NumCPUs());
1501 void DotMatchPCRE(benchmark::State& state) { in DotMatchPCRE()
1509 void DotMatchRE2(benchmark::State& state) { in DotMatchRE2()
1518 BENCHMARK(DotMatchPCRE)->ThreadRange(1, NumCPUs());
1520 BENCHMARK(DotMatchRE2)->ThreadRange(1, NumCPUs());
1522 void ASCIIMatchPCRE(benchmark::State& state) { in ASCIIMatchPCRE()
1530 void ASCIIMatchRE2(benchmark::State& state) { in ASCIIMatchRE2()
1539 BENCHMARK(ASCIIMatchPCRE)->ThreadRange(1, NumCPUs());
1541 BENCHMARK(ASCIIMatchRE2)->ThreadRange(1, NumCPUs());
1543 void FullMatchPCRE(benchmark::State& state, const char *regexp) { in FullMatchPCRE()
1554 void FullMatchRE2(benchmark::State& state, const char *regexp) { in FullMatchRE2()
1565 void FullMatch_DotStar_CachedPCRE(benchmark::State& state) { FullMatchPCRE(state, "(?s).*"); } in FullMatch_DotStar_CachedPCRE()
1566 void FullMatch_DotStar_CachedRE2(benchmark::State& state) { FullMatchRE2(state, "(?s).*"); } in FullMatch_DotStar_CachedRE2()
1568 void FullMatch_DotStarDollar_CachedPCRE(benchmark::State& state) { FullMatchPCRE(state, "(?s).*$");… in FullMatch_DotStarDollar_CachedPCRE()
1569 void FullMatch_DotStarDollar_CachedRE2(benchmark::State& state) { FullMatchRE2(state, "(?s).*$"); } in FullMatch_DotStarDollar_CachedRE2()
1571 void FullMatch_DotStarCapture_CachedPCRE(benchmark::State& state) { FullMatchPCRE(state, "(?s)((.*)… in FullMatch_DotStarCapture_CachedPCRE()
1572 void FullMatch_DotStarCapture_CachedRE2(benchmark::State& state) { FullMatchRE2(state, "(?s)((.*)(… in FullMatch_DotStarCapture_CachedRE2()
1589 void PossibleMatchRangeCommon(benchmark::State& state, const char* regexp) { in PossibleMatchRangeCommon()
1599 void PossibleMatchRange_Trivial(benchmark::State& state) { in PossibleMatchRange_Trivial()
1602 void PossibleMatchRange_Complex(benchmark::State& state) { in PossibleMatchRange_Complex()
1605 void PossibleMatchRange_Prefix(benchmark::State& state) { in PossibleMatchRange_Prefix()
1608 void PossibleMatchRange_NoProg(benchmark::State& state) { in PossibleMatchRange_NoProg()
1612 BENCHMARK(PossibleMatchRange_Trivial);
1613 BENCHMARK(PossibleMatchRange_Complex);
1614 BENCHMARK(PossibleMatchRange_Prefix);
1615 BENCHMARK(PossibleMatchRange_NoProg);