Simple Serialization Faster Than JSON? (in Ruby)

Posted by Sinan Taifour on Stack Overflow See other posts from Stack Overflow or by Sinan Taifour
Published on 2010-03-19T08:06:55Z Indexed on 2010/03/19 8:11 UTC
Read the original article Hit count: 233

Filed under:
|
|
|

I have an application written in ruby (that runs in the JRuby VM). When profiling it, I realized that it spends a lot (actually almost all of) its time converting some hashes into JSON.

These hashes have keys of symbols, values of other similar hashes, arrays, strings, and numbers.

Is there a serialization method that is suitable for such an input, and would typically run faster than JSON? It would preferable if it is has a Java or JRuby-compatible gem, too.

I am currently using the jruby-json gem, which is the fastest JSON implementation in JRuby (as I am told), so the move will most likely be to a different serialization method rather than just a different library.

Any help is appreciated! Thanks.

© Stack Overflow or respective owner

Related posts about JSON

Related posts about jruby