[R-SIG-Mac] Large number calculations causing system crash (Carl Witthoft)

Joseph Kunkel joe @end|ng |rom b|o@um@@@@edu
Thu Feb 10 00:44:38 CET 2022


Carl, I would not buy a Mac M1Mag with 64 GB of memory.  I just bought one and it is not as good as my 2013 MacBook Pro with 32 GB and 4 cores.

With my 2013 MacBook Pro I could configure R to do is matrix multiplication with the fast vecLib library and it would use core doubling so that I was using up to 800% of my resources to do my big math.

With my 2013 I could run the following benchmark and it would execute in 1/4 the time.

> source("http://www.bio.umass.edu/biology/kunkel/pub/R/CuriousResult.R")

matrix multiplication      21.248   1.608   5.891 
tcrossprod                     20.346   1.454   5.39 
transposition and reuse    15.881   2.887  18.657 
elementwise after reshape   9.637   2.144  11.717 
columnwise sapply          13.447  11.982  25.241 
for loop over columns      12.435  10.14   22.44 

Now with R on the MacBook Pro with M1Max it takes longer to do the base multiplication and there is no accelerated option although it does the simpler non sectoral approaches faster …

> source("http://www.bio.umass.edu/biology/kunkel/pub/R/CuriousResult.R") 
matrix multiplication      40.476   0.127  40.322 
tcrossprod                     40.347   0.056  40.282 
transposition and reuse     6.776   0.005    6.78 
elementwise after reshape   7.849   0.016   7.868 
columnwise sapply     4.481   0.114   4.592 
for loop over columns       4.282   0.271    4.55 

I am searching for why.

Joe Kunkel
-·.  .· ·.  .><((((º>·.  .· ·.  .><((((º>·.  .· ·.  .><((((º> .··.· >=-       =º}}}}}><
Joseph G. Kunkel, Emeritus Professor
Biology Department
UMass Amherst 
Amherst MA 01003
joe using bio.umass.edu



More information about the R-SIG-Mac mailing list