I recently reorganized the SimpleSpeedTester project’s structure so that it’s easier to add tests to both the Json and binary serializer benchmarks, and to run the tests is as easy as running the RunBenchmarks.fsx F# script and then choosing which benchmark you’d like to run and then kick back and wait for the results to come back.
DISCLAIMER : as always, you should be benchmark against your payload and use case, the benchmark numbers I have produced here is unlikely to be representative of your use cases and neither is anybody else’s benchmark numbers.
You can use the simple test harness I created and see this example code for my JSON serializer tests to benchmark against your particular payload.
System.Json has been added to the list of serializers thanks to Mauricio’s pull-request.
P.S. protobuf-net is NOT a JSON serializer, but it’s in the mix here simply as a benchmark since it’s one of the more widely used and fastest serializers around, and useful to compare the BSON serializers in the list.
Since I started doing these benchmarks more than two years ago, I have been impressed by the way Json.Net upped its game since those early benchmarks! Long may the healthy competition lasts between these JSON serializer heavyweights so that rest of us can simply reap the benefits of the great work guys like Demis Bellot and James Newton-King are doing in providing essential tooling in this space!