This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] Sparc exp(), expf() performance improvement
On 8/2/2017 6:19 PM, David Miller wrote:
From: Patrick McGehearty <firstname.lastname@example.org>
Date: Wed, 2 Aug 2017 14:53:19 -0500
I concur that it would be beneficial to use -mcpu=niagara4 for
selected libm functions, but do not believe it should be default on
without more extensive testing (and likely more compiler tuning).
This is precisely what has been suggested, have an niagara4 IFUNC
vector for math functions that benefit greatly from the fp<-->int
register move instructions.
I'm new to linux glibc development and have been using existing examples
how I should do things like use ifunc. If there is a different approach
that is recommended,
I'm willing to use it but will need some hints/instruction on what is.
My current approach of using
sparc_libm_ifunc (exp, hwcap & HWCAP_SPARC_CRYPTO ?
__exp_niagara4 : __ieee754_exp);
in sysdeps/sparc/sparc64/fpu/multiarch/e_exp-niagara4.c matches the
approach used in
I'll note that simply using -mcpu=niagara4 on the existing ieee754 exp()
provides a 5% performance gain. Due to other assignments, I will not
to redo other libm functions at this time.