This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC] [BZ15384] Enchance finite and isfinite.
- From: Marc Glisse <marc dot glisse at inria dot fr>
- To: Ondřej Bílka <neleai at seznam dot cz>
- Cc: libc-alpha at sourceware dot org
- Date: Sun, 21 Apr 2013 15:35:19 +0200 (CEST)
- Subject: Re: [RFC] [BZ15384] Enchance finite and isfinite.
- References: <20130421130733 dot GA13954 at domone dot kolej dot mff dot cuni dot cz>
- Reply-to: libc-alpha at sourceware dot org
On Sun, 21 Apr 2013, Ondřej Bílka wrote:
Hi, on http://sourceware.org/bugzilla/show_bug.cgi?id=15384 is request
to improve finite.
I noticed that integer constants there are unnecessary, shift suffices.
However on x64 even gcc without optimizations expands finite to inline
version which is slower than my version(see benchmark).
This seems to depend on the CPU. Here:
model name : Intel(R) Core(TM)2 Duo CPU T9600 @ 2.80GHz
your new code from the PR is noticably slower than the current code
(copied to the test file to be fair), while the code you posted in this
email and gcc's __builtin_finite are comparable to the current code.
Changing the constant as suggested in the PR brings a very small but
measurable speedup.
I will fill this to gcc bugzilla.
Maybe you can reuse PR56944?
--
Marc Glisse