News: 0001594095

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

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

([GNU] 5 Hours Ago Glibc)


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.

The change to drop the ldbl-96 FMA implementation from Glibc's math code happened with [1]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 [2]detection for newer CPUs , [3]the MSEAL function , and other performance optimizations.



[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=42f07a44ef88e0c9ff1bd5343786013272467414

[2] https://www.phoronix.com/news/Glibc-Nova-Lake-Wildcat-Lake

[3] https://www.phoronix.com/news/Glibc-Linux-mseal-Function



Once ... in the wilds of Afghanistan, I lost my corkscrew, and we were
forced to live on nothing but food and water for days.
-- W. C. Fields, "My Little Chickadee"