In this post I am including the performance of our JSON parser. Given a choice I suggest YAML for a host of reasons, however if you have to use JSON, how does the performance compare?
The message is simple and contains a number of data typoes.
"price":1234,"longInt":1234567890,"smallInt":123,"flag":true, "text":"Hello World!","side":"Sell"
The actual message doesn't have a new line in it
This is the time to write and then read the message.
These timings are in micro-seconds (0.001 milli-seconds)
|Wire Format||Bytes||99.9 %tile||99.99 %tile||99.999 %tile||worst|
|Jackson + C-Bytes||100*||2.87||10.1||1,300||1,400|
|BSON + C-Bytes||96*||7.47||15.1||1,400||11,600|
"C-Bytes" means using Chronicle Bytes to provide a recycled buffer.
"*" means this data was written to/read from direct memory wouldnt' need additional copying to use with NIO.
JSONWire may be a very good choice for performance, especially where consistent low latency through ultra low garbage production is required.