Gonzales

Menu

Details

Goals

I consider this a mini-competition for one. One without prizes except for the honour, of course. Another reason is that vendors might pick up on this and use this as another benchmark to optimize against. This could only result in a win for us, parser writers... But mainly I'd like to see how fast we can get!

Rules

First but foremost, use some common sense. Apart from that:

Have a simple api
I'd just like to do YourParser.parse(str); or new YourParser.parse(str);. The parser would be contained in one or a few files which can be loaded in sequence (no requirejs or other complicated loaders please). The parser should be invocable multiple times in the same session.

Finish smaller sources under a minute in Chrome
Let's not waste too much time please :)

Test suite

I've written an exhaustive test suite while (re)writing my own parser. I will (eventually) hook those up to the parsers as well and list the number of failed tests. And for the record, at the time of writing mine fails nine of them :)

Parse tree

The reason that there's no parse tree involved is that every parser has it's own goal. I wrote ZeParser initially for Zeon. Zeon required a lot of meta information, which of course can only make the parser slower. At some point somebody boasted that their parser was faster and we ended up in a discussion about that. I concluded that comparing parsers like that was not fair because every parser had a specific purpose for which it had to drop pieces of performance. With this project I'm hoping to level the playing field. No special paths, no special meta information, just parsing.

Platform

I deliberately don't target a specific platform because every platform has different rules. The optimization engines of vendors changes between browser and OS, even hardware. There are no leaderboards for the same reason.

Learning

I hope we can share parsing tricks. There's a million ways of building a parser, none of them is "perfect". I hope we can learn from one another, squeeze more performance out of the parsers as we do. By sharing knowledge on lists like js-tools we can only get smarter...

Joining

If you have a parser that can join and you want on, just ping me through twitter. You could also send a pull request.