Latest Jackson against Boon 16 snapshot against FastJSON - RichardHightower/json-parsers-benchmark GitHub Wiki
Update
The biggest slow down seemed to be from some new features that I added.
Benchmark Mode Thr Count Sec Mean Mean error Units
i.g.j.s.MainFastJsonSerializer.mediaContentOutput thrpt 8 3 1 163749.039 19398.263 ops/s
i.g.j.s.MainBoonSerializer.mediaContentOutput thrpt 8 3 1 151952.006 48702.458 ops/s
i.g.j.s.MainJacksonSerializer.mediaContentOutput thrpt 8 3 1 131185.139 10991.188 ops/s
FastJSON
Boon in 2nd
i.g.j.s.MainFastJsonSerializer.mediaContentRoundTrip thrpt 8 3 1 73169.661 14718.735 ops/s
i.g.j.s.MainBoonSerializer.mediaContentRoundTrip thrpt 8 3 1 42813.561 15983.127 ops/s
i.g.j.s.MainJacksonSerializer.mediaContentRoundTrip thrpt 8 3 1 41910.561 3982.474 ops/s
FastJSON wins
Boon in 2nd
i.g.j.s.MainBoonSerializer.roundTripBig thrpt 8 3 1 132.367 38.425 ops/s
i.g.j.s.MainFastJsonSerializer.roundTripBig thrpt 8 3 1 111.956 55.508 ops/s
i.g.j.s.MainJacksonSerializer.roundTripBig thrpt 8 3 1 78.044 18.769 ops/s
Boon wins.
i.g.j.s.MainBoonSerializer.roundTriper thrpt 8 3 1 356515.128 68628.961 ops/s
i.g.j.s.MainFastJsonSerializer.roundTriper thrpt 8 3 1 365320.239 94051.523 ops/s
i.g.j.s.MainJacksonSerializer.roundTriper thrpt 8 3 1 206928.122 45500.078 ops/s
Boon wins.
i.g.j.s.MainBoonSerializer.serializeBig thrpt 8 3 1 549.394 110.745 ops/s
i.g.j.s.MainJacksonSerializer.serializeBig thrpt 8 3 1 193.283 85.061 ops/s
i.g.j.s.MainFastJsonSerializer.serializeBig thrpt 8 3 1 170.317 122.190 ops/s
Boon wins.
i.g.j.s.MainBoonSerializer.serializeSmall thrpt 8 3 1 1438337.161 50081.324 ops/s
i.g.j.s.MainFastJsonSerializer.serializeSmall thrpt 8 3 1 785699.228 212756.409 ops/s
i.g.j.s.MainJacksonSerializer.serializeSmall thrpt 8 3 1 625675.900 72572.978 ops/s
Boon wins.
Yesterday or so
Benchmark Mode Thr Count Sec Mean Mean error Units
i.g.j.s.MainJacksonSerializer.mediaContentRoundTrip thrpt 16 6 1 42,854.719 2661.931 ops/s
i.g.j.s.MainBoonSerializer.mediaContentRoundTrip thrpt 16 6 1 40,928.942 4404.136 ops/s
i.g.j.s.MainFastJsonSerializer.mediaContentRoundTrip thrpt 16 6 1 76,093.844 4679.609 ops/s
FastJSON wins by a wide margin. Then Jackson and Boon are close.
- 1s FastJson
- 2nd Jackson
- 3rd Boon
i.g.j.s.MainBoonSerializer.roundTripBig thrpt 16 6 1 105.678 9.420 ops/s
i.g.j.s.MainFastJsonSerializer.roundTripBig thrpt 16 6 1 100.822 7.076 ops/s
i.g.j.s.MainJacksonSerializer.roundTripBig thrpt 16 6 1 75.747 5.437 ops/s
Here Jackson is about 25% behind. I think there were earlier times when Boon was 200%. Jackson speed has improved.
- 1st Boon
- 2nd FastJSON
- 3rd Jackson
** Jackson is at the speed of Boon from February 2014, and Jackson is much faster than before.
i.g.j.s.MainFastJsonSerializer.roundTriper thrpt 16 6 1 391110.483 10379.598 ops/s
i.g.j.s.MainBoonSerializer.roundTriper thrpt 16 6 1 341615.531 12360.514 ops/s
i.g.j.s.MainJacksonSerializer.roundTriper thrpt 16 6 1 213609.006 7875.176 ops/s
- 1st FastJSON
- 2nd Boon
- 3rd Jackson
Boon is 10% behind the top.
Jackson is at 2/3 of the speed of Boon and Boon is within 10% of FastJSON. FastJSON wins this one.
This is a test where Jackson used to be 2x slower than Boon for sure. It is now closing the gap. Boon got faster at this by a lot. Jackson is as fast as Boon was around Feb. 2014. So if Boon stayed still Jackson would have caught. I've said this before, but let me repeat if Boon is faster, it can be beat. It just takes more time behind the profiler and tweaking code.
i.g.j.s.MainBoonSerializer.serializeBig thrpt 16 6 1 429.361 42.865 ops/s
i.g.j.s.MainJacksonSerializer.serializeBig thrpt 16 6 1 181.569 27.875 ops/s
i.g.j.s.MainFastJsonSerializer.serializeBig thrpt 16 6 1 146.742 9.458 ops/s
- 1st Boon
- 2nd Jackson (awesome!)
- 3rd FastJSON
Boon is over 2x faster than the runner up. This is likely due to unsafe buffer copies, which is a technique that Kryo, and Netty use and JVM internals use (and a lot of commercial software products use), but it is not for everyone.
Damn. Here is one that I did not expect. Boon got faster at this than the last time I tested. No clue. I did some refactoring on type categorization but, this was an unexpected surprise. So Jackson is 2nd place.
i.g.j.s.MainBoonSerializer.serializeSmall thrpt 16 6 1 1074658.928 40340.861 ops/s
i.g.j.s.MainFastJsonSerializer.serializeSmall thrpt 16 6 1 802444.311 28729.794 ops/s
i.g.j.s.MainJacksonSerializer.serializeSmall thrpt 16 6 1 639600.078 143469.034 ops/s
- Boon 1st
- FastJSON 2nd
- Jackson 3rd
Again. This in one where Jackson is now as fast as Boon was in February 2014. Jackson is much faster than Jackson of a few months ago. It is just that Boon got faster too. If the buffer is small enough there is more overhead to share a buffer than it is worth. Running Boon in stateless mode might actually make this faster (or it could be slower).