If it's not that, run the code in the firefox profiler, perhaps something
obviously wrong will show up. If you can share a screenshot of the profiler
output that would be interesting (it shouldn't contain any sensitive info,
I think).

- Alon



On Tue, Apr 15, 2014 at 2:29 PM, Mark Hahn <[email protected]> wrote:

> Thanks.  I understand now.
>
> If asm.js in FF is supposed to be 2X slower than native and I'm seeing 5X
> slower, then I'm still seeing odd behavior and I'll keep looking at it.
>  Chrome is 2X faster than native so if things are fixed to work as normal I
> should see 2X in both.
>
> I'm not supposed to be making a lot of calls into asm.js.  I'll check to
> make sure.
>
>
>
> On Tue, Apr 15, 2014 at 1:03 PM, Ryan Kelly <[email protected]> wrote:
>
>> 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.
>

-- 
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.

Reply via email to