Re: [whatwg/encoding] TextEncoder#encode - write to existing Uint8Array (#69)

> I don't trust it. In particular, in Blink once you pass a string to an IDL method it turns into an embedder string, which doesn't support zero-copy substrings.

Do we need to care about the characteristics of the substring operation on the C++ side of WebIDL? It seems to me the side that matters here is the JS side.

Or do you mean that in Blink a JS string that points to the buffer of another JS string gets copied on the IDL layer but a JS string that is the exclusive owner of its buffer doesn't get copied?

> Even if the copy is free, it still creates more garbage that has to be collected at some point.

I defer to JS engine developers on whether this matters.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/encoding/issues/69#issuecomment-436170510

Received on Tuesday, 6 November 2018 08:31:16 UTC