[subset-cff] Micro-optimize copy_str more
This commit is contained in:
parent
d2f3cde7ef
commit
74acf52f33
|
@ -120,8 +120,11 @@ struct str_encoder_t
|
|||
|
||||
/* Faster than hb_memcpy for small strings. */
|
||||
auto arr = buff.arrayZ + offset;
|
||||
for (unsigned i = 0; i < length; i++)
|
||||
/* Length is at least one; and mostly just one. */
|
||||
arr[0] = str[0];
|
||||
for (unsigned i = 1; i < length; i++)
|
||||
arr[i] = str[i];
|
||||
|
||||
//hb_memcpy (buff.arrayZ + offset, str, length);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue