NaN slowdown with some processors
Fredrik Lingvall
fl at ifi.uio.no
Wed Jun 4 03:30:22 CDT 2008
Olli Saarela wrote:
> Hello,
>
> I'm planning to buy a new desktop machine, and since my computations
> utilize NaN values heavily, I'd like to know whether Intel Core 2
> processors suffer from the same slowdown with NaN values as Pentium. For
> details, see http://www.cygnus-software.com/papers/x86andinfinity.html
>
> If someone has Octave on a machine with a Core 2 processor, please run
> the following commands and tell the results. (Or a more detailed test
> from ftp://ftp.cygnus-software.com/pub/specialnumbers.zip)
>
> a=zeros(300,300);tic;b=(1.0+a)*a;toc
> a=zeros(300,300);tic;b=(NaN+a)*a;toc
>
> Below are results from my current machines. Since SSE2 in Pentium isn't
> affected with the slowdown, it seems that for some reason the commands
> above don't utilize SSE2. AMD processors aren't affected.
>
> Pentium M, Octave 3.0.1 MSVC2005 SSE2
> octave-3.0.1.exe:8> a=zeros(300,300);tic;b=(1.0+a)*a;toc
> Elapsed time is 0.0430298 seconds.
> octave-3.0.1.exe:9> a=zeros(300,300);tic;b=(NaN+a)*a;toc
> Elapsed time is 28.8307 seconds.
>
> Pentium 4 (Family 15, Model 2), Octave 3.0.1 MSVC2005 SSE2
> octave-3.0.1.exe:2> a=zeros(300,300);tic;b=(1.0+a)*a;toc
> Elapsed time is 0.0257161 seconds.
> octave-3.0.1.exe:3> a=zeros(300,300);tic;b=(NaN+a)*a;toc
> Elapsed time is 15.7125 seconds.
>
> AMD Turion 64 X2, Octave 3.0.1 MSVC2008 SSE3
> octave-3.0.1.exe:3> a=zeros(300,300);tic;b=(1.0+a)*a;toc
> Elapsed time is 0.0244939 seconds.
> octave-3.0.1.exe:4> a=zeros(300,300);tic;b=(NaN+a)*a;toc
> Elapsed time is 0.0251131 seconds.
>
> Thank you,
> Olli
>
> _______________________________________________
> Help-octave mailing list
> Help-octave at octave.org
> https://www.cae.wisc.edu/mailman/listinfo/help-octave
>
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.
/Fredrik
More information about the Help-octave
mailing list