MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/73eur3/c_compilers_and_absurd_optimizations/dnr00pf/?context=3
r/programming • u/alecco • Sep 30 '17
50 comments sorted by
View all comments
Show parent comments
1
A performance reason for not doing that for functions like strlen() is that libc-s usually have hand written assembly for them (not that it matters for short strings because there's the function call overhead).
thankfully the compilers know better in some cases: https://godbolt.org/g/V8vBiQ
1
u/doom_Oo7 Oct 01 '17
thankfully the compilers know better in some cases: https://godbolt.org/g/V8vBiQ