Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some more benchmarks #1

Closed
Viq111 opened this issue Jun 1, 2016 · 2 comments
Closed

Some more benchmarks #1

Viq111 opened this issue Jun 1, 2016 · 2 comments

Comments

@Viq111
Copy link
Collaborator

Viq111 commented Jun 1, 2016

Go Versions benchmarks

Tests and benchs (payload is mr from silesia corpus):

 eval "$(gimme 1.4.2)"
go version go1.4.2 linux/amd64
 go test -bench .
PASS
BenchmarkUnsafeDecompress         30      47481504 ns/op     209.99 MB/s
BenchmarkFzlibDecompress          30      48686951 ns/op     204.79 MB/s
BenchmarkCzlibDecompress          20      53068259 ns/op     187.88 MB/s
BenchmarkZlibDecompress       10     158092207 ns/op      63.07 MB/s
BenchmarkUnsafeCompress        2     664396361 ns/op      15.01 MB/s
BenchmarkFzlibCompress         2     703111095 ns/op      14.18 MB/s
BenchmarkCzlibCompress         2     737086124 ns/op      13.53 MB/s
BenchmarkZlibCompress          1    2163086773 ns/op       4.61 MB/s
 eval "$(gimme 1.6.1)"
go version go1.6.1 linux/amd64
 go test -bench .
PASS
BenchmarkUnsafeDecompress-4       30      74960391 ns/op     133.01 MB/s
BenchmarkFzlibDecompress-4        20      71395036 ns/op     139.65 MB/s
BenchmarkCzlibDecompress-4         1    1929882049 ns/op       5.17 MB/s
BenchmarkZlibDecompress-4          5     202957234 ns/op      49.13 MB/s
BenchmarkUnsafeCompress-4          2     716153507 ns/op      13.92 MB/s
BenchmarkFzlibCompress-4           2     712060351 ns/op      14.00 MB/s
BenchmarkCzlibCompress-4           2     976679206 ns/op      10.21 MB/s
BenchmarkZlibCompress-4            1    1808744762 ns/op       5.51 MB/s
 eval "$(gimme 1.6.1)"
go version go1.6.1 linux/amd64
 export GODEBUG=cgocheck=0
 go test -bench .
PASS
BenchmarkUnsafeDecompress-4       20      64997217 ns/op     153.40 MB/s
BenchmarkFzlibDecompress-4        20      69500434 ns/op     143.46 MB/s
BenchmarkCzlibDecompress-4        20      58652419 ns/op     169.99 MB/s
BenchmarkZlibDecompress-4         10     138611158 ns/op      71.93 MB/s
BenchmarkUnsafeCompress-4          2     671414987 ns/op      14.85 MB/s
BenchmarkFzlibCompress-4           2     676213336 ns/op      14.74 MB/s
BenchmarkCzlibCompress-4           2     754176802 ns/op      13.22 MB/s
BenchmarkZlibCompress-4            1    1482097992 ns/op       6.73 MB/s
@Viq111
Copy link
Collaborator Author

Viq111 commented Jun 1, 2016

Payload size influence

Payload is a pdf file with mixed images and text. (We get the first x bytes of the file for each test)

+--------------+-------------+------------+-------------------+------------------+---------------------+--------------------+
| Payload Size | czlib ratio | zstd ratio | czlib compression | zstd compression | czlib decompression | zstd decompression |
+--------------+-------------+------------+-------------------+------------------+---------------------+--------------------+
|    1.00 B    |   900.00 %  | 1200.00 %  |     0.21 MB/s     |    0.31 MB/s     |      1.40 MB/s      |     0.30 MB/s      |
|    2.00 B    |   500.00 %  |  650.00 %  |     0.41 MB/s     |    0.63 MB/s     |      2.82 MB/s      |     0.67 MB/s      |
|    3.00 B    |   366.67 %  |  466.67 %  |     0.63 MB/s     |    0.94 MB/s     |      3.80 MB/s      |     1.04 MB/s      |
|    5.00 B    |   260.00 %  |  320.00 %  |     0.02 MB/s     |    1.59 MB/s     |      6.41 MB/s      |     1.65 MB/s      |
|    7.00 B    |   214.29 %  |  257.14 %  |     1.20 MB/s     |    2.21 MB/s     |      8.29 MB/s      |     2.33 MB/s      |
|   11.00 B    |   172.73 %  |  200.00 %  |     1.92 MB/s     |    3.23 MB/s     |      12.45 MB/s     |     4.08 MB/s      |
|   17.00 B    |   152.94 %  |  164.71 %  |     2.28 MB/s     |    5.07 MB/s     |      18.38 MB/s     |     5.81 MB/s      |
|   27.00 B    |   133.33 %  |  140.74 %  |     4.15 MB/s     |    7.63 MB/s     |      26.52 MB/s     |     9.26 MB/s      |
|   41.00 B    |   121.95 %  |  126.83 %  |     5.61 MB/s     |    10.24 MB/s    |      30.50 MB/s     |     12.30 MB/s     |
|   62.00 B    |   111.29 %  |  117.74 %  |     6.36 MB/s     |    14.84 MB/s    |      48.95 MB/s     |     18.44 MB/s     |
|   93.00 B    |   107.53 %  |  111.83 %  |     8.80 MB/s     |    8.72 MB/s     |      45.73 MB/s     |     29.04 MB/s     |
|   141.00 B   |   106.38 %  |  107.80 %  |     10.44 MB/s    |    9.61 MB/s     |      65.46 MB/s     |     45.43 MB/s     |
|   214.00 B   |   105.14 %  |  105.14 %  |     11.86 MB/s    |    14.37 MB/s    |     121.49 MB/s     |     58.82 MB/s     |
|   323.00 B   |   103.41 %  |  103.41 %  |     12.90 MB/s    |    16.40 MB/s    |     166.44 MB/s     |    102.12 MB/s     |
|   489.00 B   |   102.25 %  |  102.25 %  |     13.91 MB/s    |    23.60 MB/s    |     199.22 MB/s     |    149.05 MB/s     |
|   739.00 B   |   101.49 %  |  101.49 %  |     18.66 MB/s    |    28.24 MB/s    |     245.79 MB/s     |    223.05 MB/s     |
|   1.12 KB    |   100.98 %  |  100.98 %  |     3.11 MB/s     |    37.00 MB/s    |     258.45 MB/s     |    349.39 MB/s     |
|   1.69 KB    |   93.84 %   |  93.43 %   |     24.24 MB/s    |    41.52 MB/s    |     117.51 MB/s     |    400.43 MB/s     |
|   2.55 KB    |   65.84 %   |  65.53 %   |     30.15 MB/s    |    52.20 MB/s    |     158.35 MB/s     |    546.26 MB/s     |
|   3.86 KB    |   43.81 %   |  43.36 %   |     42.46 MB/s    |    82.41 MB/s    |     191.04 MB/s     |    646.13 MB/s     |
|   5.83 KB    |   29.21 %   |  28.70 %   |     58.14 MB/s    |   118.43 MB/s    |     209.39 MB/s     |    740.15 MB/s     |
|   8.81 KB    |   19.45 %   |  18.99 %   |     67.88 MB/s    |   192.56 MB/s    |     231.72 MB/s     |    857.40 MB/s     |
|   13.31 KB   |   17.42 %   |  16.87 %   |     91.19 MB/s    |   123.24 MB/s    |     249.78 MB/s     |    880.23 MB/s     |
|   20.12 KB   |   44.63 %   |  44.90 %   |     30.02 MB/s    |    66.58 MB/s    |     208.60 MB/s     |    1319.82 MB/s    |
|   30.41 KB   |   62.19 %   |  62.70 %   |     45.28 MB/s    |    55.52 MB/s    |     121.25 MB/s     |    1159.57 MB/s    |
|   45.95 KB   |   46.71 %   |  46.83 %   |     37.78 MB/s    |    70.78 MB/s    |     201.25 MB/s     |    1864.97 MB/s    |
|   69.44 KB   |   58.53 %   |  58.31 %   |     47.25 MB/s    |    81.70 MB/s    |     193.84 MB/s     |    2104.51 MB/s    |
|  104.94 KB   |   63.97 %   |  65.58 %   |     39.58 MB/s    |    59.69 MB/s    |     193.52 MB/s     |    1737.51 MB/s    |
|  158.58 KB   |   75.42 %   |  76.83 %   |     31.29 MB/s    |    75.47 MB/s    |     188.03 MB/s     |    1178.85 MB/s    |
|  239.65 KB   |   82.75 %   |  82.87 %   |     32.58 MB/s    |    78.27 MB/s    |     189.40 MB/s     |    737.47 MB/s     |
|  362.16 KB   |   80.96 %   |  81.59 %   |     32.82 MB/s    |    62.39 MB/s    |     181.98 MB/s     |    658.56 MB/s     |
|  547.29 KB   |   77.22 %   |  77.85 %   |     23.58 MB/s    |    40.03 MB/s    |     176.04 MB/s     |    595.31 MB/s     |
|  827.06 KB   |   72.58 %   |  72.59 %   |     21.80 MB/s    |    48.46 MB/s    |     185.86 MB/s     |    460.34 MB/s     |
|   1.25 MB    |   64.06 %   |  62.72 %   |     26.08 MB/s    |    41.36 MB/s    |     216.75 MB/s     |    599.58 MB/s     |
|   1.89 MB    |   71.92 %   |  70.71 %   |     27.56 MB/s    |    66.27 MB/s    |     280.95 MB/s     |    723.46 MB/s     |
|   2.85 MB    |   72.89 %   |  72.02 %   |     27.03 MB/s    |    57.92 MB/s    |     245.07 MB/s     |    607.99 MB/s     |
|   4.31 MB    |   72.55 %   |  71.29 %   |     25.98 MB/s    |    53.92 MB/s    |     169.46 MB/s     |    602.51 MB/s     |
|   6.52 MB    |   77.28 %   |  64.17 %   |     26.45 MB/s    |    61.20 MB/s    |     248.56 MB/s     |    696.94 MB/s     |
|   9.85 MB    |   75.59 %   |  59.76 %   |     25.54 MB/s    |    60.91 MB/s    |     215.96 MB/s     |    706.41 MB/s     |
|   14.89 MB   |   79.96 %   |  52.75 %   |     27.07 MB/s    |    65.59 MB/s    |     270.01 MB/s     |    830.55 MB/s     |
+--------------+-------------+------------+-------------------+------------------+---------------------+--------------------+

@Viq111
Copy link
Collaborator Author

Viq111 commented Jul 31, 2018

Keeping benchmark files on GitHub CDN:

mr.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant