3 ms·
One difference is in compiler optimizations. For a given language, compilers can often make inferences based on the code and the semantics of the language, all
by pcarmichael 16y ago
One difference is in compiler optimizations. For a given language, compilers can often make inferences based on the code and the semantics of the language, allowing for very targeted optimizations. If you go from LanguageFoo -> Javascript -> bytecode, then you may be limiting the range of optimizations possible (because Javascript may not be able to infer the same things about the code, be it because of program structure, language semantics, etc.)
- m0th87 16y agoThe same holds true with bytecodes. e.g. TCO on the JVM: http://stackoverflow.com/questions/105834/does-the-jvm-prevent-tail-call-optimizations http://stackoverflow.com/questions/105834/does-the-jvm-preve...
- robhu 16y agoWhy not make the 'byte code' the LLVM IF ? That way you leverage all the stuff from the LLVM project for making it go fast. The main thing to do then is just to have a front end for your favourite language the outputs LLVM IF.
- wmf 16y agoGoogle's working on that: http://nativeclient.googlecode.com/svn/data/site/pnacl.pdf http://nativeclient.googlecode.com/svn/data/site/pnacl.pdf (Edit: I see that several other people already mentioned PNaCl further down in the thread. A hazard of HN's sorting, I guess.)
- dkersten 16y agoLLVM bitcode is processor specific. Not sure where, but I saw that mentioned in the LLVM docs.