Just wanted to let you all know yajl-ruby 0.5.5 was released to github's gem
server and I'll be pushing a release to rubyforge soon as well.
This is an important release mostly because of the introduction of it's JSON gem
compatibility API. But also because I did some more investigating into the speed
of yajl-ruby compared to the JSON gem, YAML and Marshal.load/Marshal.dump
A summary of yajl-ruby's features to-date:
JSON parsing and encoding directly to and from an IO stream (file, socket, etc)
or String. Compressed stream parsing and encoding supported for Bzip2, Gzip and
Deflate.
Parse and encode multiple JSON objects to and from streams or strings
continuously.
JSON gem compatibility API - allows yajl-ruby to be used as a drop-in
replacement for the JSON gem
Basic HTTP client (only GET requests supported for now) which parses JSON
directly off the response body *as it's being received*
Also, it's:
~3.5x faster than JSON.generate
~1.9x faster than JSON.parse
~4.5x faster than YAML.load
~377.5x faster than YAML.dump
~1.5x faster than Marshal.load
~2x faster than Marshal.dump
Anyone wanting faster JSON parsing and encoding in their project should
definitely take a look at this release. Enjoy!