Glibc's strncasecmp / strcasecmp Get AVX2 & EVEX Optimized Versions, Drops AVX
The GNU C Library (glibc) has landed a set of 23 patches providing optimized AVX2 and EVEX versions of strcasecmp/strncasecmp functions while dropping support for the original AVX implementation.
A patch series by Noah Goldstein was merged to Glibc Git this past weekend offering up AVX2 and EVEX optimized versions of the str{n}casecmp functions -- commonly used functions for string comparisons -- for this widely used C library on Linux systems.
The AVX2 optimized version of these functions took around a third less time as the SSE4.2 implementation. Meanwhile the EVEX version of these functions in the same benchmarks against the SSE 4.2 code path took 38% less time.
Now with having an AVX2 implementation, the original Advanced Vector Extensions (AVX) version of the strcasecmp/strncasecmp functions is being removed. That AVX version is being dropped since its performance is similar to that of the SSE 4.2 implementation and AVX2 is widely supported across modern versions. The processors that principally benefit from the AVX(1) version are Sandy Bridge and Ivy Bridge to which they are "becoming outdated" and thus freeing that code from the Glibc code-base.
See these patches if interested in the details.
A patch series by Noah Goldstein was merged to Glibc Git this past weekend offering up AVX2 and EVEX optimized versions of the str{n}casecmp functions -- commonly used functions for string comparisons -- for this widely used C library on Linux systems.
The AVX2 optimized version of these functions took around a third less time as the SSE4.2 implementation. Meanwhile the EVEX version of these functions in the same benchmarks against the SSE 4.2 code path took 38% less time.
Now with having an AVX2 implementation, the original Advanced Vector Extensions (AVX) version of the strcasecmp/strncasecmp functions is being removed. That AVX version is being dropped since its performance is similar to that of the SSE 4.2 implementation and AVX2 is widely supported across modern versions. The processors that principally benefit from the AVX(1) version are Sandy Bridge and Ivy Bridge to which they are "becoming outdated" and thus freeing that code from the Glibc code-base.
See these patches if interested in the details.
29 Comments