Better-sounding final performance report

This commit is contained in:
Sergey "Shnatsel" Davidoff 2018-09-15 21:35:38 +03:00 committed by David Peter
parent dc04fe8513
commit 156933489b

View File

@ -73,8 +73,8 @@ pub fn write_benchmark_comparison(results: &Vec<BenchmarkResult>) {
// Covariance asssumed to be 0, i.e. variables are assumed to be independent
let ratio_stddev = ratio * ( (item.stddev/item.mean).powi(2) + (fastest_item.stddev/fastest_item.mean).powi(2) ).sqrt();
println!(
"{} ± {} faster than '{}'",
format!("{:8.2}x", ratio)
"{} ± {} times faster than '{}'",
format!("{:8.2}", ratio)
.bold()
.green(),
format!("{:.2}", ratio_stddev).green(),