Closed
Bug 699724
Opened 9 years ago
Closed 9 years ago
Shrink js::HashTable
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla11
People
(Reporter: njn, Assigned: njn)
Details
(Whiteboard: [MemShrink:P3])
Attachments
(1 file)
|
5.69 KB,
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
HashTable::tableCapacity is redundant with respect to HashTable::hashShift. The attached patch removes it and replaces occurrences of it with calls to HashTable::capacity(), which computes the capacity from HashTable::hashShift. This reduces the minimum size of a HashTable object from 24 to 20 bytes on 32-bit platforms, and from 32 to 24 bytes on 64-bit platforms. Loading Gmail and TechCrunch I see up to 5000 HashTables live at any one time, so it can save up to ~40KB on 64-bit platforms for that workload. Pretty small, but pretty easy too. I run Sunspider to check there was no adverse performance effects, changes were neglible.
Attachment #571890 -
Flags: review?(luke)
| Assignee | ||
Updated•9 years ago
|
Summary: Shrink HashTable → Shrink js::HashTable
Comment 1•9 years ago
|
||
Could you also test Kraken and V8?
| Assignee | ||
Comment 2•9 years ago
|
||
Kraken and V8 both also have negligible changes.
Comment 3•9 years ago
|
||
Comment on attachment 571890 [details] [diff] [review] patch Great!
Attachment #571890 -
Flags: review?(luke) → review+
| Assignee | ||
Comment 4•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/c279d3c09e45
Comment 5•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/c279d3c09e45
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
You need to log in
before you can comment on or make changes to this bug.
Description
•