News: 0001619995

  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)

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

([GNU] 3 Hours Ago Faster cosch)


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 [1]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.



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



She asked me, "What's your sign?"
I blinked and answered "Neon,"
I thought I'd blow her mind...