Currently readUtf8 is both slow in terms of ops/s and retains excessive amounts of memory when reading long strings (long being experimentally found to be more than 12 bytes).
This PR adds a heuristic to use the built-in browser TextDecoder API in the case of these long strings, which improves ops/s and also memory retention (avoids the usage of sophisticated concatenated string data structures based on trees of pointers).
Currently
readUtf8
is both slow in terms of ops/s and retains excessive amounts of memory when reading long strings (long being experimentally found to be more than 12 bytes).This PR adds a heuristic to use the built-in browser TextDecoder API in the case of these long strings, which improves ops/s and also memory retention (avoids the usage of sophisticated concatenated string data structures based on trees of pointers).
Closes #106. cc @dcervelli