Closed
Bug 1065040
Opened 11 years ago
Closed 6 months ago
Investigate using OrderedHashMap instead of HashMap for some tables
Categories
(Core :: JavaScript: GC, defect)
Core
JavaScript: GC
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: terrence, Unassigned)
References
(Blocks 1 open bug)
Details
HashMap iteration is incredibly slow. During sweeping, the GC iterates all hash tables. It may make sense to make some of our global cache tables into OHM, since OHM iteration is about 3x faster than HM iteration, if the other properties are not too much worse.
| Reporter | ||
Comment 1•11 years ago
|
||
A better idea, which Luke just suggested in IRC, is to use a cmov instead of a branch and visit the dummy elements as well, but with a safe value. While there is still a data dependency for the CPU to deal with, having a uniform structure might allow for better pipelining.
The interface would look something like:
template <class Op, class T, T DeadElement> forAllElements(Op op);
Where the underlying iterator would |return isLive() ? entry() : DeadElement;|.
Updated•3 years ago
|
Severity: normal → S3
Comment 2•6 months ago
|
||
Still relevant?
Comment 3•6 months ago
|
||
We're not planning on doing this any more.
Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•