Skip to content

please consider using a 128 bit fast build-id #43483

Closed
@llvmbot

Description

@llvmbot
Bugzilla Link 44138
Version unspecified
OS Linux
Reporter LLVM Bugzilla Contributor
CC @rui314,@smithp35

Extended Description

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 (rpm-software-management/rpm#950), 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions