Permalink
Browse files

pp_multiconcat() Use faster UTF-8 variant counting

  • Loading branch information...
khwilliamson committed Nov 23, 2017
1 parent 782478c commit 6c7830a04d0016ff641aaa4b8a0d1dbf87366478
Showing with 2 additions and 7 deletions.
  1. +2 −7 pp_hot.c
View
@@ -801,20 +801,15 @@ PP(pp_multiconcat)
* length on utf8 args (which was only needed to flag non-utf8
* args in this loop */
for (svpv_p = svpv_buf; svpv_p < svpv_end; svpv_p++) {
char *p;
SSize_t len, l, extra;
SSize_t len, extra;
len = svpv_p->len;
if (len <= 0) {
svpv_p->len = -len;
continue;
}
p = svpv_p->pv;
extra = 0;
l = len;
while (l--)
extra += !UTF8_IS_INVARIANT(*p++);
extra = utf8_variant_count((U8 *) svpv_p->pv, len);
if (UNLIKELY(extra)) {
grow += extra;
/* -ve len indicates special handling */

0 comments on commit 6c7830a

Please sign in to comment.