Note: don’t for­get to check out the Bench­marks page to see the lat­est round up of binary and JSON serializers.

 

Since my last round of bench­marks on binary seri­al­iz­ers, there’s a new player in town – Mes­sage­Shark, which at the time of this writ­ing does not sup­port seri­al­iza­tion of fields, but offers com­pa­ra­ble speed and pay­load to protobuf-net.

Using the same test objects, here’s how Mes­sage­Shark com­pares to the other binary serializers:

Untitled_1

Untitled_2

Untitled

It’s early days for Mes­sage­Shark but the signs are good, com­pa­ra­ble seri­al­iza­tion speed with protobuf-net and a notice­ably faster dese­ri­al­iza­tion speed, def­i­nitely one to keep an eye out for!

Share

Just a quick note to men­tion that I will be speak­ing to The Devel­op­ers Group on the 14th Mar about NoSQL Data­bases and how to use them to solve com­mon web use cases.

In this ses­sion I’ll give an overview of the NoSQL move­ment and com­pare the dif­fer­ent types of NoSQL data­bases and their rel­a­tive trade-offs. There will be plenty of code demon­stra­tions to show you how you might go about using NoSQL data­bases such as Redis and DynamoDB to solve every­day web prob­lems such as fig­ur­ing out who’s online, etc.

Any­way, hope to see you there, do come and grab me to say hi. Smile

Share

For illus­tra­tion pur­poses only, here’s how you can imple­ment the Quick­Sort algo­rithm in a few lines of code:

image

Note that I’ve not made the list generic to avoid com­pli­ca­tions and per­for­mance over­heads asso­ci­ated with deal­ing with gener­ics. Even then, my 5-line imple­men­ta­tion pales in com­par­i­son with the built-in sort function:

image

This just goes to show how good the built-in func­tions are Winking smile!

In case you’re won­der­ing how a generic ver­sion of my Quick­Sort imple­men­ta­tion would do in com­par­i­son, here’s the results:

image

image

Generic equal­ity or com­par­i­son is pretty slow, so where pos­si­ble (not in this case unfor­tu­nately) you should mark func­tions that requires generic com­par­i­son ‘inline’ to boost per­for­mance.

Share