NaN slowdown with some processors
Fredrik Lingvall
fl at ifi.uio.no
Wed Jun 4 05:24:14 CDT 2008
Fredrik Lingvall wrote:
>
>>
>>
> Core2 T7200, 2.00GHz, Octave 3.0.1, Goto BLAS 1.22, Gentoo x86_64, Dell
> M90 Laptop
>
> octave:1> a=zeros(300,300);tic;b=(1.0+a)*a;toc
> Elapsed time is 0.082047 seconds.
> octave:2> a=zeros(300,300);tic;b=(NaN+a)*a;toc
> Elapsed time is 0.0106151 seconds.
>
A more thorough test:
octave:1> tt=[];for n=1:10000,a=zeros(300,300);tic;b=(1.0+a)*a;t = toc;
tt = [tt t]; end
octave:2> mean(tt)
ans = 0.0049111
octave:3> std(tt)
ans = 6.4211e-04
octave:4> tt=[];for n=1:10000,a=zeros(300,300);tic;b=(NaN+a)*a;t = toc;
tt = [tt t]; end
octave:5> mean(tt)
ans = 0.0048900
octave:6> std(tt)
ans = 6.3502e-04
Also, Goto BLAS was configured to use both cores (and the THREAD_TIMEOUT
was set to 26).
/F
More information about the Help-octave
mailing list