<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - IdentifierRepHash has a mismatch between hash() and equal()"
   href="https://bugs.webkit.org/show_bug.cgi?id=150137#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - IdentifierRepHash has a mismatch between hash() and equal()"
   href="https://bugs.webkit.org/show_bug.cgi?id=150137">bug 150137</a>
              from <span class="vcard"><a class="email" href="mailto:fpizlo&#64;apple.com" title="Filip Pizlo &lt;fpizlo&#64;apple.com&gt;"> <span class="fn">Filip Pizlo</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=150137#c2">comment #2</a>)
<span class="quote">&gt; (In reply to <a href="show_bug.cgi?id=150137#c1">comment #1</a>)
&gt; &gt; I don't remember the exact bug number (maybe, in the context of Symbol and
&gt; &gt; IdentifierRepHash), IIRC, when I attempt to change this to PtrHash, I heard
&gt; &gt; the following reason why we did not use PtrHash; We intentionally use
&gt; &gt; StringHasher instead of PtrHash because it gives nicer distribution for
&gt; &gt; Strings and reduces collisions in the hash table.
&gt; &gt; So when changing this, I think measuring collision and performance is nice.
&gt; 
&gt; Personally I guess PtrHash gives nice distribution. PtrHash maps intptr_t =&gt;
&gt; unsigned. StringHasher maps UChar[arbitrary length] =&gt; unsigned. If PtrHash
&gt; works well, it could provide nice distribution in this case I think.</span >

Do you recommend measuring distribution directly, or do you think it's OK to just see how performance is affected overall?

We may encounter a trade-off between a fast to compute hash function that gives worse distribution and a slow to compute hash function that gives better distribution.  I don't have a philosophical preference between the two, but I just suspect that unless the distribution is really bad, the faster-to-compute hash function will give better overall performance.  Maybe the best thing to do is just to look at end-to-end performance.  Probably, it doesn't matter at all.  In that case, PtrHash is nicer because it's the less surprising choice.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>