From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14199 invoked by alias); 4 Oct 2004 21:22:02 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 14188 invoked from network); 4 Oct 2004 21:22:01 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 4 Oct 2004 21:22:01 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1CEaHR-0005we-4e; Mon, 04 Oct 2004 17:22:01 -0400 Date: Mon, 04 Oct 2004 21:22:00 -0000 From: Daniel Jacobowitz To: Jim Blandy Cc: gdb-patches@sources.redhat.com Subject: Re: [rfa/dwarf] Support for attributes pointing to a different CU Message-ID: <20041004212201.GA21064@nevyn.them.org> Mail-Followup-To: Jim Blandy , gdb-patches@sources.redhat.com References: <20040923045723.GA11871@nevyn.them.org> <20040924003412.GB10500@nevyn.them.org> <20041003161221.GA3234@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-10/txt/msg00067.txt.bz2 On Mon, Oct 04, 2004 at 04:14:24PM -0500, Jim Blandy wrote: > > Daniel Jacobowitz writes: > > On Wed, Sep 29, 2004 at 12:49:35PM -0500, Jim Blandy wrote: > > > Since we never toss types anyway, would it make sense to move > > > type_hash to dwarf2_per_objfile? > > > > I don't think so. type_hash is used in two ways: individual items are > > set, when we know which CU we ought to have, and a whole CU is > > restored, when we know which CU we're restoring. It's always more > > efficient to have a lot of small hash tables if you know precisely > > which one you'll need; fewer collisions. > > Really? libiberty/hashtab.c is a resizing hash table; I thought hash > table resizing was supposed to keep the collision rate roughly > constant (modulo hysteresis) regardless of the number of elements. If > that's not so, doesn't that mean your hash function isn't doing its > job spreading the elements across the (adequately sized) table? Poor job of thinking on my part, there. The rest of the paragraph still makes sense to me, though. For instance, in a resizing hash table, I suspect that there is more copying to have one large expandable hash table than several small ones. I haven't done the math for that, of course. Maybe I've got it backwards. Do you think there would be any advantage to doing it the other way round? -- Daniel Jacobowitz