Yan Cui
I help clients go faster for less using serverless technologies.
Note: Don’t forget to check out Benchmarks page to see the latest round up of binary and JSON serializers.
Follow on from my previous test which showed that the ServiceStack.Text JSON serializer was the top dog in town, I came across a little library called fastJson on codeplex so naturally I had to test it out and see how it compares to the rest!
So using my SimpleSpeedTester and repeating the same test as before I got the following results:
And graphically, this is how they look:
fastJson was the fastest in serialization and ServiceStack.Text was fastest in deserialization but there is very little separating the two libraries in both cases. Given a different data structure to serialize/deserialize you might end up with slightly different results but at the end of the day the two serializers have similar performance characteristics and both are some way ahead of the other JSON serializers I’ve tested.
Update 2011/11/12:
Following on from request by @ICooper, I’ve included JayRock in the mix. However, as I had trouble deserializing (serializing was fine) the List<int> with JayRock I modified the test object slightly:
Otherwise, the conditions of the test are as before, and the results are as follows:
And graphically:
ServiceStack and fastJson still offer by far the best performance, especially with deserialization, but this time around ServiceStack proved to be the slight better of the two, why that’s the case with an int[] instead of a List<int> is beyond me though!
Again, if you’re interested in seeing the test code yourself, you can browse it here on Codeplex.
Whenever you’re ready, here are 3 ways I can help you:
- Production-Ready Serverless: Join 20+ AWS Heroes & Community Builders and 1000+ other students in levelling up your serverless game. This is your one-stop shop for quickly levelling up your serverless skills.
- I help clients launch product ideas, improve their development processes and upskill their teams. If you’d like to work together, then let’s get in touch.
- Join my community on Discord, ask questions, and join the discussion on all things AWS and Serverless.
Have you had a chance to play with the new System.Json serializer? It is part of the WCF Futures project http://wcf.codeplex.com/. If you download Preview 5, it is in there. This is also a current version of System.Json, but it is only installed as part of Silverlight, and is different than the new one.
Don – not yet, I’ll give it a go tonight and include in my test and update the post with the result :-)
Pingback: Comparing Solr Response Sizes | Greg Sochanik
Pingback: Blogs From The Geeks » Blog Archive » Comparing Solr Response Sizes - Intermittent insightful nuggets