Displaying 1 result from an estimated 1 matches for "parallel_demo".
2017 Dec 11
0
document environment passing in parallel::parLapply
The runtime of parallel::parLapply depends on variables unrelated to
the parLapply call. However, this is not clearly documented. Therefore
I would like to suggest expanding the relevant documentation to
explain this behaviour.
Consider this example:
parallel_demo <- function(random_values_count) {
some_data <- runif(random_values_count)
dummy_function <- function(x) {
x
}
cluster <- parallel::makeCluster(3)
start <- proc.time()
parallel::parLapply(cluster, 1:3, dummy_function)
runtime <- proc.time() - start
parallel:...