Re: [eigen] (General question) Floating point: why are 'inf' and 'nan' slow?

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


2009/9/23 Jitse Niesen <jitse@xxxxxxxxxxxxxxxxx>:
>> Here, on linux / x86, my programs run 100x slower when the
>> floating-point values are 'inf' or 'nan'.
>
> I seem to remember that this is a problem / feature in the design with Intel
> FPUs, but not with the AMD ones. Computations with these special values take
> longer, presumably because the people that designed the chip thought that
> they are not used often. Here's an article I found (it's from some time ago
> though): http://www.cygnus-software.com/papers/x86andinfinity.html
>
> I never looked into it in detail though.
>

OK, thanks for the link, that was interesting. I confirms exactly my
experience (I have a  Core 1 Duo so it's not specific to the Pentium
4).

It is interesting that it mentions that, while the issues with INF and
NAN are specific to Intel non-SSE, the issues with denormals are
universal. For Eigen though, the big issue is INF and NAN.

Benoit



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/