octave-maintainers
[Top][All Lists]
Advanced

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

eigenvalues 3 times speedup patch [Was: benchmarks]


From: David Bateman
Subject: eigenvalues 3 times speedup patch [Was: benchmarks]
Date: Fri, 23 Jan 2004 14:05:04 +0100
User-agent: Mutt/1.4.1i

Paul,

Ok, this e-mail of your has drawn a lot of replies from me. I think this
is probably the last thread I'll draw from it for now. However, check 

> II.B Matlab 0.86 - Octave 2.30 - O-Matrix 0.44
>     b = eig(a);

Well, there is a simple reason why octave is slower here, for this benchmark.
The benchmark asks for the eigenvalues only, but octave calculates the
eignevectors as well... Dohhhh....

I've written a small patch to 2.1.53, that makes "eig(a)" only calculate the
eigenvectors when asked for them.

Here are some interesting tests

Matlab R12
----------

>> a = randn(300,300); tic; [b,bv] = eig(a); toc

elapsed_time =

    1.9291

>> a = randn(300,300); tic; b = eig(a); toc     

elapsed_time =

    0.7860

Octave 2.1.50
-------------
octave:2> a = randn(300,300); tic; [b,bv] = eig(a); toc
ans = 2.1188
octave:4> a = randn(300,300); tic; b = eig(a); toc
ans = 2.0628

Octave 2.1.53 + patch
---------------------
octave:2> a = randn(300,300); tic; [b,bv] = eig(a); toc
ans = 2.1721
octave:4> a = randn(300,300); tic; b = eig(a); toc
ans = 0.84389

This together with the sort and ziggurat codes I've been working on seem
to address most of the issues in the sciviews benchmarks in sections I
and II. Now there are only the problems with "for" loops as shown in
section III, but these are probably beyond me to address.

JWE, any chance of getting this patch in?

Cheers
David


-- 
David Bateman                                address@hidden
Motorola CRM                                 +33 1 69 35 48 04 (Ph) 
Parc Les Algorithmes, Commune de St Aubin    +33 1 69 35 77 01 (Fax) 
91193 Gif-Sur-Yvette FRANCE

The information contained in this communication has been classified as: 

[x] General Business Information 
[ ] Motorola Internal Use Only 
[ ] Motorola Confidential Proprietary

Attachment: patch.eigen
Description: Text document


reply via email to

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