unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Szabolcs Nagy <Szabolcs.Nagy@arm.com>
Cc: Wilco Dijkstra <Wilco.Dijkstra@arm.com>,  nd <nd@arm.com>,
	 'GNU C Library' <libc-alpha@sourceware.org>
Subject: Re: Optimizing hash table lookup in symbol binding
Date: Tue, 19 Nov 2019 12:56:16 +0100	[thread overview]
Message-ID: <87blt8yt9b.fsf@oldenburg2.str.redhat.com> (raw)
In-Reply-To: 21e97283-3bd6-7a51-c423-641c2379a07b@arm.com

* Szabolcs Nagy:

> On 18/11/2019 21:57, Wilco Dijkstra wrote:
>> Hi Florian,
>> 
>> Hashtables should be powers of 2 - this not only gives very efficient
>
> this hash table is in the elf binary,
> so we are not in control of the size and other details.

But the linker could try quite a few values and choose among them
because that's work that happens only once.  Which values are good
depend on the other propreties of the construct.

For example, if the bitmask filter is really strong, it would make sense
to make sure that almost all buckets are occupied, while the chains are
still reasonably short (but not necessarily length 1).

But if the bitmask filter is too leaky, we probably can't afford to
iterate over multi-element chains just in order to confirm a lookup
failure.

Thanks,
Florian


  reply	other threads:[~2019-11-19 11:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-18 21:57 Optimizing hash table lookup in symbol binding Wilco Dijkstra
2019-11-19  9:15 ` Szabolcs Nagy
2019-11-19 11:56   ` Florian Weimer [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-11-18 13:58 Florian Weimer
2019-11-18 17:09 ` Szabolcs Nagy
2019-11-18 17:34   ` Florian Weimer
2019-11-21  1:55 ` Carlos O'Donell
2019-11-21 13:24   ` Adhemerval Zanella

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/libc/involved.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87blt8yt9b.fsf@oldenburg2.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=Szabolcs.Nagy@arm.com \
    --cc=Wilco.Dijkstra@arm.com \
    --cc=libc-alpha@sourceware.org \
    --cc=nd@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).