Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Benchmark 2.5 suggestions: return a data.frame #9

Open
4 tasks
tbates opened this issue Nov 2, 2021 · 1 comment
Open
4 tasks

Benchmark 2.5 suggestions: return a data.frame #9

tbates opened this issue Nov 2, 2021 · 1 comment

Comments

@tbates
Copy link

tbates commented Nov 2, 2021

Goals for benchmarks/R-benchmark-26.R

  • One of the calls to remove("a", "b") is not needed (these variables have already been deleted by a previous call.
  • Replace cat calls by building a dataframe.
    • This would allow, e.g. easy appending of results columns from alternate runs, computation between runs.
  • Save results to a file, allow users to contribute benchmarks to a database/repository
  • (Perhaps) convert to a CRAN package.
    • Would allow wider use, but also a way to bundle, read-in and compare contributed benchmark results
@tbates
Copy link
Author

tbates commented Jan 12, 2022

Example of cumulating output into a kable in place of cat and combining, e.g. runs varying just the blas.

I. Matrix calculation Apple Blas (Sec) Default Blas (Sec) gain (loss)  
Creation, transp., deformation of a 2500x2500 matrix 0.546 0.672 123%  
2400x2400 normal distributed random matrix ^1000 0.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 values 0.198 0.183 92%  
Eigenvalues of a 640x640 random matrix 0.295 0.625 212%  
Determinant of a 2500x2500 random matrix 0.146 2.891 1980% !!
Cholesky decomposition of a 3000x3000 matrix 0.222 3.772 1696% !!
Inverse of a 1600x1600 random matrix 0.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%  

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant