On 16/04/2014 3:03 AM, Mark Hahn wrote:
>> 2x is the expected amount.
>
> Weird, I thought asm.js was optimized in firefox and it was faster.
To be clear, I believe Alon means "2x slower than native" and not "2x
slower than chrome".
> I'm not saying firefox is too slow to use. I can optimize things in the
> C code and calling JS.
Have you checked that the asmjs is correctly validating under firefox?
In the web console you should see warnings messages about "Successfully
compiled asm.js code".
One thing can cause this "chrome is faster than firefox at running
asmjs" behavior is frequent calls from normal javascript into the asmjs
module. For example, this kind of loop might well run faster under
chrome, depending on how much work each function call does:
mod = MyASMJSModule()
for (var i = 0; i < 10000; i++) {
mod.somefunc();
}
This would do 10000 independent calls into asmjs mode, which is
currently not very well optimized in Firefox. IIUC there are some bugs
in the works to improve this, but for now it's best to try to minimize
the number of times you cross the normal-js -> asm.js boundary.
Cheers,
Ryan
--
You received this message because you are subscribed to the Google Groups
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.