A bit of time has passed since having any exciting performance improvements to report on within the GNU C Library “glibc” but that changed today with another nice x86_64 optimization for modern CPUs.
Adhemerval Zanella of Linaro has enabled an FMA-optimized cosh() function for modern x86_64 Intel/AMD processors. The FMA version of cosh is reported to be around a 35% performance improvement when building for the x86_64-v3 micro-architecture feature level.
Quite a nice improvement to the hyperbolic cosine “cosh” performance and yet another Glibc optimization for making better use of modern x86_64 ISA capabilities. A 35% speed-up for cosh() is certainly nice over the existing SSE2 version of that function.
The FMA version landed in Glibc Git via this patch alongside several other patches today from Adhemerval Zanella. Some of the other patches merged today also benefited performance around using tanh and sinh from CORE-MATH but the results tended to be mixed, particularly if targeting older CPUs/ISAs, e.g.:
This latest Glibc work is building up for the Glibc 2.44 release due out in August. If traditions hold, more than likely we’ll see more performance optimizations land still before that Glibc 2.44 release.
