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.