<p>Copying and pasting from a Slack discussion we just had on this in another place:</p>
<ul>
<li><p>This is somewhat wrong / it depends / maybe too narrow a view.</p>
</li>
<li><p>For starters, R itself even uses a little OpenMP (on platforms where it can).</p>
</li>
<li><p>Next up, you can pick BLAS that do all your matrix math in parallel.</p>
</li>
<li><p>Next up is client code that can be multi-threaded and often is; package <a href="http://cloud.r-project.org/package=data.table" rel="nofollow noreferrer">data.table</a> is a <em>great</em> and famous example.</p>
</li>
<li><p>And maybe (at least to me) also importantly: if I set <code>options(&quot;Ncpu&quot;=6)</code> on my six core desktop, I get <code>install.packages()</code> to install six packages in parallel.</p>
</li>
<li><p>Same for <code>make -j ...</code></p>
</li>
</ul>
<p>I say a little more on R and parallel computing (at different levels) in this <a href="https://arxiv.org/abs/1912.11144" rel="nofollow noreferrer">arXiv preprint</a> now out in <a href="https://dx.doi.org/10.1002/wics.1515" rel="nofollow noreferrer">this (paywalled) WIREs article</a>.</p>
<p>Now, lastly, you say macOS.  That has a slew of other difficulties with OpenMP for which you should peruse the r-sig-mac list and maybe other repo (again, <a href="http://cloud.r-project.org/package=data.table" rel="nofollow noreferrer">data.table</a> covers that).  I don't use macOS so I cannot say much more---other than that I see a lot of people having issues.</p>
<p>Lastly, of course, and not to take away from it:  yes, R's inner interpreter is single-threaded and will remain so.  But that does not mean we should rush out and by single-core computers.  You will get <em>some</em> benefits from more cores, but exactly <em>how much</em> depends critically on the workloads.</p>
Do R sessions always use one CPU core unless specifically instructed otherwise?
<p>On occasions where heavy compute is required, I've used <code>doParallel</code> package to dispatch work over multiple cores. Random example:</p>
<pre><code>  if (detectCores()-1 &gt; 1) {
    cl &lt;- makeCluster(detectCores()-1)
    registerDoParallel(cl)

    tdm &lt;- DocumentTermMatrix(corpus, control = list(dictionary = Terms(tdm), removePunctuation = TRUE, stopwords = TRUE, stemming = TRUE, removeNumbers = TRUE)) 

    stopCluster(cl)
  }
</code></pre>
<p>But the <em><strong>vast</strong></em> majority (probably 99.5%) of R code I write is <em>not</em> wrapped in additional code that explicitly spread the work across &gt;1 cores.</p>
<p>Is it fair to assume this code is running across 1 single core? Or would answering this require delving into each library used, and its functions (e.g. <code>tidyverse</code>, <code>data.table</code> etc)?</p>
<p>Note: aside from some timed experiments, I do not know a lot about how R and the hardware interacts, so if my understanding if flawed (e.g. wrong assumptions), please point out.</p>
<h3>Background</h3>
<p>The reason this is of great interest is help decide between fewer cores at higher clock speed vs more cores at lower clock speed; al la the latest macbook. It would be unfortunate to pay more for a 'better' processors, only to have most day-to-day R tasks run slower due to the slower clock speed (presuming they're running only on one core).</p>
<p><a href="https://i.stack.imgur.com/Hokrum.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Hokrum.png" alt="enter image description here" /></a></p>