This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Perl_sv_len_utf8 can use the UTF-8 offset cache to reduce its linear scan.
authorNicholas Clark <nick@ccl4.org>
Mon, 12 Jul 2010 12:09:28 +0000 (13:09 +0100)
committerNicholas Clark <nick@ccl4.org>
Mon, 12 Jul 2010 12:43:19 +0000 (13:43 +0100)
commit6ef2ab89d2567e144b289574a2e087dd7eec7894
tree9707a41660cfeafb4945777c9b61bab320d0e92d
parent0d7caf4cc74eb29a95f71af5a91fef30ca848e41
Perl_sv_len_utf8 can use the UTF-8 offset cache to reduce its linear scan.

Previously, if the scalar's character length wasn't yet known, but an offset
midway was, the offset would be ignored, and the linear scan of UTF-8 was for
the entire length of the scalar.
sv.c
t/op/length.t