You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 27, 2018. It is now read-only.
So I messed around and rewrote this to allow for compiling ahead before parsing and got some significant performance increases. I tested using your test case data.
The only downside was that it was 30% or so slower if you had to create a new instance for every parse. I'm pretty sure that that is due to object creation and there's probably faster ways to do that, but for my cases I'll stick with the class since I will almost always compile ahead.
Hi
So I messed around and rewrote this to allow for compiling ahead before parsing and got some significant performance increases. I tested using your test case data.
https://jsperf.com/string-value-extraction/1
code
The only downside was that it was 30% or so slower if you had to create a new instance for every parse. I'm pretty sure that that is due to object creation and there's probably faster ways to do that, but for my cases I'll stick with the class since I will almost always compile ahead.