3 ms·
Why is there no script bytecode?
asm.js is the nearest thing to it, but V8 has a internal bytecode and it's a shame it cannot be precompiled and included as a script type.
- Piskvorrr 13y agoPrecompiled for what platform? We're kind of past the stage "everything is Wintel x86" nowadays: a lot of JIT compilation derives its power from platform-specific optimizations.
- jlebrech 13y agoI mean an intermediary like java. another option would be to have a <script arch='arm' src='compile.arm.bytecode' /> and compile for various architectures before hand.
- Piskvorrr 13y ago...times various JS interpreters, times various browsers, and keeping all those in sync? Sounds like a support nightmare combined with several attack vectors ("sure, the precompiled version is the same as the original, and doesn't try any funny stuff with pointers, either").
- zamalek 13y agoThere is, somewhat, support for this: v8 snapshot. It's very poorly documented (VERY), but I did come across this which might be a good place to start clicking links: http://stackoverflow.com/questions/11109538/node-js-v8-how-to-make-my-own-snapshot-to-accelerate-startup http://stackoverflow.com/questions/11109538/node-js-v8-how-t...
- mraleph 13y agoV8 has no internal bytecode.