Re: [eigen] (General question) Floating point: why are 'inf' and 'nan' slow? |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] (General question) Floating point: why are 'inf' and 'nan' slow?
- From: Rohit Garg <rpg.314@xxxxxxxxx>
- Date: Wed, 23 Sep 2009 09:48:28 +0530
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=9FfjIqeBo14Hw4e3oNs/yJ0o/0OqAoXlg2uDWgBo2Zo=; b=Go4cBY3gFlHJdO1/J4/MVfx+NPUOfKyCw46wcL2arngj/vftOwoClNNd1tmiizahwt 5J7xultCS7TUi5o16JpuTz4OWT8yVFNkWWSoFMakt3OsiXD0oWkcoCyuCOV6ug/QCqSZ E2/6Y3sj/GUo+ZA520k8bKca/dzAlo18A7994=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=EcfFT9QWcjsu+SerwgUafPdH4U0DjjHeIHyHmtJ6iTm26Tv0gxqaT9SZPZ122W6p9M BrLX5tZKuWMt4ki4yzOvWPy0pACXnqaGYQnRFqalg5ZcCiLdo/6ZxS5KQD9HqEJQTFbP K6ox+00t6yD54pVF+DN+77RO3yXpZw5vz6iQU=
fp exceptions are handled in software. Is it 32 bit or 64 bit? If it
is 32 bit, have you enabled -mfpmath=sse in your compiler flags?
On Wed, Sep 23, 2009 at 6:21 AM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
> 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
>
>
>
--
Rohit Garg
http://rpg-314.blogspot.com/
Senior Undergraduate
Department of Physics
Indian Institute of Technology
Bombay