[PATCH v2] x86-64: Optimize bzero
Adhemerval Zanella
adhemerval.zanella@linaro.org
Thu Feb 10 20:42:06 GMT 2022
On 10/02/2022 17:27, Alejandro Colomar (man-pages) wrote:
>> We are discussing different subjects here: what I want is to remove the
>> glibc *internal* optimization for bzero, which is essentially an
>> implementation detail. In a first glance it would change performance,
>> however gcc does a hard job replacing bzero/bcmp/bcopy with their
>> str* counterparts, so it highly unlike that newer binaries will actually
>> call bzero.
>
> Okay, then yes, go ahead and remove bzero(3) from glibc if GCC will
> continue supporting it. Just remember that some users keep writing and
> wanting to write bzero(3) instead of memset(3) in their .c files, so
> it's far from being dead in source code.
Again, I am not proposing to *remove* bzero, but rather the internal
optimizations that currently only adds code complexity and maintenance
burden. My patchset [1] will keep the ABI as-is, the difference is
bcopy and bzero will use the default implementation on all architectures.
[1] https://patchwork.sourceware.org/project/glibc/list/?series=7243
More information about the Libc-alpha
mailing list