[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: MacOSX: Octave.app 2.9.14
From: |
Dmitri A. Sergatskov |
Subject: |
Re: MacOSX: Octave.app 2.9.14 |
Date: |
Sun, 30 Sep 2007 16:59:21 -0500 |
On 9/30/07, Vic Norton <address@hidden> wrote:
> Here is a description of the problem. Consider, for example,
> function: norm(x)
> expression: sqrt(sum(x .* x))
> On my system the expression is 9.6 times as fast as the function in
> octave-2.9.14 (for a random 100-vector x) and "only" 5.5 times as
> fast in octave-2.9.9.
>
> A similar situation holds for
> function: norm(x, 1)
> expression: sum(abs(x))
> The expression is 9.9 times as fast as the function in octave-2.9.14
> and "only" 6.7 times as fast in octave-2.9.9.
>
I wonder if this is an issue with MacOSX blas library. In any case on
my computer (linux x86_64, octave 2.9.9):
octave:3> x=randn(1,1000000);
octave:4> tic; norm(x); toc
Elapsed time is 0.240479 seconds.
octave:5> tic; sqrt(x .* x); toc
Elapsed time is 0.141808 seconds.
octave:6> tic; norm(x,1); toc
Elapsed time is 0.196823 seconds.
octave:7> tic; sum(abs(x)); toc
Elapsed time is 0.105629 seconds.
Dmitri.
p.s. CCed to octave-help list
--