Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
ape4
2 days ago
|
parent
|
context
|
favorite
| on:
Comparison of C/POSIX standard library implementat...
Yeah look at even strlen()
https://github.com/lattera/glibc/blob/master/string/strlen.c
GabrielTFS
6 hours ago
[–]
That's the generic implementation - it's not used on most popular architectures (I think the most popular architecture it's used on would be RISC-V or MIPS) because they all have architecture-specific implementations. The implementation running on the average (x86) computer is likely to be
https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/x86...
(if you have AVX512),
https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/x86...
(if you have AVX2 and not AVX512) or
https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/x86...
(if you have neither AVX2 nor AVX512 - rather rare these days)
reply
Consider applying for YC's Summer 2025 batch! Applications are open till May 13
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
https://github.com/lattera/glibc/blob/master/string/strlen.c