pub struct ThreadPool { /* fields omitted */ }
We wrap rayon's pool into our own struct to overload the install method.
Execute given closure in the thread pool, logging it's task as the initial one.
After running, we post-process the logs and return a RunLog
together with the closure's
result.
pub fn compare<A, B, P: AsRef<Path>>( &self, label1: &str, label2: &str, algo1: A, algo2: B, filename: P ) -> Result<(), Error> where A: Fn() + Send + Sync, B: Fn() + Send + Sync, | [src] |
We automatically benchmark and compare two algorithms.
We run 300 tests for each algorithm.
Each time we prepare the experiment and launch both algorithms.
We display some statistics on running times and compare both average and best
runs.
Output is saved on given html file.