Re:Glibc's strlen implementation: Probably not what you'd guess
by tptacek on Tuesday March 10, 2009 @04:19PM
(#510562)
For short strings (the common case), scasb performs the same as a smarter C loop, reduces code size, and saves branches (which is good for caching), which is why most compilers compile strlen to it automatically. But this is kind of a silly point since performant code doesn't call stlen often.
[ Parent
| on HN ]
There are no comments on this comment yet.