4 ms·
together with all the other work on optimizing asm.js, allows it to run at around 1.5x slower than the speed of the same C/C++ when compiled natively Run
by jffry 12y ago
together with all the other work on optimizing
asm.js, allows it to run at around 1.5x slower
than the speed of the same C/C++ when compiled
natively
Running at 67% of native speed, and backwards compatible with all non ASM.js browsers? That's pretty great!
- hippich 12y agoI am working on a project based on asm.js technology. From my experience very limited and simple asm.js code might be compatible with "all non asm.js browsers". In particular I found IE9 wouldn't work with some compiled code. IE10 so far so good (but slow of course.)
- nnethercote 12y agoasm.js relies on typed arrays, and IE9 doesn't support them. So I'd be surprised if IE9 was able to handle any asm.js code.
- azakai 12y agoEmscripten can emit code without typed arrays. It's fairly slow but does work in IE9.
- nnethercote 12y agoOh, cool. I didn't know that.
- hippich 12y agoYes, you are right, but I found back then that not all code can be compiled without these arrays. Can't remember why right now tho. So there are certainly issues with browsers not supporting typed arrays.
- azakai 12y agoYes, it is tricky to compile without typed arrays. It means we need to disable LLVM optimizations, and also a lot more undefined behavior in C will fail (anything that assumes memory aliasing). With a little effort stuff can be ported, I ported CPython that way. But typed arrays is far better.