MoienTajik / ProtobufVsMsgPackBenchmark

A benchmark between Protobuf and MsgPack serializers with GZip compression alghorithm.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Steps to run:

  1. Install .NET Core 3.1 SDK from here: https://dot.net/core
  2. Execute dotnet run command in the root of the project.
  3. See benchmark results in BenchmarkDotNet.Artifacts folder.

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18363 Intel Core i7-6700HQ CPU 2.60GHz (Skylake), 1 CPU, 8 logical and 4 physical cores .NET Core SDK=3.1.201
[Host]: .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT DefaultJob : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT

Serialize + GZip Compression:

MethodMeanErrorStdDevMedianMsgPackOutputSizeProtobufOutputSize
MsgPackSerialize48.14 ms0.959 ms2.260 ms47.13 ms381793 bytes455954 bytes
ProtobufSerialize81.24 ms1.611 ms4.041 ms80.88 ms381793 bytes455954 bytes

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18363 Intel Core i7-6700HQ CPU 2.60GHz (Skylake), 1 CPU, 8 logical and 4 physical cores .NET Core SDK=3.1.201
[Host]: .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT DefaultJob : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT

Deserialize + GZip Decompression:

MethodMeanErrorStdDev
MsgPackDeserialize85.66 ms1.671 ms2.172 ms
ProtobufDeserialize107.33 ms2.002 ms2.142 ms
ezoic increase your site revenue

About

A benchmark between Protobuf and MsgPack serializers with GZip compression alghorithm.


Languages

Language:C# 100.0%