This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
is_utf8_invariant_string(): small speed optimization
authorKarl Williamson <khw@cpan.org>
Fri, 8 Dec 2017 17:20:24 +0000 (10:20 -0700)
committerKarl Williamson <khw@cpan.org>
Sat, 9 Dec 2017 05:27:44 +0000 (22:27 -0700)
commitb40579ffada21adfc9e94a8d206592c7923a5bbe
tree6a5125649c3d2abcb5f8b51c69c6e8cf570250dc
parent111bb90039d365ca2fbdae1ed5c1b03c4c37637a
is_utf8_invariant_string(): small speed optimization

By pulling a test out of a while loop condition and doing it before the
while starts, we don't increase the number of conditionals; instead we
avoid doing the conditional each time through, and also skip
some conditionals for strings shorter than a word.
inline.h