Skip to content

Commit

Permalink
S_multiconcat() Use faster variant counting
Browse files Browse the repository at this point in the history
  • Loading branch information
khwilliamson committed Jan 12, 2018
1 parent 89728e7 commit 255454a
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions op.c
Expand Up @@ -3067,13 +3067,8 @@ S_maybe_multiconcat(pTHX_ OP *o)


/* see if any strings would grow if converted to utf8 */ /* see if any strings would grow if converted to utf8 */
if (!utf8) { if (!utf8) {
char *p = (char*)argp->p; variant += variant_under_utf8_count((U8 *) argp->p,
STRLEN len = argp->len; (U8 *) argp->p + argp->len);
while (len--) {
U8 c = *p++;
if (!UTF8_IS_INVARIANT(c))
variant++;
}
} }
} }


Expand Down

0 comments on commit 255454a

Please sign in to comment.