Skip to content

readline: replace quadratic regex with linear one

Rodrigo Muino Tomonari requested to merge github/fork/Hakerh400/regex into master

Simplify regular expression in _wordLeft readline method.

Note: If the test can be improved in any way, let me know. Tried using FakeInput, but writing one million characters takes a very long time. Or should a benchmark be used instead of the test?

Fixes https://github.com/nodejs/node/issues/26596

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

Merge request reports

Loading