银耳提取物的护肤功效:Matlab vs. R performance benchmarking1
来源:百度文库 编辑:九乡新闻网 时间:2024/07/14 17:36:24
Matlab vs. R performance benchmarking
A somewhat outdated comparison of Matlab and R (and a variety of other packages) can be found here. Unfortunately the R code is too outdated to run with the current (2.8.1) version but you can find a more up to date version here.
I've added five statistical functions tests to the benchmark. The Matlab code is here and the R code is here.
Set up
Each test was run twenty times on a Intel Core 2 1.86Ghz machine with 4Gb RAM running Windows Vista Business. I increased the number of repeats from three to twenty since most of the calculations rely on random numbers which will be different in each program. A much better solution for the matrix calculations would be to use the same randomly generated matrices in each program, maybe I'll do that sometime!I was using Matlab 2008b and R 2.8.0.
What conclusions can we draw?
Matlab is still on an order of twice as fast as R for Matrix operations. Also, Matlab can sometimes workout how to vectorise loops - which is why the loop test here concludes that Matlab is 400 times faster than R! I should really write a new loop test that Matlab isn't able to vectorise! For statistical functions it is less clear cut.Naturally, speed is not necessarily a key consideration. We'd all be using C if it was after all. Personally, I prefer R's flexible plotting, rich data structures, package management and free-ness. But I'll admit it's far from perfect. But I'll admit it's far from perfect, and Matlab does have a lot of great features (like the profiler) and clean syntax.
FFT over 800,000 random values 0.443 0.129 3.441 Eigenvalues of a 320x320 random matrix 0.378 0.452 0.835 Determinant of a 650x650 random matrix 0.157 0.065 2.399 Cholesky decomposition of a 900x900 matrix 0.256 0.087 2.954 Inverse of a 400x400 random matrix 0.105 0.047 2.223 III. Programmation
750,000 Fibonacci numbers calculation (vector calc) 0.349 0.292 1.195 Creation of a 2250x2250 Hilbert matrix (matrix calc) 0.575 0.269 2.137 Grand common divisors of 70,000 pairs (recursion) 0.470 0.075 6.230 Creation of a 220x220 Toeplitz matrix (loops) 0.290 0.001 402.108 Escoufier's method on a 37x37 matrix (mixed) 0.550 0.636 0.865 IV. Statistics
Generating 107 uniform(0,1) random numbers 1.136 0.338 3.364 Create a permutation of [1..106 ] 0.078 0.257 0.304 Sample from binomal(100,.5) 105 times 0.061 0.480 0.126 Sample from N(0,1) 106 times 0.334 0.036 9.163 Evaluate N(0,1) at 106 locations 0.558 0.077 7.240
Matlab vs. R performance benchmarking1
matlab
High-performance Linux clustering
Measuring SQL Performance
matlab toolbox
matlab绘图
Interactive Strategies for Improving Performance
Amazon EC2 Disk Performance | AF
Balanced approach to performance appraisal ---------
极限、方程组求解-matlab
matlab绘图例子
MATLAB函数画
Matlab中插值函数汇总
MATLAB与Visual Basic
MATLAB 实现傅里叶变换
MATLAB函数指令表
matlab函数大全1
matlab函数大全2
MATLAB函数介绍
VC++和Matlab
MATLAB中的正态分布检验
VB与MATLAB探讨
请问Matlab如何画多幅图
MATLAB的绘图功能