[PATCH v2] string: Add support for __memsetzero on all targets

Wilco Dijkstra Wilco.Dijkstra@arm.com
Thu Feb 10 14:25:46 GMT 2022


Hi,

So as far as I can see the main justification for this is a specific issue in some
(one?) x86 microarchitecture. It's not clear to me that this will benefit other
targets enough to be worth the effort - again at best you avoid executing
one instruction per memset call. That was a big thing on in-order cores
decades ago, but today that's hard to measure.

Another issue is that unlike __memcmpeq, the default scenario is that most
targets will actually see a slowdown. Once compilers emit __memsetzero,
one will be forced to provide an efficient target implementation just to
avoid this slowdown. So I don't see how this helps improve GLIBC.

Cheers,
Wilco


More information about the Libc-alpha mailing list