Out of curiosity, do we know if vecLib/Accelerate has been optimized for M1?
On Sun, Oct 31, 2021 at 10:00 PM Kieran Healy <kjhe...@gmail.com> wrote: > Thanks, Simon. > > With the vecLib/Accelerate BLAS, the results are indeed rather faster :) > > Kieran > > > 14” MacBook Pro / M1 Max > > R Benchmark 2.5 > =============== > Number of times each test is run__________________________: 3 > > I. Matrix calculation > --------------------- > Creation, transp., deformation of a 2500x2500 matrix (sec): > 0.260999999999999 > 2400x2400 normal distributed random matrix ^1000____ (sec): 0.105 > Sorting of 7,000,000 random values__________________ (sec): 0.595 > 2800x2800 cross-product matrix (b = a' * a)_________ (sec): > 0.056666666666666 > Linear regr. over a 3000x3000 matrix (c = a \ b')___ (sec): > 0.0446666666666668 > -------------------------------------------- > Trimmed geom. mean (2 extremes eliminated): > 0.115802825957684 > > II. Matrix functions > -------------------- > FFT over 2,400,000 random values____________________ (sec): > 0.0723333333333329 > Eigenvalues of a 640x640 random matrix______________ (sec): > 0.156666666666667 > Determinant of a 2500x2500 random matrix____________ (sec): > 0.098999999999999 > Cholesky decomposition of a 3000x3000 matrix________ (sec): > 0.0716666666666654 > Inverse of a 1600x1600 random matrix________________ (sec): > 0.082666666666667 > -------------------------------------------- > Trimmed geom. mean (2 extremes eliminated): > 0.0839655943753058 > > III. Programmation > ------------------ > 3,500,000 Fibonacci numbers calculation (vector calc)(sec): > 0.0933333333333337 > Creation of a 3000x3000 Hilbert matrix (matrix calc) (sec): > 0.112333333333332 > Grand common divisors of 400,000 pairs (recursion)__ (sec): > 0.0776666666666657 > Creation of a 500x500 Toeplitz matrix (loops)_______ (sec): > 0.0173333333333332 > Escoufier's method on a 45x45 matrix (mixed)________ (sec): > 0.111999999999998 > -------------------------------------------- > Trimmed geom. mean (2 extremes eliminated): > 0.0932888677080541 > > > Total time for all 15 tests_________________________ (sec): > 1.95733333333333 > Overall mean (sum of I, II and III trimmed means/3)_ (sec): > 0.0968018035139188 > --- End of test --- > > > On Oct 31, 2021, at 9:03 PM, Simon Urbanek <simon.urba...@r-project.org> > wrote: > > > > Kieran, > > > > the reference benchmarks have been calibrated against vecLib/Accelerate > BLAS. If you use reference BLAS it can be a lot slower. You can switch > between reference BLAS and vecLib in R CRAN releases simply by switching > the libRblas.dylib symlink (in $R_HOME/lib), e.g.: > > > > ls -l /Library/Frameworks/R.framework/Resources/lib/libRblas*dylib > > -rwxrwxr-x 1 root admin 226288 Oct 31 14:41 > /Library/Frameworks/R.framework/Resources/lib/libRblas.0.dylib > > lrwxr-xr-x 1 root. admin 21 Nov 1 09:56 > /Library/Frameworks/R.framework/Resources/lib/libRblas.dylib -> > libRblas.vecLib.dylib > > -rwxrwxr-x 1 root admin 154368 Oct 31 14:41 > /Library/Frameworks/R.framework/Resources/lib/libRblas.vecLib.dylib > > > > (For recent R you'll need R 4.1.1 or higher) > > > > Cheers, > > Simon > > > > PS: reminder to everyone, please test R 4.1.2 RC - now are the last few > hours to report anything! > > > > > > _______________________________________________ > R-SIG-Mac mailing list > R-SIG-Mac@r-project.org > https://stat.ethz.ch/mailman/listinfo/r-sig-mac > -- Best, Kasper [[alternative HTML version deleted]] _______________________________________________ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac