VOOZH about

URL: https://www.phoronix.com/news/Glibc-4x-FMA-Improvement-Zen

⇱ Glibc Math Code Sees 4x Improvement On AMD Zen By Changing FMA Implementation - Phoronix


👁 Phoronix

Glibc Math Code Sees 4x Improvement On AMD Zen By Changing FMA Implementation

Written by Michael Larabel in GNU on 23 November 2025 at 06:31 AM EST. 18 Comments
Merged this week to the GNU C Library "glibc" code is dropping the ldbl-96 FMA implementation from this library as in doing so they found a 4x improvement to throughput and latency on AMD Zen 3 hardware.

Replacing Glibc's long double implementation using 96-bit precision for internal calculations with the 64-bit double FMA implementation ended up netting a nice win for this widely-used libc implementation.

On "recent x86 hardware" the ldbl-64 implementation far outpaces the ldbl-96 code that has been removed from Glibc Git. In x86_64 benchmarks the throughput on AMD Zen 3 testing was 4.06x and for latency was also a 4.00x improvement. For i686 mode it was still a hefty 2.2~2.3x improvement.

👁 Glibc ldbl-96 FMA benchmark


The change to drop the ldbl-96 FMA implementation from Glibc's math code happened with this commit now in Glibc Git.

This will in turn be released with Glibc 2.43 due for release in February. Glibc 2.43 also is bringing detection for newer CPUs, the MSEAL function, and other performance optimizations.

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.