[eigen] (General question) Floating point: why are 'inf' and 'nan' slow? |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen <eigen@xxxxxxxxxxxxxxxxxxx>
- Subject: [eigen] (General question) Floating point: why are 'inf' and 'nan' slow?
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Tue, 22 Sep 2009 20:51:58 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=RIvP4z0okz1kqOJi5DXpZ5wbWVKzbtec1GUHH4C+CnA=; b=eC9DjHyTqcjpGXVDU/rUhK2Nj+lyBM3ayvJdsBl2Rx6Fjy6nOFW1XiInV6JNEGTyMq CyUkV02/qcmloB0ngSQKXHKFBhKZY+y+OWBDNejkfmQARtKUUCb3Um0lpufN/fJJwxvX xreVup/ra+5widZEGgN0ONFebEC4GNaU/j4UM=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=ArHawhvkdfq+NojhriyBsjxxCW255icQWl/z4tKTQxyrrjnmTFN/ntIiFW4rYCavN5 ZY062K6S2Z8heUrBrWb+1S1j2/IzDoPfFG3S5VDrEab7zu76ZN8XuLe/PhZ6FgndG909 VHcTJxS215nCTpVrCwoiKZ/istbJEzX/JSQEw=
Hi,
Sorry for adding to the currently already high traffic here.
Here, on linux / x86, my programs run 100x slower when the
floating-point values are 'inf' or 'nan'.
Only scalar code is affected, SSE code is not affected.
I haven't enabled floating-point exception signals. I don't have a FP
signal handler. Just any basic c++ program.
Can this be "fixed"? How?
Otherwise, I really need to make sure that solve() methods avoid
producing such special values when no solution exists --- otherwise
they take much longer to return.
Thanks for your help,
Benoit