Re: [R-SIG-Mac] https://mac.r-project.org/benchmarks/

2021-11-02 Thread BATES Timothy
Just for normies like me who don’t know what Simon meant :-)

1. Open terminal.app and cd to where the relevant files are to keep commands 
manageable in length

cd /Library/Frameworks/R.framework/Resources/lib/

2. Find the paths to different versions of veclib by  ls’ing the directory they 
should live in:

ls -l libRblas*dylib

The existing symbolic link will look like this

lrwxr-xr-x  1 root  admin  16 24 Sep 12:10 libRblas.dylib -> 
libRblas.0.dylib


Which means calls to “libRblas.dylib” will resolve to "libRblas.0.dylib"

3. Overwrite this link with a new one from Apple's veclib 
(libRblas.vecLib.dylib ) to libRblas.dylib

ln -s -i -v libRblas.vecLib.dylib libRblas.dylib


When you restart R, it should now call libRblas.vecLib.dylib for math

To switch back

cd /Library/Frameworks/R.framework/Resources/lib/
ln -s -i -v libRblas.0.dylib libRblas.dylib

t

PS: The performance boost is staggering!!

   I. Matrix calculationApple Blas (Sec)Default Blas (Sec)  
gain (loss)
Creation, transp., deformation of a 2500x2500 matrix0.546   0.672   123%
2400x2400 normal distributed random matrix ^10000.139   0.139   100%
Sorting of 7,000,000 random values  0.600   0.605   101%
2800x2800 cross-product matrix (b = a' * a) 0.210   9.061   4315%   !!
Linear regr. over a 3000x3000 matrix (c = a \ b')   0.134   4.379   3276%
 Trimmed geom. mean (2 extremes eliminated) 0.252   1.212   
482%
   II. Matrix functions
FFT over 2,400,000 random values0.198   0.183   92%
Eigenvalues of a 640x640 random matrix  0.295   0.625   212%
Determinant of a 2500x2500 random matrix0.146   2.891   1980%   !!
Cholesky decomposition of a 3000x3000 matrix0.222   3.772   1696%   !!
Inverse of a 1600x1600 random matrix0.284   2.417   852%
Trimmed geom. mean (2 extremes eliminated)  0.232   1.634   
704%
   III. Programmation
3,500,000 Fibonacci numbers calculation (vector calc)   0.204   0.204   100%
Creation of a 3000x3000 Hilbert matrix (matrix calc)0.232   0.211   91%
Grand common divisors of 400,000 pairs (recursion)  0.274   0.243   89%
Creation of a 500x500 Toeplitz matrix (loops)   0.038   0.041   106%
Escoufier's method on a 45x45 matrix (mixed)0.260   0.307   118%
Trimmed geom. mean (2 extremes eliminated)  0.231   0.219   
95%
Total time for all 15 tests 3.782   25.749  681%
Overall mean (sum of I, II and III trimmed means/3) 0.238   0.757   318%
The University of Edinburgh is a charitable body, registered in Scotland, with 
registration number SC005336. Is e buidheann carthannais a th’ ann an Oilthigh 
Dhùn Èideann, clàraichte an Alba, àireamh clàraidh SC005336.

[[alternative HTML version deleted]]

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] https://mac.r-project.org/benchmarks/

2021-11-01 Thread Kasper Daniel Hansen
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  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.260
> 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.056
> Linear regr. over a 3000x3000 matrix (c = a \ b')___ (sec):
> 0.0448
>   
>  Trimmed geom. mean (2 extremes eliminated):
> 0.115802825957684
>
>II. Matrix functions
>
> FFT over 2,400,000 random values (sec):
> 0.07233329
> Eigenvalues of a 640x640 random matrix__ (sec):
> 0.157
> Determinant of a 2500x2500 random matrix (sec):
> 0.098
> Cholesky decomposition of a 3000x3000 matrix (sec):
> 0.07166654
> Inverse of a 1600x1600 random matrix (sec):
> 0.0826667
>   
> Trimmed geom. mean (2 extremes eliminated):
> 0.0839655943753058
>
>III. Programmation
>--
> 3,500,000 Fibonacci numbers calculation (vector calc)(sec):
> 0.0937
> Creation of a 3000x3000 Hilbert matrix (matrix calc) (sec):
> 0.1123332
> Grand common divisors of 400,000 pairs (recursion)__ (sec):
> 0.07766657
> Creation of a 500x500 Toeplitz matrix (loops)___ (sec):
> 0.0172
> Escoufier's method on a 45x45 matrix (mixed) (sec):
> 0.1119998
>   
> Trimmed geom. mean (2 extremes eliminated):
> 0.0932888677080541
>
>
> Total time for all 15 tests_ (sec):
> 1.957333
> 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 
> 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


Re: [R-SIG-Mac] https://mac.r-project.org/benchmarks/

2021-10-31 Thread Kieran Healy
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.260
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.056
Linear regr. over a 3000x3000 matrix (c = a \ b')___ (sec):  0.0448
  
 Trimmed geom. mean (2 extremes eliminated):  0.115802825957684

   II. Matrix functions
   
FFT over 2,400,000 random values (sec):  0.07233329
Eigenvalues of a 640x640 random matrix__ (sec):  0.157
Determinant of a 2500x2500 random matrix (sec):  0.098
Cholesky decomposition of a 3000x3000 matrix (sec):  0.07166654
Inverse of a 1600x1600 random matrix (sec):  0.0826667
  
Trimmed geom. mean (2 extremes eliminated):  0.0839655943753058

   III. Programmation
   --
3,500,000 Fibonacci numbers calculation (vector calc)(sec):  0.0937
Creation of a 3000x3000 Hilbert matrix (matrix calc) (sec):  0.1123332
Grand common divisors of 400,000 pairs (recursion)__ (sec):  0.07766657
Creation of a 500x500 Toeplitz matrix (loops)___ (sec):  0.0172
Escoufier's method on a 45x45 matrix (mixed) (sec):  0.1119998
  
Trimmed geom. mean (2 extremes eliminated):  0.0932888677080541


Total time for all 15 tests_ (sec):  1.957333
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  
> 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


Re: [R-SIG-Mac] https://mac.r-project.org/benchmarks/

2021-10-31 Thread Simon Urbanek


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!



> On Nov 1, 2021, at 11:31 AM, Kieran Healy  wrote:
> 
> Hello, 
> 
> Just out of interest, I ran benchmark-25.R from Simon’s repo, as I have 
> access to an M1 Max. Are the *very* long times on cross-product, linear 
> regression, and Matrix functions a consequence of the BLAS version?
> 
> Kieran
> 
>> sessionInfo()
> R version 4.1.1 (2021-08-10)
> Platform: aarch64-apple-darwin20 (64-bit)
> Running under: macOS Monterey 12.0.1
> 
> Matrix products: default
> BLAS:   
> /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/lib/libRblas.0.dylib
> LAPACK: 
> /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/lib/libRlapack.dylib
> 
> 
>> source("R-benchmark-25.R")
> Loading required package: SuppDists
> 
> 
>   R Benchmark 2.5
>   ===
> Number of times each test is run__:  3
> 
>   I. Matrix calculation
>   -
> Creation, transp., deformation of a 2500x2500 matrix (sec):  0.2496656
> 2400x2400 normal distributed random matrix ^1000 (sec):  0.1050009
> Sorting of 7,000,000 random values__ (sec):  0.5946673
> 2800x2800 cross-product matrix (b = a' * a)_ (sec):  13.30167
> Linear regr. over a 3000x3000 matrix (c = a \ b')___ (sec):  6.270334
>  
> Trimmed geom. mean (2 extremes eliminated):  0.976431082297569
> 
>   II. Matrix functions
>   
> FFT over 2,400,000 random values (sec):  
> 0.07266631
> Eigenvalues of a 640x640 random matrix__ (sec):  0.4256672
> Determinant of a 2500x2500 random matrix (sec):  1.738333
> Cholesky decomposition of a 3000x3000 matrix (sec):  5.17
> Inverse of a 1600x1600 random matrix (sec):  1.430996
>  
>Trimmed geom. mean (2 extremes eliminated):  1.01925013610031
> 
>   III. Programmation
>   --
> 3,500,000 Fibonacci numbers calculation (vector calc)(sec):  
> 0.09500273
> Creation of a 3000x3000 Hilbert matrix (matrix calc) (sec):  0.1153335
> Grand common divisors of 400,000 pairs (recursion)__ (sec):  
> 0.07999841
> Creation of a 500x500 Toeplitz matrix (loops)___ (sec):  
> 0.01733593
> Escoufier's method on a 45x45 matrix (mixed) (sec):  0.1529963
>  
>Trimmed geom. mean (2 extremes eliminated):  0.0957023962714685
> 
> 
> Total time for all 15 tests_ (sec):  29.823
> Overall mean (sum of I, II and III trimmed means/3)_ (sec):  0.45668322781674
>  --- End of test ---
> 
> Warning messages:
> 1: In remove("a", "b") : object 'a' not found
> 2: In remove("a", "b") : object 'b' not found
> 
>> On Oct 31, 2021, at 5:11 PM, Simon Urbanek  
>> wrote:
>> 
>> 
>> Tim,
>> 
>> that is a great idea, those test are really old. Just for the fun of it I 
>> have run the tests on my old iMac, but with R 4.1.2 and they still work.
>> It's nice to see the huge speed improvements in loops and similar (see below 
>> - recall the original tests were scaled to be around 1).
>> 
>> I have added the page to the repo
>> https://github.com/R-macos/R-mac-dev
>> so I'd be happy to review PRs, but I'll probably want to re-do it first so 
>> it is better organized for comparisons as we have to also accommodate M1 etc.
>> 
>> Cheers,
>> Simon
>> 
>> ---
>> iMac14,2 3.2Ghz i5, macOS 10.4.6, R 4.1.2 vecib/Accelerate BLAS
>> 
>> 
>>  R Benchmark 2.5
>>  ===
>> Number of times each test is run__:  3
>> 
>>  I. Matrix calculation
>>  -
>> Creation, transp., deformation of a 2500x2500 matrix (sec):  
>> 0.8296667 
>> 2400x2400 normal distributed random matrix ^1000 (sec):  
>> 0.1553334 
>> Sorting of 7,000,000 random values__ (sec):  

Re: [R-SIG-Mac] https://mac.r-project.org/benchmarks/

2021-10-31 Thread Kieran Healy
Hello, 

Just out of interest, I ran benchmark-25.R from Simon’s repo, as I have access 
to an M1 Max. Are the *very* long times on cross-product, linear regression, 
and Matrix functions a consequence of the BLAS version?

Kieran

> sessionInfo()
R version 4.1.1 (2021-08-10)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Monterey 12.0.1

Matrix products: default
BLAS:   
/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/lib/libRblas.0.dylib
LAPACK: 
/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/lib/libRlapack.dylib


> source("R-benchmark-25.R")
Loading required package: SuppDists


   R Benchmark 2.5
   ===
Number of times each test is run__:  3

   I. Matrix calculation
   -
Creation, transp., deformation of a 2500x2500 matrix (sec):  0.2496656
2400x2400 normal distributed random matrix ^1000 (sec):  0.1050009
Sorting of 7,000,000 random values__ (sec):  0.5946673
2800x2800 cross-product matrix (b = a' * a)_ (sec):  13.30167
Linear regr. over a 3000x3000 matrix (c = a \ b')___ (sec):  6.270334
  
 Trimmed geom. mean (2 extremes eliminated):  0.976431082297569

   II. Matrix functions
   
FFT over 2,400,000 random values (sec):  0.07266631
Eigenvalues of a 640x640 random matrix__ (sec):  0.4256672
Determinant of a 2500x2500 random matrix (sec):  1.738333
Cholesky decomposition of a 3000x3000 matrix (sec):  5.17
Inverse of a 1600x1600 random matrix (sec):  1.430996
  
Trimmed geom. mean (2 extremes eliminated):  1.01925013610031

   III. Programmation
   --
3,500,000 Fibonacci numbers calculation (vector calc)(sec):  0.09500273
Creation of a 3000x3000 Hilbert matrix (matrix calc) (sec):  0.1153335
Grand common divisors of 400,000 pairs (recursion)__ (sec):  0.07999841
Creation of a 500x500 Toeplitz matrix (loops)___ (sec):  0.01733593
Escoufier's method on a 45x45 matrix (mixed) (sec):  0.1529963
  
Trimmed geom. mean (2 extremes eliminated):  0.0957023962714685


Total time for all 15 tests_ (sec):  29.823
Overall mean (sum of I, II and III trimmed means/3)_ (sec):  0.45668322781674
  --- End of test ---

Warning messages:
1: In remove("a", "b") : object 'a' not found
2: In remove("a", "b") : object 'b' not found

> On Oct 31, 2021, at 5:11 PM, Simon Urbanek  
> wrote:
> 
> 
> Tim,
> 
> that is a great idea, those test are really old. Just for the fun of it I 
> have run the tests on my old iMac, but with R 4.1.2 and they still work.
> It's nice to see the huge speed improvements in loops and similar (see below 
> - recall the original tests were scaled to be around 1).
> 
> I have added the page to the repo
> https://github.com/R-macos/R-mac-dev
> so I'd be happy to review PRs, but I'll probably want to re-do it first so it 
> is better organized for comparisons as we have to also accommodate M1 etc.
> 
> Cheers,
> Simon
> 
> ---
> iMac14,2 3.2Ghz i5, macOS 10.4.6, R 4.1.2 vecib/Accelerate BLAS
> 
> 
>   R Benchmark 2.5
>   ===
> Number of times each test is run__:  3
> 
>   I. Matrix calculation
>   -
> Creation, transp., deformation of a 2500x2500 matrix (sec):  
> 0.8296667 
> 2400x2400 normal distributed random matrix ^1000 (sec):  
> 0.1553334 
> Sorting of 7,000,000 random values__ (sec):  
> 0.6383334 
> 2800x2800 cross-product matrix (b = a' * a)_ (sec):  
> 0.2420001 
> Linear regr. over a 3000x3000 matrix (c = a \ b')___ (sec):  
> 0.170 
>  
> Trimmed geom. mean (2 extremes eliminated):  0.29781941072597 
> 
>   II. Matrix functions
>   
> FFT over 2,400,000 random values (sec):  
> 0.331 
> Eigenvalues of a 640x640 random matrix__ (sec):  
> 0.3470001 
> Determinant of a 2500x2500 random matrix (sec):  
> 0.2070001 
> Cholesky decomposition of a 3000x3000 matrix (sec):  
> 0.2543334 
> Inverse of a 1600x1600 random matrix (sec):  
> 0.3456663 
>  
>Trimmed geom. mean (2 extremes eliminated):  0.307686639256803 
> 
>   III. Programmation
>   --
> 3,500,000 Fibonacci numbers calculation (vector calc)(sec):  0.245 
> Creation of 

Re: [R-SIG-Mac] https://mac.r-project.org/benchmarks/

2021-10-31 Thread Ken Beath
I ran some tests using my packages and a bootstrapped linear model, and the 
results were that my M1 MacBook Air was faster than my iMac 8-core 2020, and 
that included using 4 parallel cores on the M1 versus 8 on the iMac. 

Ken

> On 1 Nov 2021, at 8:11 am, Simon Urbanek  wrote:
> 
> 
> Tim,
> 
> that is a great idea, those test are really old. Just for the fun of it I 
> have run the tests on my old iMac, but with R 4.1.2 and they still work.
> It's nice to see the huge speed improvements in loops and similar (see below 
> - recall the original tests were scaled to be around 1).
> 
> I have added the page to the repo
> https://github.com/R-macos/R-mac-dev
> so I'd be happy to review PRs, but I'll probably want to re-do it first so it 
> is better organized for comparisons as we have to also accommodate M1 etc.
> 
> Cheers,
> Simon
> 
> ---
> iMac14,2 3.2Ghz i5, macOS 10.4.6, R 4.1.2 vecib/Accelerate BLAS
> 
> 
>   R Benchmark 2.5
>   ===
> Number of times each test is run__:  3
> 
>   I. Matrix calculation
>   -
> Creation, transp., deformation of a 2500x2500 matrix (sec):  
> 0.8296667 
> 2400x2400 normal distributed random matrix ^1000 (sec):  
> 0.1553334 
> Sorting of 7,000,000 random values__ (sec):  
> 0.6383334 
> 2800x2800 cross-product matrix (b = a' * a)_ (sec):  
> 0.2420001 
> Linear regr. over a 3000x3000 matrix (c = a \ b')___ (sec):  
> 0.170 
>  
> Trimmed geom. mean (2 extremes eliminated):  0.29781941072597 
> 
>   II. Matrix functions
>   
> FFT over 2,400,000 random values (sec):  
> 0.331 
> Eigenvalues of a 640x640 random matrix__ (sec):  
> 0.3470001 
> Determinant of a 2500x2500 random matrix (sec):  
> 0.2070001 
> Cholesky decomposition of a 3000x3000 matrix (sec):  
> 0.2543334 
> Inverse of a 1600x1600 random matrix (sec):  
> 0.3456663 
>  
>Trimmed geom. mean (2 extremes eliminated):  0.307686639256803 
> 
>   III. Programmation
>   --
> 3,500,000 Fibonacci numbers calculation (vector calc)(sec):  0.245 
> Creation of a 3000x3000 Hilbert matrix (matrix calc) (sec):  
> 0.2896669 
> Grand common divisors of 400,000 pairs (recursion)__ (sec):  
> 0.2593331 
> Creation of a 500x500 Toeplitz matrix (loops)___ (sec):  
> 0.0415 
> Escoufier's method on a 45x45 matrix (mixed) (sec):  
> 0.2630005 
>  
>Trimmed geom. mean (2 extremes eliminated):  0.255658395143118 
> 
> 
> Total time for all 15 tests_ (sec):  4.618667 
> Overall mean (sum of I, II and III trimmed means/3)_ (sec):  
> 0.286136920519432 
>  --- End of test ---
> 
> 
> 
>> On Nov 1, 2021, at 2:48 AM, Tim Bates  wrote:
>> 
>> I wonder if this (2008/R 2.7) page could be updated with some current 
>> benchmark runs?
>> 
>> Especially current Intel server chips, i9, and M1/+ 
>> 
>> I'm guessing if Simon could help upload the resulting updated page, people 
>> here could contribute bench mark runs on different hardware.
>> 
>> 
>> Also be interesting to see different blas results.
>> 
>> I wonder if either intel or arm chip "neural" cores (dot product engines?) 
>> or multi-core and GPU are being used in current R builds?
>> 
>> tim
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> ___
>> R-SIG-Mac mailing list
>> R-SIG-Mac@r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>> 
> 
> ___
> R-SIG-Mac mailing list
> R-SIG-Mac@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] https://mac.r-project.org/benchmarks/

2021-10-31 Thread Simon Urbanek


Tim,

that is a great idea, those test are really old. Just for the fun of it I have 
run the tests on my old iMac, but with R 4.1.2 and they still work.
It's nice to see the huge speed improvements in loops and similar (see below - 
recall the original tests were scaled to be around 1).

I have added the page to the repo
https://github.com/R-macos/R-mac-dev
so I'd be happy to review PRs, but I'll probably want to re-do it first so it 
is better organized for comparisons as we have to also accommodate M1 etc.

Cheers,
Simon

---
iMac14,2 3.2Ghz i5, macOS 10.4.6, R 4.1.2 vecib/Accelerate BLAS


   R Benchmark 2.5
   ===
Number of times each test is run__:  3

   I. Matrix calculation
   -
Creation, transp., deformation of a 2500x2500 matrix (sec):  0.8296667 
2400x2400 normal distributed random matrix ^1000 (sec):  0.1553334 
Sorting of 7,000,000 random values__ (sec):  0.6383334 
2800x2800 cross-product matrix (b = a' * a)_ (sec):  0.2420001 
Linear regr. over a 3000x3000 matrix (c = a \ b')___ (sec):  0.170 
  
 Trimmed geom. mean (2 extremes eliminated):  0.29781941072597 

   II. Matrix functions
   
FFT over 2,400,000 random values (sec):  0.331 
Eigenvalues of a 640x640 random matrix__ (sec):  0.3470001 
Determinant of a 2500x2500 random matrix (sec):  0.2070001 
Cholesky decomposition of a 3000x3000 matrix (sec):  0.2543334 
Inverse of a 1600x1600 random matrix (sec):  0.3456663 
  
Trimmed geom. mean (2 extremes eliminated):  0.307686639256803 

   III. Programmation
   --
3,500,000 Fibonacci numbers calculation (vector calc)(sec):  0.245 
Creation of a 3000x3000 Hilbert matrix (matrix calc) (sec):  0.2896669 
Grand common divisors of 400,000 pairs (recursion)__ (sec):  0.2593331 
Creation of a 500x500 Toeplitz matrix (loops)___ (sec):  0.0415 
Escoufier's method on a 45x45 matrix (mixed) (sec):  0.2630005 
  
Trimmed geom. mean (2 extremes eliminated):  0.255658395143118 


Total time for all 15 tests_ (sec):  4.618667 
Overall mean (sum of I, II and III trimmed means/3)_ (sec):  0.286136920519432 
  --- End of test ---



> On Nov 1, 2021, at 2:48 AM, Tim Bates  wrote:
> 
> I wonder if this (2008/R 2.7) page could be updated with some current 
> benchmark runs?
> 
> Especially current Intel server chips, i9, and M1/+ 
> 
> I'm guessing if Simon could help upload the resulting updated page, people 
> here could contribute bench mark runs on different hardware.
> 
> 
> Also be interesting to see different blas results.
> 
> I wonder if either intel or arm chip "neural" cores (dot product engines?) or 
> multi-core and GPU are being used in current R builds?
> 
> tim
> 
> 
> 
> 
> 
> 
> 
> ___
> R-SIG-Mac mailing list
> R-SIG-Mac@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
> 

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


[R-SIG-Mac] https://mac.r-project.org/benchmarks/

2021-10-31 Thread Tim Bates
I wonder if this (2008/R 2.7) page could be updated with some current benchmark 
runs?

Especially current Intel server chips, i9, and M1/+ 

I'm guessing if Simon could help upload the resulting updated page, people here 
could contribute bench mark runs on different hardware.


Also be interesting to see different blas results.

I wonder if either intel or arm chip "neural" cores (dot product engines?) or 
multi-core and GPU are being used in current R builds?

tim





 

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac