Could String internalize an ArrayBuffer?

Coroutines coroutines at gmail.com
Sun Dec 6 11:33:58 UTC 2015


On Sat, Dec 5, 2015 at 9:19 PM, Boris Zbarsky <bzbarsky at mit.edu> wrote:

> For example, strings typically have a complicated representation that
> involves multiple fragments, ropes, etc, to make string concatenation fast.

Ahh, I'm not sure why I didn't think of that... I come from Lua and
they do something similar.  My favorite data structure has always
been:

https://en.wikipedia.org/wiki/Unrolled_linked_list

Anyway, now my question/proposal seems quite naive.

Conclusion: Just create a duplicate ArrayBuffer from a String and be done. :-)


More information about the es-discuss mailing list