Permalink
Browse files

pp_multiconcat() Use faster UTF-8 variant counting

  • Loading branch information...
khwilliamson committed Nov 23, 2017
1 parent 7c096f3 commit 30b1ba44956228f29bf7068c4595480d2af6e10a
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 = variant_under_utf8_count((U8 *) svpv_p->pv, len);
if (UNLIKELY(extra)) {
grow += extra;
/* -ve len indicates special handling */

0 comments on commit 30b1ba4

Please sign in to comment.