help-octave
[Top][All Lists]
Advanced

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

Re: NaN slowdown with some processors


From: Thomas Ilnseher
Subject: Re: NaN slowdown with some processors
Date: Wed, 04 Jun 2008 10:52:38 +0200

Am Mittwoch, den 04.06.2008, 09:11 +0300 schrieb Olli Saarela:
> 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
> 

I don't experience this bug on a P4:

address@hidden ~ $ octave
GNU Octave, version 3.0.0
[...]
octave:1> a=zeros(300,300);tic;b=(1.0+a)*a;toc
Elapsed time is 0.018991 seconds.
octave:2> a=zeros(300,300);tic;b=(NaN+a)*a;toc
Elapsed time is 0.00201607 seconds.
octave:3> exit

address@hidden ~ $ cat /proc/cpuinfo 
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 4
model name      :               Intel(R) Pentium(R) 4 CPU 3.00GHz
stepping        : 9
cpu MHz         : 2992.534
cache size      : 1024 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 1
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall
nx lm constant_tsc pni monitor ds_cpl cid cx16 xtpr lahf_lm
bogomips        : 5989.06
clflush size    : 64
cache_alignment : 128
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor       : 1
[... the same ...]

CFLAGS and CXXFLAGS to compile octave were:

CFLAGS="-O2 -pipe -march=nocona -mfpmath=sse -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"

the -mfpmath=sse switch makes octave use sse units for floating points,
so that the bug doesn't bite.

-- 
Thomas Ilnseher <address@hidden>



reply via email to

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