This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C++: Why do we nreverse CLASSTYPE_TAGS
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Matt Austern <austern at apple dot com>
- Cc: Mark Mitchell <mark at codesourcery dot com>, gcc at gcc dot gnu dot org, jason at redhat dot com
- Date: 24 Mar 2003 21:04:12 +0100
- Subject: Re: C++: Why do we nreverse CLASSTYPE_TAGS
- Organization: Integrable Solutions
- References: <B9C5B416-5E32-11D7-8995-00039390D9E0@apple.com>
Matt Austern <austern at apple dot com> writes:
| On Monday, March 24, 2003, at 11:21 AM, Mark Mitchell wrote:
|
| >> OK, I'll experiment with that approach. What threasold would you put
| >> for "lots"?
| >
| > I dunno. Probably 10 or so, to start. With fewer than that, hashing
| > can't possibly be a win.
|
| How expensive is the hash function? Unless it's pretty extreme, I'd
| be surprised if you needed to get all the way to 10 to get a win.
Actually, we have the hash function for free for the following reason:
by caching the hash value, as suggested in a previous patch, we
don't need to recompute it when we map a name to the associated
type. That hash is already computed as a result of calling
get_identifier().
-- Gaby