Parallelize R map-reduce calls by piping them into futurize()
open sourceApache-2.0free
futurize is an R package whose futurize() function turns sequential map-reduce calls such as base::lapply(), purrr::map() and foreach %do% into concurrent ones through the future ecosystem. Pipe a call into it (lapply(xs, fcn) |> futurize()) to parallelize it with minimal refactoring. It also supports BiocParallel, plyr, crossmap and pbapply, and a growing set of domain-specific CRAN and Bioconductor packages such as boot, caret, glmnet, lme4, mgcv, mlr3 and DESeq2.
Problems it solves
- speed up an lapply or purrr::map loop in R without rewriting it
- run an R map-reduce computation in parallel across cores or machines
- parallelize a slow foreach loop in R with minimal code changes
Features
- Turns lapply(), purrr::map() and foreach %do% calls into parallel ones
- Works with R's native pipe: call |> futurize()
- Supports BiocParallel, plyr, crossmap and pbapply
- Supports domain-specific packages such as boot, caret, glmnet, lme4, mgcv, mlr3 and DESeq2
Limitations
- Needs R 4.1.0 or later and future 1.80.0 or later1
Alternatives
The same job
These do what futurize does.
- future (R) Unified parallel and distributed processing in R
- furrr Run purrr's mapping functions in parallel with futures in R
- future.apply Parallel versions of R's apply functions, built on future
- RcppParallel Parallel programming tools for Rcpp code in R packages