Closed
Bug 699724
Opened 13 years ago
Closed 13 years ago
Shrink js::HashTable
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla11
People
(Reporter: n.nethercote, Assigned: n.nethercote)
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•13 years ago
|
Summary: Shrink HashTable → Shrink js::HashTable
Comment 1•13 years ago
|
||
Could you also test Kraken and V8?
Assignee | ||
Comment 2•13 years ago
|
||
Kraken and V8 both also have negligible changes.
Comment 3•13 years ago
|
||
Comment on attachment 571890 [details] [diff] [review]
patch
Great!
Attachment #571890 -
Flags: review?(luke) → review+
Assignee | ||
Comment 4•13 years ago
|
||
Comment 5•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
You need to log in
before you can comment on or make changes to this bug.
Description
•