The bench package, a new take in benchmarking for R
CC by RStudiobench !September 19th 2018" bench.r-lib.orgJim HesterCC-BY-4.0A new take on benchmarking
View Slide
Whybenchmark?
"premature optimization is theroot of all evil."- Donald Knuth
"A good programmer… will be wiseto look carefully at the criticalcode; but only a!er that code hasbeen identified."- Donald Knuth
"All (tools) should be designed toprovide (us) with feedbackindicating what parts of (our)programs are costing the most"- Donald Knuth
bench::mark()
CC by RStudiobench::mark()1. High precision timers (ns)2. Memory allocations3. Number and type of R garbagecollections4. Result equality5. Adaptive stopping6. Statistics filter GC effects
CC by RStudiobench::mark()1. Human readable times2. Human readable memory sizes3. Full results / timings / GCs in list-cols
bench::press()
CC by RStudiobench::press()
bench::plot()
ggplot2::autoplot(results)CC by RStudio
CC by RStudio
bench.r-lib.orginstall.packages("bench")jimhester_jimhester[email protected]