Note: don’t forget to check out the Benchmarks page to see the latest round up of binary and JSON serializers.
Since my last round of benchmarks on binary serializers, there’s a new player in town – MessageShark, which at the time of this writing does not support serialization of fields, but offers comparable speed and payload to protobuf-net.
Using the same test objects, here’s how MessageShark compares to the other binary serializers:
It’s early days for MessageShark but the signs are good, comparable serialization speed with protobuf-net and a noticeably faster deserialization speed, definitely one to keep an eye out for!
Just a quick note to mention that I will be speaking to The Developers Group on the 14th Mar about NoSQL Databases and how to use them to solve common web use cases.
In this session I’ll give an overview of the NoSQL movement and compare the different types of NoSQL databases and their relative trade-offs. There will be plenty of code demonstrations to show you how you might go about using NoSQL databases such as Redis and DynamoDB to solve everyday web problems such as figuring out who’s online, etc.
Anyway, hope to see you there, do come and grab me to say hi.
For illustration purposes only, here’s how you can implement the QuickSort algorithm in a few lines of code:
Note that I’ve not made the list generic to avoid complications and performance overheads associated with dealing with generics. Even then, my 5-line implementation pales in comparison with the built-in sort function:
This just goes to show how good the built-in functions are !
In case you’re wondering how a generic version of my QuickSort implementation would do in comparison, here’s the results:
Generic equality or comparison is pretty slow, so where possible (not in this case unfortunately) you should mark functions that requires generic comparison ‘inline’ to boost performance.