3 ms·
Twice as fast as acorn - impressive. Looked at the parser code - it's well crafted. Works with integers instead of strings wherever possible. The API is dead
by capncode 9y ago
Twice as fast as acorn - impressive.
Looked at the parser code - it's well crafted. Works with integers instead of strings wherever possible.
The API is dead simple. Produces standard ESTree AST. Should take 10 minutes to port projects from `acorn` and `esprima` to `cherow`.
I wonder why he had Typescript target ES2015 only to use Buble to convert to ES5. Perhaps Buble produces more performant ES5 code than Typescript?
- jhurliman 9y agoOne reason to use this workflow (not sure if it applies here) is to do tree shaking on the ES2015 output.
- rattray 9y agoI'd be very curious to read a blog post summarizing the key differences which make `cherow` more performant.
- z3t4 9y agoUsing values is faster though as the engine will not optimize on first run. So while you get good results on micro-benchmarks that runs the same code over and over again, you will not get good results in real world as you usually don't parse the same code over and over again thousands of times :P