Skip to content

Instantly share code, notes, and snippets.

@Oipo
Last active January 25, 2018 15:39
Show Gist options
  • Save Oipo/9d9825d4df50a399497e747f03e933f0 to your computer and use it in GitHub Desktop.
Save Oipo/9d9825d4df50a399497e747f03e933f0 to your computer and use it in GitHub Desktop.
GLD.SerializerBenchmark output
Tests performed 100 times for each TestData + Serializer pair
################################################################################
Test Data: Person
Serializer: Ops/sec Avg: Ser Deser Ser+Deser Size: Avg
===============================================================================
MessageShark Stream 354.808 373.007 181.495 642
NetSerializer Stream 344.589 352.864 173.695 647
ProtoBuf Stream 316.466 227.366 131.948 687
NetSerializer string 300.554 219.123 126.668 864
MessageShark string 277.293 224.737 123.922 856
NetJSON string 287.113 196.741 116.433 1.168
ProtoBuf string 276.062 162.045 101.957 916
WireSerializer Stream 169.824 189.345 89.121 1.170
Jil string 139.533 173.502 77.056 1.187
WireSerializer string 149.561 119.915 66.075 1.560
MsgPack Stream 173.502 106.452 65.864 627
Jil Stream 129.260 129.721 64.459 1.187
MsgPack string 170.408 91.483 59.360 836
Json.Net string 116.608 98.267 53.230 1.192
ServiceStack Type string 121.505 92.034 52.264 1.044
Json.Net Stream 110.134 90.865 49.666 1.192
HaveBoxJSON string 151.809 67.034 46.463 1.195
ServiceStack Json string 107.326 76.272 44.449 1.187
ServiceStack Type Stream 101.836 77.995 44.063 1.044
HaveBoxJSON Stream 124.881 62.975 41.697 1.195
Json.Net (Helper) string 87.169 76.496 40.655 1.192
ServiceStack Json Stream 100.415 67.543 40.242 1.187
MS DataContract Stream 115.946 61.037 39.887 2.172
Json.Net (Helper) Stream 78.742 69.632 36.903 1.192
MS XmlSerializer string 83.050 56.938 33.713 2.791
fastJson string 89.706 53.934 33.493 1.845
MS DataContract string 95.161 47.717 31.682 2.896
MS XmlSerializer Stream 76.576 53.025 31.224 2.773
fastJson Stream 81.984 49.794 30.921 1.845
MS DataContract Json Stream 100.880 39.184 28.151 1.182
MS DataContract Json string 91.963 35.551 25.590 1.576
MS Binary Stream 46.206 49.313 23.771 1.902
MS Binary string 41.146 39.231 19.984 2.536
SharpSerializer Stream 42.926 37.082 19.860 1.564
SharpSerializer string 40.039 32.792 17.994 2.088
NFX.Slim Stream 11.373 98.532 10.190 887
NFX.Slim string 11.181 77.501 9.764 1.184
MS JavaScript string 11.605 26.173 8.021 1.182
MS JavaScript Stream 11.525 25.297 7.907 1.182
JsonFx string 48.211 1.253 1.221 1.188
JsonFx Stream 47.239 1.177 1.148 1.188
Errors in Person
................................................................................
NetJSON -Streams
Element numbers of source and target test objects are not equal: [47] != [1]
NFX.Json -strings
Element numbers of source and target test objects are not equal: [47] != [1]
NFX.Json -Streams
Serialization Exception: Cannot access a closed Stream.
Salar.Bois -strings
Element numbers of source and target test objects are not equal: [47] != [1]
Salar.Bois -Streams
Element numbers of source and target test objects are not equal: [47] != [1]
Test Data: Integer
Serializer: Ops/sec Avg: Ser Deser Ser+Deser Size: Avg
===============================================================================
NetSerializer Stream 4.231.807 7.727.273 2.614.443 6
NetSerializer string 3.264.099 4.528.619 1.847.162 8
Json.Net string 3.325.872 3.805.682 1.701.828 10
ServiceStack Type string 4.259.259 2.605.339 1.584.656 10
WireSerializer string 2.530.303 3.572.084 1.452.345 8
fastJson string 2.282.512 2.655.002 1.210.859 10
Salar.Bois string 2.466.330 2.229.798 1.158.307 4
ServiceStack Json string 2.207.418 2.211.760 1.087.424 10
WireSerializer Stream 1.402.674 5.096.801 996.376 5
NetJSON string 1.829.289 2.122.895 969.121 10
MsgPack string 1.624.739 1.685.826 822.238 8
ServiceStack Type Stream 1.538.210 1.823.036 799.486 10
Json.Net Stream 1.268.988 2.228.074 776.654 10
MsgPack Stream 1.187.457 2.358.425 751.715 5
Jil string 754.275 1.690.128 515.064 10
fastJson Stream 964.939 1.081.345 507.324 10
ServiceStack Json Stream 866.384 1.191.615 490.587 10
MS JavaScript string 1.567.232 671.642 466.684 10
Json.Net (Helper) string 900.433 820.466 422.553 10
Jil Stream 727.971 723.045 351.039 10
JsonFx string 972.312 533.044 340.304 10
MS JavaScript Stream 620.178 583.372 295.657 10
MS DataContract Json Stream 858.717 447.620 288.719 10
JsonFx Stream 635.078 514.471 280.375 10
Json.Net (Helper) Stream 570.658 520.986 264.873 10
MS DataContract Json string 734.961 395.973 253.520 16
MS DataContract Stream 696.448 379.728 238.272 81
NFX.Json string 3.175.084 212.782 199.066 10
MS DataContract string 490.335 275.714 173.798 108
MS XmlSerializer Stream 352.638 307.522 161.539 44
ProtoBuf string 179.304 1.123.989 154.198 8
ProtoBuf Stream 178.470 824.596 143.276 6
MS Binary Stream 252.831 332.702 141.291 54
SharpSerializer Stream 797.736 165.947 136.542 103
MS XmlSerializer string 411.230 204.719 135.234 62
MS Binary string 233.487 301.235 130.810 72
SharpSerializer string 480.348 144.609 110.139 140
NFX.Slim string 13.273 260.182 12.611 24
NFX.Slim Stream 13.032 273.084 12.419 17
Errors in Integer
................................................................................
HaveBoxJSON -strings
Deserialization Exception: Index was outside the bounds of the array.
HaveBoxJSON -Streams
Deserialization Exception: Index was outside the bounds of the array.
MessageShark -strings
Seems serialization failed. Serialized object size = 0 is too small.
MessageShark -Streams
Seems serialization failed. Serialized object size = 0 is too small.
NetJSON -Streams
Seems serialization failed. Serialized object size = 0 is too small.
NFX.Json -Streams
Serialization Exception: Cannot access a closed Stream.
Salar.Bois -Streams
Seems serialization failed. Serialized object size = 1 is too small.
Test Data: String Array
Serializer: Ops/sec Avg: Ser Deser Ser+Deser Size: Avg
===============================================================================
ServiceStack Type string 605.025 682.375 317.473 134
NetJSON string 529.606 775.213 311.870 173
NetSerializer Stream 399.145 865.944 271.762 155
fastJson string 415.018 843.569 268.727 176
ServiceStack Type Stream 506.714 551.074 261.953 134
WireSerializer Stream 374.300 853.212 259.607 138
MsgPack Stream 406.698 639.411 247.551 136
ServiceStack Json string 503.366 437.342 232.710 176
NetSerializer string 382.864 593.535 231.083 209
fastJson Stream 364.011 652.272 231.060 174
WireSerializer string 349.883 589.678 218.624 187
Jil string 315.612 737.035 218.142 173
Json.Net string 384.300 472.277 209.760 174
MsgPack string 374.935 479.335 209.556 183
Json.Net Stream 339.188 443.668 189.123 176
Jil Stream 299.273 516.682 187.273 175
ServiceStack Json Stream 417.389 338.889 186.050 175
MS JavaScript string 277.934 269.929 136.501 174
Json.Net (Helper) string 232.788 282.941 127.008 175
MS JavaScript Stream 223.618 229.722 113.101 173
HaveBoxJSON string 369.860 156.083 109.283 175
Json.Net (Helper) Stream 196.627 245.579 108.765 174
MS DataContract Json Stream 277.288 165.078 102.752 175
HaveBoxJSON Stream 337.385 147.787 102.361 174
MS DataContract Json string 250.293 145.531 91.398 235
MS DataContract Stream 221.448 150.901 89.319 603
MS Binary Stream 140.477 243.995 88.069 256
MS Binary string 130.807 205.171 79.255 344
MS DataContract string 208.701 121.232 76.412 804
MS XmlSerializer Stream 152.827 115.950 65.669 687
MS XmlSerializer string 147.297 111.127 63.194 706
SharpSerializer Stream 113.784 80.914 47.140 410
SharpSerializer string 108.191 75.118 44.264 548
ProtoBuf Stream 54.510 54.872 27.304 153
ProtoBuf string 53.725 53.326 26.718 207
NFX.Slim Stream 12.959 210.878 12.192 168
NFX.Slim string 12.860 189.982 12.037 227
JsonFx string 201.788 1.650 1.637 174
JsonFx Stream 192.941 1.651 1.636 176
Errors in String Array
................................................................................
MessageShark -strings
Serialization Exception: The type initializer for 'MessageSharkCachedSerializer`1' threw an exception.
MessageShark -Streams
Serialization Exception: The type initializer for 'MessageSharkCachedSerializer`1' threw an exception.
NetJSON -Streams
Element numbers of source and target test objects are not equal: [20] != [1]
NFX.Json -strings
Element numbers of source and target test objects are not equal: [20] != [1]
NFX.Json -Streams
Serialization Exception: Cannot access a closed Stream.
Salar.Bois -strings
Element numbers of source and target test objects are not equal: [20] != [1]
Salar.Bois -Streams
Element numbers of source and target test objects are not equal: [20] != [1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment