Closed
Bug 775896
Opened 13 years ago
Closed 13 years ago
OrderedHashTable should have a hashShift field like HashTable
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla17
People
(Reporter: jorendorff, Assigned: jorendorff)
References
Details
(Whiteboard: [js:t])
Attachments
(1 file)
12.41 KB,
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
The hashing scheme of js::HashTable uses the most significant bits of a prepared hash code to select a hash bucket. js::OrderedHashTable uses the least significant bits, which is very bad.
Updated•13 years ago
|
Whiteboard: [js:t]
Assignee | ||
Comment 1•13 years ago
|
||
Assignee: general → jorendorff
Attachment #645687 -
Flags: review?(luke)
Assignee | ||
Comment 2•13 years ago
|
||
A quick note on this patch:
>- if (hashTableMask > initialBuckets() && liveCount < dataLength * minDataFill()) {
>+ if (hashBuckets() > initialBuckets() && liveCount < dataLength * minDataFill()) {
This changes the behavior, because hashTableMask is the number of buckets minus one.
The old behavior was accidental--a bug, but harmless as long as initialBuckets() was more than 1.
![]() |
||
Updated•13 years ago
|
Attachment #645687 -
Flags: review?(luke) → review+
Assignee | ||
Comment 3•13 years ago
|
||
Comment 4•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
You need to log in
before you can comment on or make changes to this bug.
Description
•