Closed
Bug 1124002
Opened 9 years ago
Closed 9 years ago
Javascript performance 30x lower than in other browsers
Categories
(Core :: JavaScript Engine: JIT, defect)
Tracking
()
RESOLVED
FIXED
mozilla38
People
(Reporter: ivan.kuckir, Assigned: jandem)
References
Details
(Keywords: perf, reproducible, testcase)
Attachments
(3 files)
2.57 KB,
text/plain
|
Details | |
90.59 KB,
application/x-javascript
|
Details | |
1.27 KB,
patch
|
h4writer
:
review+
Sylvestre
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.99 Safari/537.36 Steps to reproduce: I am creating a webapp for editing images. I "compile" my JS code before publishing with Closure Compiler (http://closure-compiler.appspot.com/home). "Compiled" code works as fast as original code in Chrome and IE 11, but it runs 30x slower in FF. Here is a demo http://jsperf.com/pp-blending . Why is "f.blend.mainCnC" so slow in FF? Do you think you can make FF as fast as IE, or do you expect programmers to write special versions of code just for FF?
Comment 1•9 years ago
|
||
Updated•9 years ago
|
Component: Untriaged → JavaScript Engine
OS: Windows 7 → All
Product: Firefox → Core
Hardware: x86_64 → All
Assignee | ||
Comment 2•9 years ago
|
||
Thanks for the report! I can reproduce this in the shell with the attached testcase: Original 326 Compiled: 8574 d8: Original 243 Compiled: 256 I'll look into it.
Assignee | ||
Updated•9 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee | ||
Comment 3•9 years ago
|
||
The problem is that we have bad type information and think one of the operands of a MMul could be an object and we deoptimize. This in turns leads to bad type information for other Add/Mul/Sub/Div operations (their slow paths all show up in the profile). This patch removes the unnecessary might-be-object and might-be-symbol checks, so that we will fall back to information from Baseline caches. This is fine because MToInt32 and MToDouble now properly set the Guard flag if the input could be a symbol or object. With that I get: Original: 332 Compiled: 210 So this fixes the problem and Compiled is now faster than Original even (and faster than d8). Still have to find out why Original is slower now.
Assignee | ||
Comment 4•9 years ago
|
||
(In reply to Jan de Mooij [:jandem] from comment #3) > Original: 332 > Compiled: 210 > > So this fixes the problem and Compiled is now faster than Original even (and > faster than d8). Still have to find out why Original is slower now. It seems to be a regalloc issue. With LSRA we have some really big move groups. If I use Backtracking I get: Original: 221 Compiled: 218 So with BT, Compiled becomes a little slower but Original is way faster and both are faster than d8/Chrome. Hopefully BT will be enabled for all JIT code soon.
Depends on: 826741
Updated•9 years ago
|
Attachment #8552496 -
Flags: review?(hv1989) → review+
Assignee | ||
Updated•9 years ago
|
Component: JavaScript Engine → JavaScript Engine: JIT
Assignee | ||
Comment 5•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/65aea1c559fd
Comment 6•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/65aea1c559fd
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
Assignee | ||
Comment 7•9 years ago
|
||
Comment on attachment 8552496 [details] [diff] [review] Patch As we're still pretty early in the cycle, we should probably uplift this to 37 as the patch is just removing code and can make some operations a lot faster. Approval Request Comment [Feature/regressing bug #]: Older Ion issue. [User impact if declined]: Websites/games a lot slower in some cases. [Describe test coverage new/current, TreeHerder]: Tested on treeherder. [Risks and why]: Low risk, the patch just removes some now-unnecessary checks. [String/UUID change made/needed]: None.
Attachment #8552496 -
Flags: approval-mozilla-aurora?
Updated•9 years ago
|
status-firefox37:
--- → affected
status-firefox38:
--- → fixed
Updated•9 years ago
|
Attachment #8552496 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in
before you can comment on or make changes to this bug.
Description
•