[PATCH] D41993: [ELF] - Change shift2 constant of GNU_HASH from 6->11.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 17 13:42:57 PST 2018


On Wed, Jan 17, 2018 at 8:15 AM, Rafael Avila de Espindola <
rafael.espindola at gmail.com> wrote:

> Rui Ueyama <ruiu at google.com> writes:
>
> > That was my misunderstanding. Sorry for the false alarm.
> >
> > That said, I don't think this patch makes much sense. There's no theory
> > behind it to explain why this could make things faster (it shouldn't as
> > long as the hash function generates evenly distributed hash value). I
> think
> > what we should do is
> >
> > 1. first, verify that our bloom filter is really correct by taking a look
> > at the output binary carefully, because even if the bloom filter is
> wrong,
> > that doesn't cause any correctness issue, but instead it just makes
> things
> > slower, and then
>
> I don't think that is correct in general. Consider a bloom filter of all
> 0s. With that the dynamic linker would not try to lookup any symbol in
> that dso.
>

Ahh, that's right.  If we set too many bits, that just makes things slower
even though everything works fine (modulo speed difference), but if we
correctly set at most two bits per symbol, that wouldn't happen.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180117/983e6097/attachment.html>


More information about the llvm-commits mailing list