Closed hthetiot closed 7 years ago
Via @jfallows
"the short-circuit to use TextDecoder
will cause the other codepath to be rarely tested http://caniuse.com/#feat=textencoder the microsoft browsers do not yet have direct support for TextDecoder
. also, the significantly re-written codepath for non-TextDecoder
on the face of it looks like it could be slower than the original, definitely worth measuring and perhaps worth isolating the bugfix for 4+ byte sequences independent of re-writing that codepath"
Implementation of Utf8ArrayToStr had an issue with 4 byte sequence. I also added usage of native TextDecoder when available.
See https://jsperf.com/utf8arraytostr for bench