From: A. M. A. <per...@gm...> - 2006-11-09 07:27:49
|
On 08/11/06, Tim Hochberg <tim...@ie...> wrote: > It has always been my experience (on various flavors or Pentium) that > operating on NANs is extremely slow. Does anyone know on what hardware > NANs are *not* slow? Of course it's always possible I just never notice > NANs on hardware where they aren't slow. On an opteron machine I have access to, they appear to be no slower (and even faster for some transcendental functions) than ordinary floats: In [13]: a=zeros(1000000) In [14]: %time for i in xrange(1000): a += 1.1 CPU times: user 6.87 s, sys: 0.00 s, total: 6.87 s Wall time: 6.87 In [15]: a *= NaN In [16]: %time for i in xrange(1000): a += 1.1 CPU times: user 6.86 s, sys: 0.00 s, total: 6.86 s Wall time: 6.87 On my Pentium M, they are indeed significantly slower (three times? I didn't really do enough testing to say how much). I am actually rather offended by this unfair discrimination against a citizen in good standing of the IEEE floating point community. A. M. Archibald |