Closed
Bug 834108
Opened 11 years ago
Closed 11 years ago
avoid O(n^2) chunk-searching in LifoAlloc::ensureUnusedApproximate
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla21
People
(Reporter: luke, Assigned: luke)
Details
Attachments
(1 file)
2.03 KB,
patch
|
dvander
:
review+
|
Details | Diff | Splinter Review |
IM calls ensureUnusedApproximate after all dynamic allocations (and lots of other places) to ensure there is still 16KB free in the LifoAlloc. The problem is that, when a new chunk needs to be allocated, ensureUnusedApproximateSlow (true to its name) uses LifoAllocScope which does a LifoAlloc::release which does an O(n) search to find the chunk containing the given mark. Thus, for n bytes of allocation, there is O(n^2) chunk-searching. Really, all the code wants to do is keep 'latest' unchanged, so this patch does that. This change cuts the compilation time of sqlite.js in OdinMonkey almost in half. There seems to be a slight speedup in --v8-suite run from the SS harness.
Attachment #705693 -
Flags: review?(dvander)
Updated•11 years ago
|
Attachment #705693 -
Flags: review?(dvander) → review+
Assignee | ||
Comment 1•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/cf6169428098
Comment 2•11 years ago
|
||
Looks like this bug *might* have blown up PdfJS and, to a lesser degree, Splay on 32-bit AWFY.
Comment 3•11 years ago
|
||
Don't know about 64-bit on AWFY, since it has been down for quite some time.
Comment 4•11 years ago
|
||
(In reply to Paul Wright from comment #2) > Looks like this bug *might* have blown up PdfJS and, to a lesser degree, > Splay on 32-bit AWFY. It appears to have been a temporary fluke.
Comment 5•11 years ago
|
||
(In reply to Sean Stangl from comment #4) > (In reply to Paul Wright from comment #2) > > Looks like this bug *might* have blown up PdfJS and, to a lesser degree, > > Splay on 32-bit AWFY. > > It appears to have been a temporary fluke. Yep, false alarm... My bad. The 64-bit issue is real, though.
Comment 6•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/cf6169428098
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in
before you can comment on or make changes to this bug.
Description
•