Re:Why is strlen so complex in C?
by saagarjha on Monday August 26, 2019 @06:24PM
(#20804369)
Honestly, I don't know: I trust that the glibc people know what they are doing. However, in an attempt answer some of your questions: there is an SSE2 implementation available that might be used on computers that support it: https://github.com/bminor/glibc/blob/master/sysdeps/x86_64/s... . Perhaps this version is for platforms that don't have a hand-optimized implementation? I'm not sure if the compiler is smart enough to auto-vectorize an arbitrary strlen implementation (or delegate it to a library call).
[ Parent
| on HN ]
There are no comments on this comment yet.