There is no way around the conversion. One way or another, you're
going to have two copies, because V8 doesn't use UTF-8 internally. JS
strings are either one-byte or two-byte. V8 does the UTF-8 conversion
at the edges.
The way I solved it in Node.js is by storing the built-in scripts as a
ExternalOneByteStringResource when they're Latin-1, and
ExternalStringResource (two-byte) otherwise.
It's not great for big scripts because approximately half of that
two-byte memory is zero, but on the flip side, it's in read-only
memory and doesn't count towards the JS heap limit.
If you're bundling scripts into your executable and you're worried
about executable size, one approach is to store the sources compressed
and decompress-and-stream them using ScriptCompiler::StartStreaming().
The uncompressed script source stays around for the lifetime of the
script, however.