update benchmark results

This commit is contained in:
figsoda 2022-11-23 10:46:01 -05:00 committed by João M. Bezerra
parent 4d2989cb44
commit 833863a9ae
2 changed files with 38 additions and 9 deletions

View File

@ -154,21 +154,21 @@ These are available on all mainstream _Linux_ distributions and on _macOS_.
# Benchmarks
Comparison made decompressing `linux.tar.gz` and measured with
[Hyperfine](https://github.com/sharkdp/hyperfine) and the values presented are the average (wall clock) elapsed time.
| Tool | `ouch` | [`tar`] | [`bsdtar`] |
|:------------:|:------:|:-------:|:----------:|
| Average time | 911 ms | 1102 ms | 829 ms |
Benchmark results are available [here](benchmarks/results.md).
Performance of compressing and decompressing
[Rust](https://github.com/rust-lang/rust) source code are measured and compared with
[Hyperfine](https://github.com/sharkdp/hyperfine).
The values presented are the average (wall clock) elapsed time.
Note: `ouch` focuses heavily on usage ergonomics and nice error messages, but
we plan on doing some optimization in the future.
Versions used:
- `ouch` _0.3.1_
- `ouch` _0.4.0_
- [`tar`] _1.34_
- [`bsdtar`] _3.5.2_
- [`unzip`][infozip] _6.00_
- [`zip`][infozip] _3.0_
# Contributing
@ -180,4 +180,4 @@ Versions used:
- Share it with a friend!
[`tar`]: https://www.gnu.org/software/tar/
[`bsdtar`]: https://www.freebsd.org/cgi/man.cgi?query=bsdtar&sektion=1&format=html
[infozip]: http://www.info-zip.org/

29
benchmarks/results.md Normal file
View File

@ -0,0 +1,29 @@
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|:---|---:|---:|---:|---:|
| `ouch compress rust output.tar` | 445.3 ± 5.8 | 436.3 | 453.4 | 1.43 ± 0.05 |
| `tar -cvf output.tar rust` | 311.6 ± 10.8 | 304.0 | 339.8 | 1.00 |
| Command | Mean [s] | Min [s] | Max [s] | Relative |
|:---|---:|---:|---:|---:|
| `ouch decompress input.tar --dir output` | 1.393 ± 0.031 | 1.371 | 1.474 | 1.85 ± 0.05 |
| `tar -xv -C output -f input.tar` | 0.751 ± 0.010 | 0.738 | 0.770 | 1.00 |
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|:---|---:|---:|---:|---:|
| `ouch compress compiler output.tar.gz` | 667.9 ± 8.7 | 657.1 | 680.6 | 1.00 ± 0.02 |
| `tar -cvzf output.tar.gz compiler` | 667.8 ± 8.8 | 656.9 | 685.3 | 1.00 |
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|:---|---:|---:|---:|---:|
| `ouch decompress input.tar.gz --dir output` | 170.7 ± 2.0 | 165.8 | 173.1 | 1.25 ± 0.03 |
| `tar -xvz -C output -f input.tar.gz` | 136.2 ± 2.2 | 132.8 | 141.1 | 1.00 |
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|:---|---:|---:|---:|---:|
| `zip output.zip -r compiler` | 581.3 ± 9.1 | 573.2 | 600.9 | 1.06 ± 0.02 |
| `ouch compress compiler output.zip` | 549.7 ± 4.3 | 543.6 | 558.6 | 1.00 |
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|:---|---:|---:|---:|---:|
| `ouch decompress input.zip --dir output` | 171.3 ± 2.4 | 166.9 | 174.3 | 1.00 |
| `unzip input.zip -d output` | 218.3 ± 4.9 | 211.9 | 229.3 | 1.27 ± 0.03 |