Skip to content

Instantly share code, notes, and snippets.

@ccwang002
Last active August 29, 2015 13:56
Show Gist options
  • Save ccwang002/9274929 to your computer and use it in GitHub Desktop.
Save ccwang002/9274929 to your computer and use it in GitHub Desktop.
R 3.0.2 Performance Test on OSX 10.9.2 of Generic RBLAS and OpenBLAS (dev)
## R-benchmark-25 from http://r.research.att.com/benchmarks/R-benchmark-25.R
# brew install r [--with-openblas]
$ Rscript R-benchmark-25.R 2014-03-01 (六) 00:41 CST
Loading required package: Matrix
Loading required package: methods
Loading required package: lattice
Loading required package: SuppDists
警告訊息:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called ‘SuppDists’
警告訊息:
1: In remove("a", "b") : 找不到物件 'a'
2: In remove("a", "b") : 找不到物件 'b'
R Benchmark 2.5
===============
Number of times each test is run__________________________: 3
I. Matrix calculation
---------------------
Creation, transp., deformation of a 2500x2500 matrix (sec): 0.806666666666667
2400x2400 normal distributed random matrix ^1000____ (sec): 0.209666666666667
Sorting of 7,000,000 random values__________________ (sec): 0.582333333333333
2800x2800 cross-product matrix (b = a' * a)_________ (sec): 0.231333333333333
Linear regr. over a 3000x3000 matrix (c = a \ b')___ (sec): 0.146333333333333
--------------------------------------------
Trimmed geom. mean (2 extremes eliminated): 0.304541455410209
II. Matrix functions
--------------------
FFT over 2,400,000 random values____________________ (sec): 0.325333333333333
Eigenvalues of a 640x640 random matrix______________ (sec): 0.644666666666668
Determinant of a 2500x2500 random matrix____________ (sec): 0.136
Cholesky decomposition of a 3000x3000 matrix________ (sec): 0.149666666666666
Inverse of a 1600x1600 random matrix________________ (sec): 0.135666666666665
--------------------------------------------
Trimmed geom. mean (2 extremes eliminated): 0.187786421438677
II. Matrix functions
--------------------
FFT over 2,400,000 random values____________________ (sec): 0.326666666666654
Eigenvalues of a 640x640 random matrix______________ (sec): 3.43566666666666
Determinant of a 2500x2500 random matrix____________ (sec): 18.207
Cholesky decomposition of a 3000x3000 matrix________ (sec): 42.7386666666667
Inverse of a 1600x1600 random matrix________________ (sec): 14.919
--------------------------------------------
Trimmed geom. mean (2 extremes eliminated): 9.77229065983265
III. Programmation
------------------
3,500,000 Fibonacci numbers calculation (vector calc)(sec): 0.360000000000052
Creation of a 3000x3000 Hilbert matrix (matrix calc) (sec): 0.285000000000006
Grand common divisors of 400,000 pairs (recursion)__ (sec): 0.852666666666664
Creation of a 500x500 Toeplitz matrix (loops)_______ (sec): 0.538333333333336
Escoufier's method on a 45x45 matrix (mixed)________ (sec): 0.788999999999987
--------------------------------------------
Trimmed geom. mean (2 extremes eliminated): 0.534741133098076
Total time for all 15 tests_________________________ (sec): 134.140666666667
Overall mean (sum of I, II and III trimmed means/3)_ (sec): 2.18913023699979
--- End of test ---
$ Rscript R-benchmark-25.R 2014-03-01 (六) 01:03 CST
Number of times each test is run__________________________: 3
I. Matrix calculation
---------------------
Creation, transp., deformation of a 2500x2500 matrix (sec): 0.806666666666667
2400x2400 normal distributed random matrix ^1000____ (sec): 0.209666666666667
Sorting of 7,000,000 random values__________________ (sec): 0.582333333333333
2800x2800 cross-product matrix (b = a' * a)_________ (sec): 0.231333333333333
Linear regr. over a 3000x3000 matrix (c = a \ b')___ (sec): 0.146333333333333
--------------------------------------------
Trimmed geom. mean (2 extremes eliminated): 0.304541455410209
II. Matrix functions
--------------------
FFT over 2,400,000 random values____________________ (sec): 0.325333333333333
Eigenvalues of a 640x640 random matrix______________ (sec): 0.644666666666668
Determinant of a 2500x2500 random matrix____________ (sec): 0.136
Cholesky decomposition of a 3000x3000 matrix________ (sec): 0.149666666666666
Inverse of a 1600x1600 random matrix________________ (sec): 0.135666666666665
--------------------------------------------
Trimmed geom. mean (2 extremes eliminated): 0.187786421438677
III. Programmation
------------------
3,500,000 Fibonacci numbers calculation (vector calc)(sec): 0.361666666666667
Creation of a 3000x3000 Hilbert matrix (matrix calc) (sec): 0.285333333333334
Grand common divisors of 400,000 pairs (recursion)__ (sec): 0.854333333333333
Creation of a 500x500 Toeplitz matrix (loops)_______ (sec): 0.525666666666668
Escoufier's method on a 45x45 matrix (mixed)________ (sec): 0.299999999999997
--------------------------------------------
Trimmed geom. mean (2 extremes eliminated): 0.384928492557082
Total time for all 15 tests_________________________ (sec): 5.69466666666667
Overall mean (sum of I, II and III trimmed means/3)_ (sec): 0.280261572589081
--- End of test ---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment