3 ms·
Well. This made me install Firefox 23, to get asm.js. I got a speed-up of x5 on his Mandelbrot code. Wow. (I had Firefox 20 before. I checked a few websites a
by 6ren 13y ago
Well. This made me install Firefox 23, to get asm.js. I got a speed-up of x5 on his Mandelbrot code. Wow.
(I had Firefox 20 before. I checked a few websites and didn't notice any speed-up in general.)
PS: of course you can write modular code in JS too, with a complex lib etc (maybe not quite as nice as scheme). Would it be compiled to be as efficient?
- yoklov 13y agoNot unless the compiler did some magic to remove the heap allocations, which iirc none of the JS engines do yet LuaJIT, however, will. see http://wiki.luajit.org/Allocation-Sinking-Optimization http://wiki.luajit.org/Allocation-Sinking-Optimization . I believe the Dart VM does this too, so it might not be far off for JS engines. Still, other semantics might slow the code down compared to ASM.js, but the heap allocations will be the biggest.