This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Rewrite and inline my_strnlen()
authorKarl Williamson <khw@cpan.org>
Sun, 12 Jan 2020 17:11:54 +0000 (10:11 -0700)
committerKarl Williamson <khw@cpan.org>
Tue, 14 Jan 2020 03:54:05 +0000 (20:54 -0700)
This commit changes this function to use memchr() instead of looping
byte-by-byte through the string.  And it inlines it into 3 lines of
code.  This should give comparable performance to a native libc
strnlen().


No differences found