Closed
Bug 928971
Opened 10 years ago
Closed 10 years ago
Run-once closure analysis bug can cause unnecessary script cloning
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla27
People
(Reporter: jandem, Assigned: bhackett1024)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
3.11 KB,
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
Noticed this on the "[coll (take 100000 (iterate inc 0))] (reduce + 0 coll)" Clojurescript test. We keep cloning some scripts (and hence never JIT them). See the function literals on line 2 and 10: var Fi = function Di(b, c) { return new kc(null, function () { if (0 < b) { var e = B(c); return e ? I(C(e), Di(b - 1, D(e))) : null } return null }, null, null) }(1E5, function Ei(b, c) { return I(c, new kc(null, function () { return Ei(b, b.a ? b.a(c) : b.call(null, c)) }, null, null)) }(function (a) { return a + 1 }, 0));
![]() |
||
Comment 1•10 years ago
|
||
Not fixed by bug 880085?
![]() |
||
Comment 2•10 years ago
|
||
Oops, n/m
Assignee | ||
Comment 3•10 years ago
|
||
We don't end up emitting a run once lambda here because of the outer name, but due to an inconsistency between how run once lambdas are detected the inner functions of the lambda are still given singleton type and end up being deep cloned each time the outer script runs.
Assignee: nobody → bhackett1024
Attachment #819767 -
Flags: review?(luke)
Reporter | ||
Comment 4•10 years ago
|
||
Excellent, on this subtest the patch improves our time from > 700 ms to 130-140 ms.
![]() |
||
Updated•10 years ago
|
Attachment #819767 -
Flags: review?(luke) → review+
Assignee | ||
Comment 5•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/d2b4e498b5aa
https://hg.mozilla.org/mozilla-central/rev/d2b4e498b5aa
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
You need to log in
before you can comment on or make changes to this bug.
Description
•