5 ms·
Yup, when you consider that WASM can be polyfilled with Asm.js it's pretty obvious where things were headed.
by vvanders 9y ago
Yup, when you consider that WASM can be polyfilled with Asm.js it's pretty obvious where things were headed.
- jfbastien 9y agoExcept with all browser vendors being involved with WebAssembly, efficient polyfill-ability hasn't been a goal for a while.
- cromwellian 9y agoWASM has 64-bit ints, did asm.js support those? How can you polyfill that without a real slowdown.
- recursive 9y agoA property with getter and setter backed by singleton typed array instance?
- cromwellian 9y ago"without a real slowdown" Any operation, like 64-bit adds/muls/divs/etc would have to call emulation functions. It'll be orders of magnitude slower.
- wyldfire 9y agoWhat does that mean: "polyfilled with asm.js"?
- bitmapbrother 9y agoThat you can run asm.js code on wasm.
- wyldfire 9y agoI suppose I should have asked "what does polyfill mean in this context?" Does that term really alias "run [it] on" or is there something more subtle about this term's meaning?
- __s 9y agoThere's a high performance asm.js implementation of WASM (converting WASM to asm.js at runtime). ie if a browser didn't implement WASM, but had a JIT which executed asm.js at high speed, it could execute WASM at high speed
- azakai 9y agoThere isn't such a polyfill. There is currently no good tool to translate wasm into asm.js (or general JS) on the client. The best that exists is to run the wasm in a wasm interpreter, very slowly. In theory a translator could be written into asm.js, but there would still be wasm code that won't run fast, such as 64-bit ints, unaligned loads and stores, bitcasts, and other operations.
- johncolanduoni 9y agoYes, but emscripten can compile to both (with or without using the new native LLVM WebAssembly backend). It's stretching the word polyfill, but emscripten users have pretty close to a turnkey solution for producing code that detects WebAssembly support and falls back to asm.js.
- jholman 9y agoWeb developers, bless their hearts, feel uncomfortable with the word "emulate", so they use "polyfill", or sometimes the more general "shim". To some degree, "polyfill" implies that the functionality being emulated/shimmed is functionality that is under some other circumstances is expected to be provided by the browser itself.