Multithreading in RStudio

Taking full advantage of your CPU multithreading power.

  1. Create a ~/.R/Makevars file and adjust the MAKEFLAGS environmental parameter according to your CPU characteristics. In my case with a 16 core CPU I set: MAKEFLAGS = -j32 for 32 jobs.
  2. Then see the configuration using makevars_user()

makevars_user()
[1] "/home/chris/.R/Makevars"

https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Customizing-package-compilation

,

Leave a comment

Discover more from /root

Subscribe now to keep reading and get access to the full archive.

Continue reading