<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - please consider using a 128 bit fast build-id"
   href="https://bugs.llvm.org/show_bug.cgi?id=44138">44138</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>please consider using a 128 bit fast build-id
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lld
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>ELF
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>rafael@espindo.la
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, peter.smith@linaro.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>lld defaults to a fast build-id hash (which is currently xxhash). That produces
a 64 bit hash.

The other hash options are md5 and sha1, which are probably a bit too slow to
be the default. Linking a release version of scylla with split dwarf I get:

none 2.022252056 seconds
fast 2.061659922 seconds
md5  2.740843349 seconds
sha1 2.318114449 seconds

One issue with fast producing a 64 bit hash is that rpm considers it too small.
I initially reported it as a problem in rpm
(<a href="https://github.com/rpm-software-management/rpm/issues/950">https://github.com/rpm-software-management/rpm/issues/950</a>), but there is an
argument why given the birthday problem and the desire to have a small
probability of a collision on an entire distro 64 bits might not be enough.

I wonder if there is 128 bit hash that would be fast enough to be the default. 
Farmhash comes to mind.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>