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: [PATCH2/2] Improve performance of sinf and cosf


On Tue, 26 Jun 2018, Wilco Dijkstra wrote:

> +  sincos_t *p = &sincosf_table[0];

Presumably using const in the first patch will also require pointers like 
this in the second patch to use const as well.

Both patches should update NEWS to reflect the enhancement.

Remark, not a requirement: both the previous sinf/cosf improvements, and 
this one, left k_cosf.c and k_sinf.h alone.  __kernel_cosf and 
__kernel_sinf are still used in e_lgammaf_r.c.  It would not surprise me 
if the new version was in fact faster there (even though redundant checks 
for the need for range reduction would be introduced) and so k_cosf.c and 
k_sinf.c could be replaced by dummy files with no code after updating 
e_lgammaf_r.c.

It would also not surprise me if the new version were faster than the 
versions of [ks]_{cos,sin}f.c in sysdeps/powerpc/fpu and so those are no 
longer needed (or indeed faster than the POWER8 versions of cosf and sinf) 
- but that would need powerpc maintainer testing.

-- 
Joseph S. Myers
joseph@codesourcery.com


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