Demo (https://www.fxhash.xyz/generative/21866 ) loads slower in Nightly compared to Chrome
Categories
(Core :: JavaScript: WebAssembly, enhancement, P3)
Tracking
()
People
(Reporter: mayankleoboy1, Assigned: jpages)
References
()
Details
Attachments
(4 files)
Go to https://www.fxhash.xyz/generative/21866 (Exact hash is used was https://gateway.fxhash2.xyz/ipfs/QmPQKuoX1idieCm2jQpCE9XBinZafYFJpj46dBJqSGL113/?fxhash=ooXr5suon2ty4W8m7QUjoTDPvUQRqndxbiu5eTUqiYpCRRfwgjE)
Nightly: https://share.firefox.dev/3Huw1uL (4.8 econds)
Chrome: https://share.firefox.dev/40kYDzv (~3 seconds)
| Reporter | ||
Comment 1•3 years ago
|
||
Updated•3 years ago
|
| Assignee | ||
Comment 2•3 years ago
|
||
I finally looked at these profiles.
The main function doing the rendering is $func193, this one is calling two other very important functions: $func20 and $func384.
Most of the difference is coming from these two functions. $func20 is calling the second one $func384.
FF is slower than Chrome by 1 sec in these functions.
It's interesting because $func384 is a leaf function and it's much slower in FF than Chrome: time is 1849 ms vs 741 ms.
$func384 is not doing anything fancy: it's quite short and mostly loops and variable accesses.
It's worth noting that there is a promise callback handling all of that, which might explain the difference as well.
I have attached the .wat file.
| Assignee | ||
Comment 3•3 years ago
|
||
| Assignee | ||
Updated•3 years ago
|
| Assignee | ||
Comment 4•3 years ago
|
||
| Assignee | ||
Comment 5•3 years ago
|
||
| Assignee | ||
Comment 6•3 years ago
|
||
Forcing the optimizing compiler (ion) for this benchmark gives much better results, very close to Chrome (about 3 seconds in total).
Looking at the generated code with both compiler, I think the issue might be around the poor register allocation with baseline.
In the top function, everything ends up on the stack with baseline, with ion, the register allocation is better. The main big difference between baseline and ion is removing all those stack accesses. It also simplifies and shortens the code by not accessing the stack.
This looks like a tiering issue which we can't really fix at the moment... Once the optimizing compiler has done its magic, the results are actually very close to Chrome.
| Assignee | ||
Updated•2 years ago
|
Description
•