Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jaynetics committed Feb 1, 2023
1 parent 5e89b0a commit 3ce02f3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed
### Added

- `Regexp::Lexer.lex` now streams tokens when called with a block
- it can now take arbitrarily large input, just like `Regexp::Scanner`
- this also slightly improves `Regexp::Parser.parse` performance
- note: `Regexp::Parser.parse` still does not and will not support streaming
- improved performance of `Subexpression#each_expression`
- improved `Regexp::Parser.parse` performance by about 20%
- minor improvements to `Regexp::Scanner` performance
- overall improvement of parse performance: about 10% for large Regexps

## [2.6.2] - 2023-01-19 - [Janosch Müller](mailto:janosch84@gmail.com)

Expand Down
12 changes: 6 additions & 6 deletions tasks/benchmarks/log
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ Results of rake:benchmark on ruby 3.1.0p0 (2021-12-25 revision fb4df44d16) [arm6

Parsing a minimal Regexp

Scanner::scan: 32710.2 i/s
Lexer::lex: 31091.8 i/s - same-ish: difference falls within error
Parser::parse: 27097.3 i/s - 1.21x (± 0.00) slower
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: 877.0 i/s
Lexer::lex: 545.2 i/s - 1.61x (± 0.00) slower
Parser::parse: 294.7 i/s - 2.98x (± 0.00) slower
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

0 comments on commit 3ce02f3

Please sign in to comment.