[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Matrix multiplication benchmark - Octave vs. Matlab

From: John W. Eaton
Subject: Re: Matrix multiplication benchmark - Octave vs. Matlab
Date: Mon, 28 Jul 2003 15:18:26 -0500

On 28-Jul-2003, Mike Miller <address@hidden> wrote:

| I just want to say that I'm very pleased, impressed and surprised that
| Octave is as fast as, or even faster than, MATLAB.  Before I knew what a
| BLAS was, I made some comparisons and thought Octave performed poorly in
| comparison with MATLAB.  Of course, that was because I was using Octave
| without the BLAS.

Octave always uses soem version of the blas and lapack for matrix
operations.  By default, it is the reference implementation written in
Fortran which is quite portable but not known to be fast.  Octave can
also use ATLAS, which replaces some blas and lapack routines with
faster versions, tuned for a specific processor.

| I didn't know until today that Octave with ATLAS BLAS
| can actually outperform MATLAB.  I didn't expect to see that because
| MATLAB has a lot of money behind it and they put a lot of effort into
| optimization.

I believe that the MathWorks had their own specialized versions of
blas and linpack in earlier versions of Matlab but now they have
decided to just use ATLAS (though perhaps they are making some
proprietary modifications to it).

| Is there any way
| to find out if a compiled octave binary was really compiled against a

You can try

  octave_config_info ("BLAS_LIBS")

but the info it returns may not immediately tell you whether you are
using ATLAS.  For example, on my system, it returns

  ans = /usr/lib/ /usr/lib/

so it is not clear whether ATLAS provides the blas and lapack
libraries -- it does, but you have to check elsewhere to find out for

  devzero:561> ls -l /usr/lib/ 
  lrwxrwxrwx    1 root     root           31 Mar  4 20:45 
/usr/lib/ -> /etc/alternatives/
  devzero:562> ls -l /etc/alternatives/
  lrwxrwxrwx    1 root     root           27 Jul 25 13:05 
/etc/alternatives/ -> /usr/lib/atlas/
  devzero:563> ls -l /usr/lib/atlas/
  lrwxrwxrwx    1 root     root           14 Jul 25 13:03 
/usr/lib/atlas/ ->
  devzero:564> ls -l /usr/lib/atlas/
  lrwxrwxrwx    1 root     root           16 Jul 25 13:03 
/usr/lib/atlas/ ->
  devzero:565> ls -l /usr/lib/atlas/
  -rw-r--r--    1 root     root      4362352 Jun 20 18:43 


Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]