News: 0001487041

  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)

Intel Further Speeds Up strnlen() In The GNU C Library For Recent Intel/AMD CPUs

([Intel] 6 Hours Ago Faster strnlen())


Intel software engineers are responsible for many of the great x86_64-related optimizations to the GNU C Library "glibc" over the years. While they've extensively tuned many Glibc functions for achieving peak performance on their modern CPUs, it's a never-ending quest. Merged this week was another optimization to strnlen(), the function for determining the number of bytes in a fixed-size string.

Matthew Sterrett of Intel unified Glibc's strnlen EVEX and EVEX512 implementations. In turn this unified, optimized strnlen handling for x86_64 Intel/AMD CPUs with EVEX support is showing some nice improvements over the prior code.

Sterrett wrote in [1]the commit unifying the strnlen EVEX implementations:

x86: Unifies 'strnlen-evex' and 'strnlen-evex512' implementations.

This commit uses a common implementation 'strnlen-evex-base.S' for both 'strnlen-evex' and 'strnlen-evex512'

This patch serves both to reduce the number of implementations, and it also does some small optimizations that benefit strnlen-evex and strnlen-evex512.

All tests pass on x86.

Benchmarks were taken on [an Intel Core i9 7900X Skylake X CPU].

Geometric mean for strnlen-evex over all benchmarks (N=10) was (new/old) 0.881

Geometric mean for strnlen-evex512 over all benchmarks (N=10) was (new/old) 0.953

That improved code is merged in Glibc Git for the Glibc 2.41 release coming out as stable in February.



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



patrick1946

elbar

uxmkt

Volta

Volta

Netch

patrick1946

patrick1946

markg85

The Moral Majority is neither.