------ art_59394_7395658.1222263513325 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Wed, Sep 24, 2008 at 7:54 AM, Dave Thomas <dave / pragprog.com> wrote: > > On Sep 24, 2008, at 7:23 AM, Eric Mahurin wrote: > > Wincent, do you happen to have something in Walrus that parses JSON and >> generates ruby (tree of hashs and arrays)? I've benchmarked a bunch of >> parser generators out there using JSON and would always like to add more. >> > > Have you tried the JSON parser one built in to 1.9? It's a native > extension, but I don't know how its performance compares with other JSON > parsers. > > > Dave > > Yes. This is the same as the "json" gem that Florian Frank did. Florian used Ragel to generate a pure C extension. The Ragel file is about 20X larger than what my gramar specification is (and most other ruby parsers) because all the actions are C. But it is really, really fast. This parser is a key benchmark for me. My Grammar generated parser (using ruby2cext) is about half the speed of it now. Still 100X -1000X faster than most other ruby parsers out there. Dominik just gave me developer priviledges for ruby2cext and I have ideas to double the speed again. ------ art_59394_7395658.1222263513325--