cyberdelia/logfmt-ruby — pull request #1 by zimbatm (2013-12-22 00:35:23+00:00)
Title: WIP faster parser - please don't be afraid :)

Hello,

this is a work in progress but I would like to share some preliminary results and see if there is any interest. Long story short I found out that Parslet is a great expressive tool and great to put done some ideas on how to do the parsing but it's very slow.

In this commit I added two new parser; one how is a hand-written parser (with some regexp) and one who is just a big regexp. Here are some results for 2k line parses:

```
ruby bench.rb
user system total real
parslet 2.260000 0.000000 2.260000 ( 2.258811)
hand 0.060000 0.000000 0.060000 ( 0.059822)
regexp 0.020000 0.000000 0.020000 ( 0.023754)
```

I also think that the keys should really be strings because the symbols never garbage-collect and the keys really could be anything.