This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH to hashtable.[ch]: Cache hash value
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Neil Booth <neil at daikokuya dot co dot uk>
- Cc: gcc-patches at gcc dot gnu dot org, jason at redhat dot com, mark at codesourcery dot com
- Date: 16 Mar 2003 10:10:27 +0100
- Subject: Re: PATCH to hashtable.[ch]: Cache hash value
- Organization: Integrable Solutions
- References: <m3hea41qeq.fsf@uniton.integrable-solutions.net><20030315204858.GR7652@daikokuya.co.uk>
Neil Booth <neil at daikokuya dot co dot uk> writes:
| Gabriel Dos Reis wrote:-
|
| > ! if (HT_LEN (node) == len && !memcmp (HT_STR (node), str, len))
| > {
| > if (insert == HT_ALLOCED)
| > /* The string we search for was placed at the end of the
| > --- 141,148 ----
| > if (node == NULL)
| > break;
| >
| > ! if (node->hash_value == hash && HT_LEN (node) == len
| > ! && !memcmp (HT_STR (node), str, len))
| > {
| > if (insert == HT_ALLOCED)
| > /* The string we search for was placed at the end of the
|
| Your call, but is this worth an HT_ accessor like LEN and STR?
I gave that some thought and ended up with the conclusion that there
is really no abstraction about that datatype. But I would not mind
putting an HT_HASH (although I would personnally get rid o HT_LEN and
HT_STR).
Do you feel I should introduce HT_HASH or HT_HASH_VALUE?
-- Gaby