We currently do the obvious and slow thing: deserializing utf8arrays as native strings, which means a lot of copies, utf8 checks, etc.
We should instead keep raw Buffer<u8>s around and provide helpers to turn them into Cow<str> just in time, or something along these lines.
This of course extends to other types beyond strings; in fact it applies to any component with an inner type that is in and of itself plural: Binary, List<NativeT>, ...
We currently do the obvious and slow thing: deserializing
utf8arrays as native strings, which means a lot of copies, utf8 checks, etc.We should instead keep raw
Buffer<u8>s around and provide helpers to turn them intoCow<str>just in time, or something along these lines.This of course extends to other types beyond strings; in fact it applies to any component with an inner type that is in and of itself plural:
Binary,List<NativeT>, ...