Closed
Bug 989013
Opened 11 years ago
Closed 9 years ago
Provide a specialized hashtable that works with GC thing keys/values
Categories
(Core :: JavaScript: GC, defect)
Core
JavaScript: GC
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: jonco, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
patch
|
Details | Diff | Splinter Review |
Currently using hashtables is hard because you need to:
1) Wrap GC thing keys in EncapsulatedPtr
2) Wrap GC thing values in RelocatablePtr
3) Add the correct write barriering to ensure the keys get moved
(and this is the simple case when they keys/values are not compound structures)
Needless to say, this is not trivial and it's easy to get wrong.
Instead we should provide a specialized hashtable class that does as much as possible of this for you.
Updated•11 years ago
|
Comment 2•9 years ago
|
||
Another usability option would be to make object hashes independent of the address so that users can avoid the rekeying barrier and just use RelocatablePtr everywhere. The attached POC does this and manages to pass 95% of jit-tests, although is obviously flawed in a number of respects.
Comment 3•9 years ago
|
||
On my machine we hit the object hasher 12,000 to 13,000 times, the vast majority for existing hashes. That's lots, but maybe not so many that performance will be a serious issue.
Comment 4•9 years ago
|
||
This was actually missing overloads for JSObject subclasses, so we were missing a ton of GlobalObject and SavedFrame hashes. Need to re-measure.
Reporter | ||
Comment 5•9 years ago
|
||
We're going with the stable hash code for object approach instead.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•