OpenMP support may cause issues with Windows performance, especially with many repeated calls.
library(data.table)
setDTthreads(1L)
allIterations <- data.table(v1 = runif(1e5), v2 = runif(1e5))
DoSomething <- function(row) someCalculation <- row[["v1"]] + 1
system.time(for (r in 1:nrow(allIterations)) DoSomething(allIterations[r, ]))
##1.12.8
## user system elapsed
## 17.09 4.48 22.14
##master
## user system elapsed
## 17.50 4.53 22.51
##master w/ OpenMP lines deleted from subset.c
## user system elapsed
## 12.37 0.01 12.85
Note, I would expect using setDTthreads(1L) would minimize any impacts to performance but that does not appear to be the case on Windows 10.
OpenMP support may cause issues with Windows performance, especially with many repeated calls.
Note, I would expect using
setDTthreads(1L)would minimize any impacts to performance but that does not appear to be the case on Windows 10.