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

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


On Tue, 22 Sep 2009, Benoit Jacob wrote:

Sorry for adding to the currently already high traffic here.

Well, that's what the mailing list is for, isn't it?

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.

Cheers,
Jitse



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