From: Clifford Heath Date: 2008-02-04T10:44:59+09:00 Subject: Re: [QUIZ] Parsing JSON (#155) Eric Mahurin wrote: > It was only about 6800 > chars/second which is near the bottom of the heap. Not sure how valid that > is since the parser has problems though. I'm not surprised. Treetop has been designed to be super-clean and pure, not fast. It'll get faster. Myself, I think it should have real Regex's at the leaves, and that'd make a *heap* of difference. Also, MRI is glacially slow at creating objects, which Treetop does a lot of (in this case, for every char in a string for example). If it used Structs, or if it used Rubinius, things would be a lot quicker. One other addition we're considering is to add skip rules, which don't build nodes, for things like white-space and punctuation, which would basically double the speed. Consider also that the backtracking allows you to handle grammars that are simply impossible with traditional techniques... like I'm doing with CQL in ActiveFacts. Clifford Heath.