Re:A 100LOC C impl of memset, that is faster than glibc's
by asdfasgasdgasdg on Friday November 12, 2021 @07:27AM
(#29198646)
Does glibc not have feature detection and conditional compilation for cases like this? That is surprising to me.
[ Parent
| on HN ]
Re:A 100LOC C impl of memset, that is faster than glibc's
by rwmj on Friday November 12, 2021 @07:35AM
(#29198689)
It does. Each subdirectory of sysdeps/ can contain specific implementations per platform, arch, etc. eg: the aarch64 assembler memset is:
https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/aar...
There's also the "ifunc" mechanism which can be used to make the choice at runtime, eg:
https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/aar...