| MATLAB® | ![]() |
bench
bench(N)
bench(0)
t = bench(N)
bench times six different MATLAB tasks and compares the execution speed with the speed of several other computers. The six tasks are:
| Test | Description | Performance Factors |
|---|---|---|
| LU | Perform LU of a full matrix | Floating-point, regular memory access |
| FFT | Perform FFT of a full vector | Floating-point, irregular memory access |
| ODE | Solve van der Pol equation with ODE45 | Data structures and M-files |
| Sparse | Solve a symmetric sparse linear system | Mixed integer and floating-point |
| 2-D | Plot Bernstein polynomial graph | 2-D line drawing graphics |
| 3-D | Display animated L-shape membrane logo | 3-D animated OpenGL graphics |
A final bar chart shows speed, which is inversely proportional to time. The longer bars represent faster machines, and the shorter bars represent the slower ones.
bench(N) runs each of the six tasks N times.
bench(0) just displays the results from other machines.
t = bench(N) returns an N-by-6 array with the execution times.
The comparison data for other computers is stored in the following text file. Updated versions of this file are available from MATLAB Central:
http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=1836&objectType;=file#
This benchmark is intended to compare performance of one particular version of MATLAB on different machines. It does not offer direct comparisons between different versions of MATLAB. The tasks and problem sizes change from version to version.
The LU and FFT tasks involve large matrices and long vectors. Machines with less than 64 megabytes of physical memory or without optimized Basic Linear Algebra Subprograms may show poor performance.
The 2-D and 3-D tasks measure graphics performance, including software or hardware support for OpenGL. The command
OpenGL info
describes the OpenGL support available on a particular machine.
Fluctuations of five or ten percent in the measured times of repeated runs on a single machine are not uncommon. Your own mileage may vary.
profile, profsave, mlint, mlintrpt, memory, pack, tic, cputime, rehash
![]() | beep | besselh | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |