NaN slowdown with some processors

Olli Saarela Olli.Saarela at kcl.fi
Wed Jun 4 01:11:15 CDT 2008


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



More information about the Help-octave mailing list