4 ms·
People build latest-ECMAScript polyfills today. Future such implementations will likely use WebAssembly. And anything caring about performance can start targe
by JoshTriplett 11y ago
People build latest-ECMAScript polyfills today. Future such implementations will likely use WebAssembly.
And anything caring about performance can start targeting WebAssembly directly rather than JavaScript. CPU-bound JavaScript performance will start mattering a lot less. (DOM-access performance will still be critical, but it will be for WebAssembly too.)
- BrendanEich 11y agoYou moved the goal post from dropping JS (again, dream on) to (in the future) using wasm as compiler and polyfill target. S'ok, I'm obv. a supporter of the latter, although it'll take some time to make win for smaller programs.
- JoshTriplett 11y ago> You moved the goal post from dropping JS (again, dream on) to (in the future) using wasm as compiler and polyfill target. I'm not suggesting dropping JS; that's too much to hope for. If nothing else, backward compatibility with existing sites will require supporting it approximately forever. I never intended to imply dropping it, just that WebAssembly becomes the interoperable baseline, with JavaScript and other languages being peers on that common baseline. I disagreed with the statement that "JS isn't going anywhere"; I don't think it's going away, but it's clearly going to evolve and go new places.
- megaman821 11y agoThis assumes WebAssembly will have virtually no performance overhead when compared to C/C++, and still doesn't address the fact that JavaScript "binaries" will be much larger than today's scripts that rely on a JavaScript interpreter being present inside the browser.
- JoshTriplett 11y ago> This assumes WebAssembly will have virtually no performance overhead when compared to C/C++, It won't have zero performance overhead, since unfortunately it will still require translation to native code. But it'll be far higher-performance than asm.js, and precompiling JavaScript to WebAssembly could produce higher performance than a JavaScript JIT. > and still doesn't address the fact that JavaScript "binaries" will be much larger than today's scripts that rely on a JavaScript interpreter being present inside the browser. You don't need to do the compilation in the browser; do the compilation ahead of time and ship wasm bytecode. The DOM and all other web APIs will still be provided by the browser, so I don't see any obvious reason why wasm needs to have substantial size overhead compared to JavaScript.
- leoc 11y agoThe Web has enough commercial heft that maybe we could see things like ARM's Jazelle https://en.wikipedia.org/wiki/Jazelle https://en.wikipedia.org/wiki/Jazelle DBX Java support.
- pcwalton 11y agoJazelle died for good reason. More interesting would be something like Transmeta/Project Denver, where the JIT is deeply integrated with the CPU.
- pcwalton 11y agoI predict that, five years from now, people will still be caring a great deal about JavaScript's CPU-bound performance. Even if all new code switched en masse to Web Assembly tomorrow (which won't happen) people would still want existing content to run as fast as possible.