Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about Optimization #214

Open
coderaiser opened this issue Nov 23, 2020 · 1 comment
Open

Question about Optimization #214

coderaiser opened this issue Nov 23, 2020 · 1 comment

Comments

@coderaiser
Copy link

Thank you for a library with such hight quality :). I just integrated regexp-tree into Putout linter, run it on my code, and had seen a strange optimization:

require('regexp-tree').optimize(/[<>=!]/).toString()
'/[!<=>]/'

Could you please tell me is it more optimized regexp or it's a bug?

@DmitrySoshnikov
Copy link
Owner

Thanks for the feedback! As to the optimization: yes, this seems is a consequence of optimizing character classes, and sorting the chars as a side effect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants