Choosing a Shift2 value based on wordsize is cargo-culted from gold.
Assuming that djb hash is a good hash function, choosing bits [4,9]
shouldn't be any worse or better than choosing bits [5,10]. We shouldn't
have copied that behavior that we can't justify in the first place.
Details
Details
Diff Detail
Diff Detail
- Repository
- rLLD LLVM Linker
Event Timeline
Comment Actions
LGTM.
(Though I think we could change it to 12+. We can't justify at this moment why it shows better results,
but it shows them whatever the real reason is. And that value at least would be based on observations.
I think technically setting is to 6 is at the same level of cargo-culting while we are unable to explain why
values ~12+ are faster).
Comment Actions
I don't want to change a value based on an observation that in some condition some number showed a better result. We don't know if that's an artifact of the test environment, and we don't know why these numbers are different in the first place.