Optimization comparison: 3.3, 3.4, mainline, tree-ssa
Guillermo Ballester Valor
gbv@oxixares.com
Mon Apr 19 16:49:00 GMT 2004
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
More information about the Gcc
mailing list