Yan Cui
I help clients go faster for less using serverless technologies.
This article is brought to you by
Don’t reinvent the patterns. Catalyst gives you consistent APIs for messaging, data, and workflow with key microservice patterns like circuit-breakers and retries for free.
It’s been a while since I last updated my binary and JSON serializer benchmarks, so here I round up the latest versions of the serializers on here.
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 was updated for this benchmark so there are no significant changes in numbers here (with the exception of the BinaryWriter!).
JSON
Quite a few of the JSON serializers have been updated:
- FsPickler
- Jil
- MongoDB Driver
- NetJson
- Newtonsoft.Json (aka Json.Net)
- ServiceStack.Text
Jil seems to have made the biggest gains since the last time.
*protobuf-net is in this list purely as a benchmark to show how the test JSON serializers compare to one of the fastest binary serializers (both in terms of speed and payload size)
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.
Any plans to add MS Bond to the list of binary formats?
good idea, fancy putting a PR in?
Pingback: MS Bond and Chiron benchmarked | theburningmonk.com
I’ve used this article many times to advocate for “performance as a feature” to companies. At this point the article is a year and a half out of date, and many of these libraries have had multiple updates (ex: NetJSON has had over 20)…. any chance you could re-run these tests with the latest and publish?
Hi Travis, sure thing. I have been away from the .Net world for about a year now hence the lack of update here, apologies.
I’ll put some time aside later this week to get these benchmarks updated. You should also take a look at Matt Warren’s BenchmarkDotNet library which is a very powerful tool for running benchmarks yourself and it spits out a bunch of useful metrics which I’m not able to capture with my simple benchmarks.