Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/oleg-st/ZstdSharp
Browse files Browse the repository at this point in the history
  • Loading branch information
oleg-st committed Mar 10, 2022
2 parents 25d339e + 4382633 commit d2da44d
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
[![NuGet package](https://img.shields.io/nuget/v/ZstdSharp.Port.svg?logo=NuGet)](https://www.nuget.org/packages/ZstdSharp.Port)

ZstdSharp is a port of [zstd compression library](https://github.com/facebook/zstd) to С#
Based on Zstandard v1.5.0
Supports .NET Core 3.1, .NET 5, .NET Standard 2.0+, .NET Framework 4.6.1+
Based on Zstandard v1.5.1
Supports .NET Core 3.1, .NET 5, .NET 6, .NET Standard 2.0+, .NET Framework 4.6.1+

# Usage

Expand All @@ -31,28 +31,28 @@ Best performance is achieved on `.NET Core`. `System.Runtime.Intrinsics` namespa

Comparision `zstd` (native) and `ZstdSharp`
```
BenchmarkDotNet=v0.12.1, OS=Windows 10.0.19041.1052 (2004/?/20H1)
BenchmarkDotNet=v0.13.1, OS=Windows 10.0.19043.1415 (21H1/May2021Update)
Intel Core i7-2600K CPU 3.40GHz (Sandy Bridge), 1 CPU, 8 logical and 4 physical cores
.NET Core SDK=5.0.204
[Host] : .NET Core 5.0.7 (CoreCLR 5.0.721.25508, CoreFX 5.0.721.25508), X64 RyuJIT
DefaultJob : .NET Core 5.0.7 (CoreCLR 5.0.721.25508, CoreFX 5.0.721.25508), X64 RyuJIT
.NET SDK=6.0.101
[Host] : .NET 6.0.1 (6.0.121.56705), X64 RyuJIT
DefaultJob : .NET 6.0.1 (6.0.121.56705), X64 RyuJIT
```

Compression level 1
| Method | Mean | Error | StdDev | Ratio | RatioSD |
|----------------- |---------:|---------:|---------:|------:|--------:|
| CompressNative | 51.20 ms | 1.022 ms | 1.621 ms | 1.00 | 0.00 |
| CompressSharp | 68.76 ms | 1.287 ms | 1.074 ms | 1.34 | 0.05 |
| | | | | | |
| DecompressNative | 15.64 ms | 0.253 ms | 0.224 ms | 1.00 | 0.00 |
| DecompressSharp | 20.98 ms | 0.253 ms | 0.224 ms | 1.34 | 0.02 |
| Method | Mean | Error | StdDev | Ratio | RatioSD | InstructionRetired/Op |
|----------------- |---------:|---------:|---------:|------:|--------:|----------------------:|
| CompressNative | 45.26 ms | 0.750 ms | 0.702 ms | 1.00 | 0.00 | 399,751,515 |
| CompressSharp | 64.31 ms | 0.310 ms | 0.259 ms | 1.42 | 0.03 | 524,542,857 |
| | | | | | | |
| DecompressNative | 14.27 ms | 0.281 ms | 0.335 ms | 1.00 | 0.00 | 155,238,636 |
| DecompressSharp | 20.06 ms | 0.102 ms | 0.085 ms | 1.41 | 0.03 | 188,704,167 |


Compression level 5
| Method | Mean | Error | StdDev | Ratio | RatioSD |
|----------------- |----------:|---------:|---------:|------:|--------:|
| CompressNative | 205.69 ms | 3.887 ms | 4.159 ms | 1.00 | 0.00 |
| CompressSharp | 212.88 ms | 2.141 ms | 1.898 ms | 1.04 | 0.02 |
| | | | | | |
| DecompressNative | 21.91 ms | 0.430 ms | 0.528 ms | 1.00 | 0.00 |
| DecompressSharp | 27.77 ms | 0.528 ms | 0.519 ms | 1.26 | 0.03 |
| Method | Mean | Error | StdDev | Median | Ratio | RatioSD | InstructionRetired/Op |
|----------------- |----------:|---------:|---------:|----------:|------:|--------:|----------------------:|
| CompressNative | 153.35 ms | 3.049 ms | 8.747 ms | 150.53 ms | 1.00 | 0.00 | 1,103,210,938 |
| CompressSharp | 198.80 ms | 3.927 ms | 8.368 ms | 195.48 ms | 1.29 | 0.08 | 1,527,494,444 |
| | | | | | | | |
| DecompressNative | 17.01 ms | 0.226 ms | 0.212 ms | 16.97 ms | 1.00 | 0.00 | 206,341,667 |
| DecompressSharp | 25.86 ms | 0.513 ms | 1.037 ms | 25.58 ms | 1.56 | 0.07 | 261,462,010 |

0 comments on commit d2da44d

Please sign in to comment.