3 ms·
You can polyfill SIMD, but you can't polyfill threads. Once you add shared memory between workers, you've effectively violated the premise that asm.js will run
by cromwellian 14y ago
You can polyfill SIMD, but you can't polyfill threads. Once you add shared memory between workers, you've effectively violated the premise that asm.js will run everywhere, even places that don't understand it.
In that case, you've got a portable intermediate representation of opcodes in a bloated legacy format, that is now incompatible with legacy runtimes. Why use JS format then?
- pcwalton 14y agoApps could feature detect threading and fall back to single-threaded mode for compatibility with non-asm browsers if it's not supported. Regarding the claim that asm.js is "bloated": http://mozakai.blogspot.com/2011/11/code-size-when-compiling-to-javascript.html http://mozakai.blogspot.com/2011/11/code-size-when-compiling...
- BrendanEich 14y agoSIMD is coming to JS, it's as short a path as adding to Dart (and Dart is not going cross-browser, so...). Why JS format? Because another syntax that's both fast to lex+parse and not future-hostile (as JVML was) is a tall order and we'll get to it only when we really need it. Adding SIMD to JS does not require adding a whole new syntax! /be