Yan Cui
I help clients go faster for less using serverless technologies.
DISCLAIMER : as always, you should 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 these example code to benchmark against your particular payload.
Binary
Only FsPickler and Json.Net was updated for this benchmark and there are no significant changes in performance in either update.
JSON
Quite a few of the JSON serializers had been updated since the last update :
- fastJSON
- FsPickler
- Jil
- MongoDB Driver
- NetJSON
- Json.Net
- ServiceStack.Text
- System.Text.Json
Of the updates, System.Text.Json has seen the biggest change in performance, nearly halved its deserialization time.
*protobuf-net is in this list purely as a benchmark to show how the tested JSON serializers compare to one of the fastest binary serializer in .Net.
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.
- Consulting: If you want to improve feature velocity, reduce costs, and make your systems more scalable, secure, and resilient, then let’s work together and make it happen.
- Join my FREE Community on Skool, where you can ask for help, share your success stories and hang out with me and other like-minded people without all the negativity from social media.
Thank you for this update. Note System.Text.Json now also includes support for JSONPath as a simple querying facility: https://github.com/ysharplanguage/FastJsonParser#JSONPath
System.Text.Json 2.0.0.8 released:
https://www.nuget.org/packages/System.Text.Json/2.0.0.8
Deserialization speed improvement.
Great, I’ll do another update in a week or two, give the others a chance to catch up ;-)
System.Text.Json 2.0.0.11 released:
https://www.nuget.org/packages/System.Text.Json/2.0.0.11
Stable.
FWIW, I’ve also added a few (deserialization-only) speed tests for NetJSON in my own benchmark, btw, alongside JSON.NET and ServiceStack:
https://github.com/ysharplanguage/FastJsonParser/commit/a9779721add13a74b3009bcc5b2f18d60a6a87e5#diff-8fea5bb10a644f9222dfeee825aa25d9
(those include the parsing of a Twitter API sample payload)
‘HTH,
That’s some through benchmark tests :-) I find the format hard to digest though, a lot of details and a lot to read. Not sure if you agree, but I personally prefer charts as a way to display benchmark results.
Bar chart of the speed tests results:
http://i.imgur.com/3NXqBEo.png
Pingback: Binary and Json benchmarks updated | theburningmonk.com