Skip to content

almondtools/regexbench

Repository files navigation

regexbench

Build Status

regexbench is a jmh benchmark project comparing known java regular expression packages:

regexbench does only benchmark regex libraries that support a find() operation (some candidates did only implement the matches() operation, which would not be a fair comparison).

The benchmark yet exposes:

  • average time of preparing/compiling a regular expression
  • average time of matching/searching for a regular expression

One could easily distinguish DFA-Matchers and NFA-Matchers

  • DFA-Matchers (brics, rexlex, re2j) need much time on preparing and are faster on matching/searching
  • NFA-Matchers (jregex, java.util.regex) are quick in preparing, but slower in matching/searching