|
|
|
|
|
by bd82
3172 days ago
|
|
Ohm is very impressive. Specifically: 1. The separation of Grammar and Semantics.
2. Handling left recursion in a top down (peg) parser.
3. Incremental parsing.
I think that the one feature missing to make it applicable
for more than rapid prototyping and teaching purposes is
performance.In this benchmark I've authored:
http://sap.github.io/chevrotain/performance/
Which uses the simple JSON grammar it is about two orders of magnitudes slower than most other parsing libraries in JavaScript. So I am sure there is a great deal of room for optimizations. |
|
Yes, we are aware that Ohm's batch parsing performance is not great. In practice, it has been fast enough for our uses -- especially since we implemented incremental parsing. With incremental parsing, Ohm's ES5 parser can be as fast as hand-optimized parsers like Acorn.
But you're right, there is definitely room for improvement. So far, we have been much more concerned with making Ohm easy to learn and pleasant to use. I would certainly be happy to have contributors who are interested in improving our batch performance.