I'm looking for an benchmark for different serialization APIs. All I found are outdated Posts and Articles from a year and more before. So I'm hoping that anyone could share a link to an up to date benchmark?
PLEASE: I'm aware of the implementations you can find in the web. I don't want a recommendation for your preferred API. And I don't need a "I think it's fast". What I'm searching for is just an actual comparison of the performance in measured values.
While JSON is a common modus operandi (especially in JavaScript), using a binary serialization format typically provides an advantage in compression size and performance at the cost of losing human readability of the encoded data. Two common binary serialization formats across many programming languages are Protocol Buffers and Apache Avro.
Java supports built-in serialization that is easy to use. JSON is preferable due to readability and being schema-less. Hence, both Gson and Jackson are good options for serializing JSON data. They are simple to use and well documented. For editing data, YAML is a good fit. On the other hand, binary formats are faster than textual formats.
This seems to indicate that datatype json simply consists of using native JSON to create a string that is then stored as datatype string in js-binary. Performance graph of bson with different settings. Unmapped BSON is still slower than JSON in most cases, but it did receive a performance improvement, especially during decoding.
There are some caveats that concern native serialization in Java: Only objects marked Serializable can be persisted. The Object class does not implement Serializable, and hence, not all the objects in Java can be persisted automatically When a class implements the Serializable interface, all its sub-classes are serializable as well.
Here is a one benchmark.
http://code.google.com/p/thrift-protobuf-compare/wiki/Benchmarking
In this article I discuss the importance of re-cycling objects to improve serialisation times.
http://vanillajava.blogspot.co.uk/2011/10/serialization-using-bytebuffer-and.html
IMHO: JSon is one of the most difficult formats to deserialise efficiently, even harder than XML.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With