VOOZH about

URL: https://www.phoronix.com/news/Glibc-Faster-cosh-x86-64-FMA

⇱ GNU C Library Lands x86_64 FMA'ed cosh For A ~35% Improvement - Phoronix


👁 Phoronix

GNU C Library Lands x86_64 FMA'ed cosh For A ~35% Improvement

Written by Michael Larabel in GNU on 16 March 2026 at 04:21 PM EDT. 18 Comments
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.

👁 glibc cosh FMA optimization


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.:

👁 glibc CORE-MATH change performance benchmark


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.

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.