[Webkit-unassigned] [Bug 43342] AtomicStringHash does not work with null atomic string

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 2 08:46:08 PDT 2010


Darin Adler <darin at apple.com> changed:

           What    |Removed                     |Added
  Attachment #63208|review?, commit-queue?      |review-, commit-queue-
               Flag|                            |

--- Comment #2 from Darin Adler <darin at apple.com>  2010-08-02 08:46:08 PST ---
(From update of attachment 63208)
Making the hash work will null isn’t sufficient. Hash tables still need both an empty value and a deleted value. A null pointer is the empty value and so won't work in a hash table even with this hash function.

We used to hash the pointers and switched to using the hash of the string instead as a measurable speedup. The hash of the string is higher quality than a hash of the pointer bits.

What you have here is not even a hash of pointer bits, but rather just taking the low bits. This will be a far-inferior hash function and will almost certainly result in a measurable slowdown.

The best approach here is to check explicitly for null and not use it with hash tables. Or to do a more-major redesign.

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list