Hacker News new | ask | show | jobs
by dchest 6005 days ago
BSD implementation of strlen() is handwritten in assembler for most architectures, and is optimized. The misunderstanding about it not being optimized is probably because someone read the fall-back non-optimized C implementation and missed architecture-specific directories.

This was discussed in this thread: http://news.ycombinator.com/item?id=510832

Edit: glibc also doesn't use the generic optimized version in C on some architectures, see for example: http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/i3...