Benchmark of StreamAsync Compressors in terms of Execution Time
BenchmarkDotNet v0.13.12, Windows 11 (10.0.22631.3085/23H2/2023Update/SunValley3)
AMD Ryzen 7 5800H with Radeon Graphics, 1 CPU, 16 logical and 8 physical cores
.NET SDK 8.0.101
[Host] : .NET 8.0.1 (8.0.123.58001), X64 RyuJIT AVX2
Job-KKQZIR : .NET 8.0.1 (8.0.123.58001), X64 RyuJIT AVX2
RunStrategy=Throughput Compressed=EasyCompressor.Benchmarks.BaseBenchmark+CompressedArg
Comparison: Mean
Compressor | CompressedSize | Data | Compress | Decompress | CompressAndDecompress |
SnappyCompressor (deprecated) |
4,755 bytes (23.00 %) |
Large (20 KB) |
14,644.8 ns |
8,574.4 ns |
23,656.0 ns |
LZ4Compressor |
4,386 bytes (21.22 %) |
Large (20 KB) |
16,010.6 ns |
11,154.2 ns |
27,745.1 ns |
ZstdCompressor (deprecated) |
3,622 bytes (17.52 %) |
Large (20 KB) |
24,120.7 ns |
11,361.8 ns |
36,962.8 ns |
BrotliCompressor |
3,650 bytes (17.66 %) |
Large (20 KB) |
37,848.9 ns |
30,131.8 ns |
70,597.4 ns |
BrotliNETCompressor (deprecated) |
3,650 bytes (17.66 %) |
Large (20 KB) |
60,426.2 ns |
38,928.8 ns |
122,280.9 ns |
DeflateCompressor |
3,573 bytes (17.28 %) |
Large (20 KB) |
63,622.2 ns |
19,362.8 ns |
87,821.8 ns |
GZipCompressor |
3,591 bytes (17.37 %) |
Large (20 KB) |
64,580.8 ns |
20,610.5 ns |
90,733.8 ns |
ZstdSharpCompressor |
3,622 bytes (17.52 %) |
Large (20 KB) |
65,526.4 ns |
11,459.7 ns |
88,174.1 ns |
ZLibCompressor |
3,579 bytes (17.31 %) |
Large (20 KB) |
69,111.9 ns |
25,603.6 ns |
99,154.5 ns |
SnappierCompressor |
4,751 bytes (22.98 %) |
Large (20 KB) |
228,411.8 ns |
282.1 ns (doubtful) |
253,606.3 ns |
LZMACompressor |
2,866 bytes (13.86 %) |
Large (20 KB) |
3,971,263.3 ns |
579,658.3 ns |
4,643,702.3 ns |
Compressor | CompressedSize | Data | Compress | Decompress | CompressAndDecompress |
LZ4Compressor |
928 bytes (9.33 %) |
Medium (10 KB) |
4,228.8 ns |
4,579.8 ns |
9,767.7 ns |
SnappyCompressor (deprecated) |
1,270 bytes (12.76 %) |
Medium (10 KB) |
4,463.6 ns |
2,409.3 ns |
7,299.5 ns |
ZstdCompressor (deprecated) |
860 bytes (8.64 %) |
Medium (10 KB) |
8,001.1 ns |
4,100.2 ns |
12,634.0 ns |
BrotliCompressor |
794 bytes (7.98 %) |
Medium (10 KB) |
11,557.1 ns |
16,380.9 ns |
29,384.2 ns |
DeflateCompressor |
875 bytes (8.79 %) |
Medium (10 KB) |
21,555.7 ns |
7,762.2 ns |
31,896.0 ns |
BrotliNETCompressor (deprecated) |
794 bytes (7.98 %) |
Medium (10 KB) |
21,560.9 ns |
22,569.1 ns |
58,671.1 ns |
GZipCompressor |
893 bytes (8.97 %) |
Medium (10 KB) |
22,367.1 ns |
8,376.4 ns |
32,976.6 ns |
ZLibCompressor |
881 bytes (8.85 %) |
Medium (10 KB) |
24,375.6 ns |
10,504.6 ns |
37,014.9 ns |
ZstdSharpCompressor |
860 bytes (8.64 %) |
Medium (10 KB) |
43,693.7 ns |
2,539.8 ns |
51,139.5 ns |
SnappierCompressor |
1,289 bytes (12.95 %) |
Medium (10 KB) |
229,299.3 ns |
261.9 ns (doubtful) |
255,903.0 ns |
LZMACompressor |
741 bytes (7.45 %) |
Medium (10 KB) |
1,680,814.5 ns |
172,353.0 ns |
1,876,086.2 ns |
Compressor | CompressedSize | Data | Compress | Decompress | CompressAndDecompress |
SnappyCompressor (deprecated) |
1,772 bytes (88.16 %) |
Small (2 KB) |
3,431.3 ns |
1,071.3 ns |
4,590.8 ns |
LZ4Compressor |
1,768 bytes (87.96 %) |
Small (2 KB) |
6,084.0 ns |
2,347.1 ns |
8,759.5 ns |
ZstdCompressor (deprecated) |
1,687 bytes (83.93 %) |
Small (2 KB) |
7,193.7 ns |
2,879.3 ns |
10,878.5 ns |
BrotliCompressor |
1,494 bytes (74.33 %) |
Small (2 KB) |
14,793.3 ns |
9,933.5 ns |
25,898.0 ns |
BrotliNETCompressor (deprecated) |
1,494 bytes (74.33 %) |
Small (2 KB) |
26,960.8 ns |
15,195.7 ns |
52,526.5 ns |
DeflateCompressor |
1,392 bytes (69.25 %) |
Small (2 KB) |
29,095.4 ns |
8,278.8 ns |
38,987.3 ns |
GZipCompressor |
1,410 bytes (70.15 %) |
Small (2 KB) |
29,584.2 ns |
8,341.8 ns |
39,802.9 ns |
ZLibCompressor |
1,398 bytes (69.55 %) |
Small (2 KB) |
29,807.0 ns |
8,654.5 ns |
40,293.0 ns |
ZstdSharpCompressor |
1,687 bytes (83.93 %) |
Small (2 KB) |
41,063.8 ns |
1,880.7 ns |
41,129.0 ns |
SnappierCompressor |
1,812 bytes (90.15 %) |
Small (2 KB) |
147,274.3 ns |
248.1 ns (doubtful) |
192,026.9 ns |
LZMACompressor |
1,337 bytes (66.52 %) |
Small (2 KB) |
1,444,927.8 ns |
240,482.2 ns |
1,745,869.1 ns |