Skip to content

Optimize regular expressions #674

Open
@colinodell

Description

@colinodell

This library makes heavy use of regular expressions. While most of them should be fairly performant, there could certainly be some room for improvement to help improve the performance of this library. Examples of improvements might include:

  1. Replacing non-regex parsing logic with regular expressions (if that's quicker)
  2. Replacing regex-based parsing with logic that doesn't use regular expressions (if that's quicker)
  3. Combining multiple regexes into one (if that's quicker)
  4. Fixing excessive backtracking in expressions
  5. Other improvements to existing expressions
  6. ???

Tools that could help here include:

A partial list of areas where regex is used in this library include:

I will accept (almost) any PR that aims to improve performance, though I would ask that you keep the following in mind:

  • The performance improvement should be measurable, using either our performance benchmark or some other means
  • Improvements that don't break BC are preferred, though substantial improvements requiring a major version bump would be considered
  • The rationale behind the improvements should either be obvious or have a description in the PR explaining what you did and why

Metadata

Metadata

Assignees

No one assigned

    Labels

    do not closeIssue which won't close due to inactivityhacktoberfestperformanceSomething could be made faster or more efficientup-for-grabsPlease feel free to take this one!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions