Skip to content

Instantly share code, notes, and snippets.

@pachamaltese pachamaltese/mkl_vs_mro.R
Last active Mar 26, 2018

Embed
What would you like to do?
mkl_vs_mro.R
#library(devtools)
#install_github("andrie/version.compare")
library(data.table)
library(dplyr)
library(version.compare)
scale.factor = 1.0
r = switch(
Sys.info()[["sysname"]],
Linux = c(
"/usr/lib/R/bin/Rscript",
"/opt/R/3.4.2-mkl/lib/R/bin/Rscript",
"/opt/microsoft/ropen/3.4.2/lib64/R/bin/Rscript"
)
)
envir = as.environment(1)
for(i in 1:100) {
rmkl_vs_mro = RevoMultiBenchmark(rVersions = r[c(2,3)],
threads = 8,
scale.factor = scale.factor)
for(j in 1:2) {
if(colnames(rmkl_vs_mro)[[j]] == "R-3.4.2 (8 threads)") {
colnames(rmkl_vs_mro)[[j]] = "rmkl"
}
if(colnames(rmkl_vs_mro)[[j]] == "Microsoft R Open-3.4.2 (8 threads)") {
colnames(rmkl_vs_mro)[[j]] = "mro"
}
}
operations = as_tibble(rownames(rmkl_vs_mro)) %>% rename(operation = value)
rmkl_vs_mro = as_tibble(rmkl_vs_mro) %>%
bind_cols(operations)
assign(paste0("rmkl_vs_mro_", i), rmkl_vs_mro, envir = envir)
rm(rmkl_vs_mro,operations)
}
rmkl_vs_mro = mget(ls(pattern = "rmkl_vs_mro_[0-9]")) %>%
bind_rows()
rm(list=ls(pattern = "rmkl_vs_mro_[0-9]"))
fwrite(rmkl_vs_mro, "rmkl_vs_mro.csv")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.