ammar/regexp_parser

View on GitHub
tasks/benchmarks/log

Summary

Maintainability
Test Coverage
Results of rake:benchmark on ruby 3.1.0p0 (2021-12-25 revision fb4df44d16) [arm64-darwin21]

Parsing a minimal Regexp

       Scanner::scan:    32069.4 i/s
          Lexer::lex:    30700.6 i/s - same-ish: difference falls within error
       Parser::parse:    26248.5 i/s - 1.22x  (± 0.00) slower

Parsing a complex Regexp (URI.regexp)

       Scanner::scan:      843.4 i/s
          Lexer::lex:      546.3 i/s - 1.54x  (± 0.00) slower
       Parser::parse:      332.5 i/s - 2.54x  (± 0.00) slower