This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] [BZ15384] Enchance finite and isfinite.


From: Ondřej Bílka <neleai@seznam.cz>
Date: Fri, 26 Apr 2013 08:17:32 +0200

> Following should generic version be tried on other archs. I could get
> 20% speedup on sparc on this benchmark. 
> 
> run with
> for i in `seq 0 7`; do echo finite$i;  gcc finite_bench.c -O3 -Wall -W -fno-builtin-finite -Dfinite=finite$i; for j in `seq 1 8`; do /usr/bin/time -f "%U" ./a.out; done; done

That'll only be faster on sparc 32-bit where floating point
values are passed in integer registers.

For 64-bit, where floating point values are passed in floating point
registers, the assembler in glibc will always be faster because GCC
isn't smart enough to avoid allocating a register window when a stack
slot is needed to move values between float and integer registers.
Also, the sparc 64-bit multiarch variants make use of the VIS3
float-int move instructions when available.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]