This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Optimization comparison: 3.3, 3.4, mainline, tree-ssa
- From: Guillermo Ballester Valor <gbv at oxixares dot com>
- To: gcc at gcc dot gnu dot org
- Date: Mon, 19 Apr 2004 18:33:33 +0200
- Subject: Re: Optimization comparison: 3.3, 3.4, mainline, tree-ssa
- References: <40837167.5000902@kss-loka.si>
Hello
On Monday 19 April 2004 08:27, Uros Bizjak wrote:
> BTW: I would really appreciate some help with -rint(), lrint() and
> llrint() builtins
Sure you kow the trick. I gain about 30% of performance in Glucas, (a
Lucas-Lehmer test for Mersenne Prime numbers), when using the round constant
trick basically,
#define RINT(x) (((x) + A) - A)
where A = 3 * 2^62 (for x87) and (3 * 2^51) for 8 bytes IEEE doubles. This is
better to me than
#define RINT(x) ({ double __arg ;\
__asm__ volatile ("frndint \n" : "=t" (__arg) : "0" (x));\
__arg;})
Any chance to use the trick in gcc?
Guillermo
--
Guillermo Ballester Valor
gbv@oxixares.com
Ogijares, Granada SPAIN
Linux user #117181. See http://counter.li.org/
Public GPG KEY http://www.oxixares.com/~gbv/pubgpg.html