Closed
Bug 1437471
Opened 7 years ago
Closed 7 years ago
Use singleton type only for big typed arrays created with an existing buffer
Categories
(Core :: JavaScript Engine, enhancement)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla60
Tracking | Status | |
---|---|---|
firefox60 | --- | fixed |
People
(Reporter: jandem, Assigned: jandem)
Details
Attachments
(1 file, 1 obsolete file)
10.89 KB,
patch
|
bhackett1024
:
review+
|
Details | Diff | Splinter Review |
We have an optimization to give singleton type to TypedArrays with byteLength >= 10 MB. This was added to optimize asm.js/Mandreel type code better in Ion, but in practice this optimization can easily backfire because we quickly reach TypeSet limits when allocating many singleton arrays. mraleph ran into a SpiderMonkey perf cliff caused by this and I've seen it regress perf before.
One easy short-term fix is to only use this optimization for typed arrays created with an existing buffer, as that's the pattern used by Mandreel/asm.js code. That also makes it easier for people to opt-out of this optimization.
Longer term I think we should consider removing this optimization (because wasm) but as a first step restricting it seems reasonable.
Attachment #8950157 -
Flags: review?(bhackett1024)
Assignee | ||
Comment 1•7 years ago
|
||
Attachment #8950157 -
Attachment is obsolete: true
Attachment #8950157 -
Flags: review?(bhackett1024)
Attachment #8950172 -
Flags: review?(bhackett1024)
Comment 2•7 years ago
|
||
Comment on attachment 8950172 [details] [diff] [review]
Patch
Review of attachment 8950172 [details] [diff] [review]:
-----------------------------------------------------------------
It would be fine to remove this optimization entirely I think.
Attachment #8950172 -
Flags: review?(bhackett1024) → review+
Assignee | ||
Comment 3•7 years ago
|
||
(In reply to Brian Hackett (:bhackett) from comment #2)
> It would be fine to remove this optimization entirely I think.
This will regress Octane-mandreel a bit (~4000 points IIRC). Maybe we should take the hit and investigate but for now I'll just land this patch.
Pushed by jandemooij@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/e7519d21db96
Use singleton type only for big typed arrays created with an existing buffer. r=bhackett
Comment 5•7 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox60:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
You need to log in
before you can comment on or make changes to this bug.
Description
•