Port-amd64 archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: dropping common asm functions
On Wed, Apr 15, 2020 at 08:30:38PM +0200, Maxime Villard wrote:
> I'd like to remove all the str*.S files from libc/arch/x86_64/string/, and
> change the Makefile to use the C version of the functions instead.
>
> Asm doesn't receive instrumentation, and we have to resort to annoying wrappers
> all the time (kmsan_strcat, kasan_strcat, etc).
What other functions might this affect?
> Not relevant for performance,
I don't see it that way. The cumulative cost of primitives adds up and
there would be an affect from this change, albeit small.
Timings in microseconds for 1000 calls to strncmp() on identical strings, on
two very different CPUs comparing the C and assembly versions we have in
libc now:
Length Xeon Xeon G-T40E G-T40E
C asm C asm
------ ------- ------- ------- -------
4 8 7 31 32
32 40 35 187 159
1024 1004 1005 5147 4669
> and these functions basically got replaced by safer variants implemented
> in C anyway.
Do you mean strlcmp()?
Andrew
Home |
Main Index |
Thread Index |
Old Index