4 ms·
Yeah I got a surprise when I wanted to see how strlen was implemented: https://github.com/lattera/glibc/blob/master/string/strlen.c https://github.com/lattera/
by scandox 9y ago
Yeah I got a surprise when I wanted to see how strlen was implemented:
https://github.com/lattera/glibc/blob/master/string/strlen.c https://github.com/lattera/glibc/blob/master/string/strlen.c
- _wmd 9y agoIf you're on amd64 that's the wrong file: https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/x86_64/strlen.S;h=b5ab117c79e1e26c6d43535d74e63515c258deb0;hb=HEAD https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/x86... The pcmpeqb instruction is from SSE 4, it compares 16 bytes per op