It's always tradeoffs.
If by "arrays of codepoints" you mean "each element of the array is a single codepoint", then you get O(1) indexing regarding codepoints, but may use up to 4x the memory as the variable-length encoding.
If by "arrays of codepoints" you mean "each element of the array is a single codepoint", then you get O(1) indexing regarding codepoints, but may use up to 4x the memory as the variable-length encoding.
Seriously, how many strings have you ever ran across that are more than 1kb?
how many strings have you ran across that are more than 256 codepoints?
I see strings larger than that all the time, and care about using low RSS. YMMV.
the packet's themselves are only 1.5kb.