-
Notifications
You must be signed in to change notification settings - Fork 51
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
Performance for escaping strings #16
Comments
jsesc turns out to be about 10x slower than js-string-escape. See mathiasbynens/jsesc#16 This reverts commit 0a9f14c.
Any ideas on how to improve jsesc’s performance? I guess this is the cost we pay for the additional functionality compared to js-string-escape, no? |
I'd be surprised if there's anything fundamentally stopping us from optimizing jsesc. If I wanted to optimize jsesc, I'd probably try different approaches to the inner escape loop. |
I remember trying a bunch of implementations for js-string-escape, and |
For escaping strings, jsesc is about 10x slower than js-string-escape:
This turns out to be relevant in practice: Building my sample JavaScript app takes twice as long when I use jsesc.
The text was updated successfully, but these errors were encountered: