DescriptionVM: Speed up output of UTF8 for 1-byte strings.
For 1-byte strings we don't need the full power of UTF-8 conversion with
support for 3 and 4-byte sequences and reassembly of UTF-16 surrogate pairs.
This optimization was originally intended to improve the reverse-complement
benchmark. It also seems to have a positive effect (ca. 1% on average) on
dart2js.
After implementing this it doesn't seem worth having a special case in
ToCString for ASCII strings. That special case would allocate the string twice
for all Latin1 strings, which feels unfortunate.
R=vegorov@google.com
BUG=
Patch Set 1 #Patch Set 2 : Clean up a little #Patch Set 3 : Add NoSafePointScope #Patch Set 4 : Fix asserts #
Total comments: 22
Patch Set 5 : Slava feedback #Patch Set 6 : Add test that would have caught bug pointed out by Slava #
Messages
Total messages: 9 (0 generated)
|