Adding NetSerializer to benchmark #30

Closed
tuananh opened this Issue Nov 14, 2016 · 2 comments

Projects

None yet

2 participants

@tuananh
tuananh commented Nov 14, 2016

It would be interesting to see NetSerializer in benchmark as well.

@neuecc
Owner
neuecc commented Nov 14, 2016 edited

I've added and here is result.

Small Object(int,string,string,enum) 10000 Iteration

ZeroFormatter
      Serialize   1.8551 ms
    Deserialize   1.3599 ms
    ReSerialize   0.8557 ms
    Binary Size   50.00 B

protobuf-net
      Serialize   4.5449 ms
    Deserialize   6.3167 ms
    ReSerialize   3.3418 ms
    Binary Size   23.00 B

MsgPack-CLI
      Serialize   5.3471 ms
    Deserialize   7.8614 ms
    ReSerialize   4.3592 ms
    Binary Size   26.00 B

JSON.NET
      Serialize   15.7172 ms
    Deserialize   27.2072 ms
    ReSerialize   15.9077 ms
    Binary Size   66.00 B

Jil
      Serialize   15.2854 ms
    Deserialize   13.6061 ms
    ReSerialize   8.8704 ms
    Binary Size   71.00 B

FsPickler
      Serialize   19.8484 ms
    Deserialize   9.2962 ms
    ReSerialize   8.9654 ms
    Binary Size   44.00 B

BinaryFormatter
      Serialize   47.6656 ms
    Deserialize   56.3446 ms
    ReSerialize   49.5751 ms
    Binary Size   285.00 B

DataContractSerializer
      Serialize   15.7713 ms
    Deserialize   50.2063 ms
    ReSerialize   15.5676 ms
    Binary Size   206.00 B

FlatBuffers
      Serialize   7.3251 ms
    Deserialize   0.2959 ms
    ReSerialize   0.234 ms
    Binary Size   60.00 B

Google.Protobuf
      Serialize   3.2048 ms
    Deserialize   1.4458 ms
    ReSerialize   4.7423 ms
    Binary Size   23.00 B

Wire
      Serialize   4.2967 ms
    Deserialize   7.5835 ms
    ReSerialize   9.7147 ms
    Binary Size   119.00 B

NetSerializer
      Serialize   5.5223 ms
    Deserialize   6.6614 ms
    ReSerialize   5.8919 ms
    Binary Size   21.00 B

Large Array(SmallObject[1000]) 10000 Iteration

ZeroFormatter
      Serialize   1266.9787 ms
    Deserialize   0.9044 ms
    ReSerialize   34.9833 ms
    Binary Size   52.74 KB

protobuf-net
      Serialize   3570.8516 ms
    Deserialize   5225.163 ms
    ReSerialize   3926.3359 ms
    Binary Size   23.44 KB

MsgPack-CLI
      Serialize   3704.2953 ms
    Deserialize   11898.7573 ms
    ReSerialize   3775.6163 ms
    Binary Size   25.39 KB

JSON.NET
      Serialize   11145.4859 ms
    Deserialize   19450.2392 ms
    ReSerialize   10758.6816 ms
    Binary Size   61.53 KB

Jil
      Serialize   4608.7012 ms
    Deserialize   6202.939 ms
    ReSerialize   4521.6067 ms
    Binary Size   68.36 KB

FsPickler
      Serialize   4042.859 ms
    Deserialize   3715.1198 ms
    ReSerialize   4056.8852 ms
    Binary Size   25.53 KB

BinaryFormatter
      Serialize   24109.072 ms
    Deserialize   25401.3951 ms
    ReSerialize   25095.4814 ms
    Binary Size   37.38 KB

DataContractSerializer
      Serialize   8388.1909 ms
    Deserialize   22128.9354 ms
    ReSerialize   8116.337 ms
    Binary Size   103.64 KB

FlatBuffers
      Serialize   2775.7161 ms
    Deserialize   0.5462 ms
    ReSerialize   30.6845 ms
    Binary Size   46.91 KB

Google.Protobuf
      Serialize   1128.7792 ms
    Deserialize   1865.5617 ms
    ReSerialize   1147.8314 ms
    Binary Size   23.44 KB

Wire
      Serialize   3958.344 ms
    Deserialize   4642.7679 ms
    ReSerialize   3623.6012 ms
    Binary Size   25.54 KB

NetSerializer
      Serialize   2410.2118 ms
    Deserialize   3172.8247 ms
    ReSerialize   2445.6432 ms
    Binary Size   20.51 KB

Additional Benchmarks

Int32(1) 10000 Iteration

ZeroFormatter
      Serialize   0.1298 ms
    Deserialize   0.0582 ms
    ReSerialize   0.1252 ms
    Binary Size   4.00 B

MsgPack-CLI
      Serialize   1.1315 ms
    Deserialize   1.1228 ms
    ReSerialize   1.0116 ms
    Binary Size   1.00 B

protobuf-net
      Serialize   9.2625 ms
    Deserialize   13.9135 ms
    ReSerialize   12.2261 ms
    Binary Size   2.00 B

Wire
      Serialize   1.8277 ms
    Deserialize   0.469 ms
    ReSerialize   1.3971 ms
    Binary Size   5.00 B

NetSerializer
      Serialize   0.8025 ms
    Deserialize   0.3112 ms
    ReSerialize   0.8283 ms
    Binary Size   1.00 B

Vector3(float, float, float) 10000 Iteration

ZeroFormatter
      Serialize   0.2962 ms
    Deserialize   0.1634 ms
    ReSerialize   0.4978 ms
    Binary Size   12.00 B

MsgPack-CLI
      Serialize   2.8577 ms
    Deserialize   4.1545 ms
    ReSerialize   2.611 ms
    Binary Size   17.00 B

protobuf-net
      Serialize   2.7673 ms
    Deserialize   4.5875 ms
    ReSerialize   2.7964 ms
    Binary Size   15.00 B

Wire
      Serialize   2.3109 ms
    Deserialize   3.2015 ms
    ReSerialize   2.3592 ms
    Binary Size   64.00 B

NetSerializer
      Serialize   1.9951 ms
    Deserialize   1.0188 ms
    ReSerialize   1.5489 ms
    Binary Size   15.00 B

HtmlString(307286bytes) 10000 Iteration

ZeroFormatter
      Serialize   4836.2475 ms
    Deserialize   4324.4544 ms
    ReSerialize   4817.6355 ms
    Binary Size   300.09 KB

MsgPack-CLI
      Serialize   7323.7937 ms
    Deserialize   5505.3775 ms
    ReSerialize   7357.3817 ms
    Binary Size   300.09 KB

protobuf-net
      Serialize   6120.4228 ms
    Deserialize   9885.7103 ms
    ReSerialize   6261.8605 ms
    Binary Size   300.09 KB

Wire
      Serialize   6086.3015 ms
    Deserialize   5314.6822 ms
    ReSerialize   6215.5026 ms
    Binary Size   300.09 KB

NetSerializer
      Serialize   8326.406 ms
    Deserialize   7132.9981 ms
    ReSerialize   8066.938 ms
    Binary Size   300.09 KB

Vector3[100] 10000 Iteration

ZeroFormatter
      Serialize   22.5887 ms
    Deserialize   1.2568 ms
    ReSerialize   1.249 ms
    Binary Size   1.18 KB

MsgPack-CLI
      Serialize   181.3932 ms
    Deserialize   617.9845 ms
    ReSerialize   187.4778 ms
    Binary Size   1.66 KB

protobuf-net
      Serialize   507.5778 ms
    Deserialize   840.3586 ms
    ReSerialize   849.1467 ms
    Binary Size   1.66 KB

Wire
      Serialize   182.4332 ms
    Deserialize   154.079 ms
    ReSerialize   146.8867 ms
    Binary Size   1.57 KB

NetSerializer
      Serialize   81.347 ms
    Deserialize   67.6246 ms
    ReSerialize   82.8145 ms
    Binary Size   1.47 KB
@neuecc
Owner
neuecc commented Nov 15, 2016

Here is Wire's benchmark (with ZeroFormatter) result.
https://gist.github.com/neuecc/05a25a2227f0bf464b458b75e99412e1

@neuecc neuecc closed this Dec 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment