/demo-rust-criterion

Demonstration of Rust Criterion benchmark crate

Primary LanguageRust

Demo Rust criterion

Demonstration of:

  • the Rust programming language

  • the Criterion benchmark crate

This demonstration shows the timing difference for some simple functions that combine strings

See the code:

Run:

cargo bench

Result:

Running benches/my_benchmark.rs …
combine_via_fold     time: [… µs 162.11 …]
combine_via_collect  time: [… µs 336.00 …]
combine_via_rayon    time: [… µs 308.28 …]