Running the tests

The package allows you to run benchmark tests on several different installations of R on the same machine.

The benchmarks are an adaptation of Simon Urbanek's benchmarks, and have been included in the function RevoMultiBenchmark() in the version.compare package.

library("version.compare")
library("knitr")
scale.factor <- 1.0

This vignette scales the test sets down to r sprintf("%1.0f%%", 100*scale.factor) of standard size, to speed up the process for sake of illustration. For a full-scale test, adjust the tests by setting scale.factor <- 1.

r <- switch(Sys.info()[["sysname"]],
            Linux = {
              rscript <- findRscript()

              rv <- version.time(rscript, {
                as.character(getRversion())
              })
              idx <- which(unlist(rv$results) == "3.4.1")
              rscript[idx]

            },
            Windows = findRscript(version = "3.4.1.*x64"
            )
)
test.results <- RevoMultiBenchmark(rVersions = r, 
                                   threads = c(1, 4, 8), 
                                   scale.factor = scale.factor)
kable(test.results)
plot(test.results, theme_size = 8, main = "Elapsed time")
kable(urbanekPerformance(test.results), digits = 2)
plot(urbanekPerformance(test.results), theme_size = 8, main = "Relative Performance")

Compare results

Elapsed time (seconds)

The package captures the total elapsed time for each of the benchmark tests. This makes it easy to compare the total elapsed time (in seconds).


Relative performance

You may also want to compare relative performance. To do this, divide each column by the longest-running test. This means scaling is relative to the version of R that has the longest elapsed time.




andrie/version.compare documentation built on Oct. 30, 2017, 9:41 p.m.