futureverse / futureverse/future.callr

Overhead

Open
#2 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
R
Stars
62
Forks
3
PR merge metrics
No merged PRs in 30d

Description

I am really happy to see `future` extend to so many forms of parallelism!

Is there anything we can do about overhead?

```r
library(future.callr)
library(microbenchmark)
library(parallel)

n <- rep(1e2, 10)
f <- function(n){
mean(rnorm(n))
}

options(mc.cores = 10)
x <- microbenchmark(mclapply(n, f))
plan(future.callr::callr)
y <- microbenchmark(future_lapply(n, f))
rbind(x, y)

## Unit: milliseconds
## expr min lq mean median uq
## mclapply(n, f) 8.9127 9.696006 10.41556 10.39014 10.92663
## future_lapply(n, f) 2982.5224 3075.635802 3140.52041 3090.21414 3101.86924
## max neval cld
## 13.886 100 a
## 6304.660 100 b
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.