Here are some of the per­for­mance bench­marks I’ve col­lected per­son­ally, feel free to ref­er­ence them, but do keep in mind that they should be taken at face value only, and as a rule of thumb you should be bench­mark­ing against your actual data and use case.

The bench­marks shown here are mostly cre­ated with sim­ple POCOs, and may not be rep­re­sen­ta­tive of your par­tic­u­lar use case.

 

Binary Seri­al­iz­ers

Summary table

Bar chart

Properties vs Fields

Seri­al­iz­ers Tested

Bina­ry­For­mat­ter

protobuf-net v2.0.0.480

Msg­Pack v0.1.4298.15470

Mes­sage­Shark

 

More info here.

 

JSON Seri­al­iz­ers

image

image

Seri­al­iz­ers Tested

Json.Net v4.5.10

ServiceStack.Text v3.9.28

Dat­a­Con­trac­tJ­son­Se­ri­al­izer

JavaScript­Se­ri­al­izer

Sim­ple­J­son

fastJ­son v1.9.6

Jay­Rock v0.9.12915

JsonFx v2.0.1209.2802

Mon­goDB Dri­ver v1.6.1

 

More info here.

 

Sorted­Dic­tionary vs Dic­tio­nary vs Map vs Array

image

More info here.

 

Cost of throw­ing exceptions

image

image

More info here.

 

Hash­Set vs List vs Dictionary

image

image

image

More info here.

11 Responses to “Benchmarks”

  1. Daniel says:

    Hi,

    Both JSON.Net and Ser­viceS­tack has got­ten new releases. Any plans on updating?

    //Daniel

  2. […] and fea­ture rich. SisoDb, on the other hand relies on ServiceStack.Text. Com­pare bench­marks here: http://theburningmonk.com/benchmarks/ These stats com­pares the v4.07 release of JSON.Net and as of now there’s a v4.08 release and […]

  3. Eric Hexter says:

    Could you explain what the mea­sure­ments of the json tests rep­re­sent? What are the mea­sure­ments of the seri­al­iza­tion and dese­ri­al­iza­tion columns? I assume it is the total time taken to per­form the oper­a­tion on a batch num­ber of poco objects? Is that cor­rect ? Thanks, Eric

  4. theburningmonk says:

    Eric — those are aver­age times in mil­lisec­onds, for infor­ma­tion about the test itself, check out: http://theburningmonk.com/2011/08/performance-test-json-serializers/

  5. Omu says:

    hi Yan,
    it’s not clear on the pic­tures which ones are the best, the tall ones or the small ones, you haven’t explained in the text either, although most lazy ppl (me) won’t read the anyway

  6. max says:

    omu,u’d bet­ter use stan­dard serializer,json seri­al­izer and list,if u are that lazy.
    Thanks to Yan,
    Now i won­der how quick is our cus­tom serializer )

  7. […] are some more .NET related per­for­mance bench­marks, also using the ratio com­par­i­son method. This entry was posted in Uncat­e­go­rized by Jack Fox. […]

Leave a Reply