| JS VMs make tradeoffs, yes. Regarding your specific examples: 1. Shared-state multithreading. This has been proposed by various people in the past, and is still being debated. There are people for it and against it in various places. It might happen, if there is consensus to standardize it. 2. SIMD: PNaCl (which I mention since you mention NaCl in that context) does not have SIMD. But of course it can add SIMD, just like Mono and Dart have, and there is a proposal for JS as well, hopefully that will get standardized. So even those limitations are in principle resolvable. They do depend on standardization, of course, but so would any VM you want to run on the web. > Let language authors target the low-level machine, and target your high-level general purpose bytecode. asm.js is meant to get performance similar to a low-level machine. It's already very close to native on many benchmarks. > Once you've built a runtime in which I could implement a JS runtime that's as performant as yours I don't follow that. You can't make a fast JS runtime in your previous examples (the JVM, PNaCl, .NET, etc.). |
I included ones you could, such a NaCL. And I should probably have also included the native platforms (Apple, MS, Google), because they're the competition, even if their sandboxing or runtime environment isn't what one might call 'state of the art'.
At the end of the day, it's the two-tier universe that bothers me the most. You're content to foist the JS runtime on everyone but yourselves. Once you implement Firefox entirely as an application running in a JS VM, the argument that JS is good enough might carry some weight.