Add new Claxon-vs-libflac benchmark results

After the LLVM upgrade in Rust 1.25.0, rustc started generating better
code. This brings Claxon closer to libflac performance, without any
effort on my part! I re-ran the tools/benchmark_against_libflac.sh
script with a Rust 1.26.0 toolchain, and now Claxon is within 10% of
libflac performance, yay!

Somebody should try recompiling libflac with a recent Clang then though,
it might undo the advantage again. Although Claxon probably benefits
more from optimizations than libflac does, because libflac is full of
manually vectorized code and low-level optimizations. Claxon's code is
far more high-level (still optimized to ensure that the compiler can
generate fast code from the high-level code though).
This commit is contained in:
Ruud van Asseldonk 2018-08-31 16:29:33 +02:00
parent 895e62594e
commit 28c06dd106
1 changed files with 6 additions and 5 deletions

View File

@ -38,16 +38,17 @@ Performance
-----------
These are the times to decode 5 real-world FLAC files to wav, average and
standard deviation of 11 runs, normalized to version 1.3.2 of the [reference
implementation][ref-flac]. Measurements were done on a Skylake i7.
implementation][ref-flac]. Measurements were done on a Skylake i7. Claxon was
compiled with Rust 1.26.0.
| Decoder | Time / reference |
| ------- | ---------------- |
| Claxon | 1.13 ± 0.03 |
| libflac | 1.00 ± 0.03 |
| Claxon | 1.10 ± 0.01 |
| libflac | 1.00 ± 0.01 |
Note that for decent performance, Claxon should be compiled with
`-C codegen-units=1` on Rust ≥ 1.24.0. Not passing this `RUSTFLAG` can cause as
much as a 45% increase in running time.
`-C codegen-units=1` on Rust ≥ 1.24.0. Not passing this `RUSTFLAG` can
cause as much as a 45% increase in running time.
Contributing
------------