Skip to content

Commit

Permalink
allow loop over various R builds
Browse files Browse the repository at this point in the history
  • Loading branch information
jangorecki committed May 30, 2020
1 parent 7c76529 commit bc8a8be
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions R/benchmark.data.table.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ benchmark.data.table = function(script="benchmarks.Rraw", rbin="Rscript", desc=c
ths = ths[ths>0L]
cat("benchmark.data.table() running: ", names(fn), "\n", sep="")
init = proc.time()[[3L]]
for (lib in libs) {
for (th in ths) {
cmd = sprintf("R_LIBS_USER=%s R_DATATABLE_NUM_THREADS=%s R_DATATABLE_NUM_PROCS_PERCENT=100 %s %s%s", lib, th, rbin, fn, desc)
cat(cmd,"\n",sep="")
system(cmd)
for (bin in rbin) {
for (lib in libs) {
for (th in ths) {
cmd = sprintf("R_LIBS_USER=%s R_DATATABLE_NUM_THREADS=%s R_DATATABLE_NUM_PROCS_PERCENT=100 %s %s%s", lib, th, bin, fn, desc)
cat(cmd,"\n",sep="")
system(cmd)
}
}
}
t = proc.time()[[3L]]
Expand Down

0 comments on commit bc8a8be

Please sign in to comment.