From mboxrd@z Thu Jan 1 00:00:00 1970 From: Falk Hueffner To: gcc@gcc.gnu.org Subject: Re: gcc's symbol table Date: Thu, 03 Aug 2000 04:55:00 -0000 Message-id: <8766pia9k0.fsf@student.uni-tuebingen.de> References: X-SW-Source: 2000-08/msg00069.html Marc Tardif writes: > I've heard that gcc uses gperf to create a perfect hash function for > the symbol table. Once a key is hashed and retrieved from the table, > is it necessary to strcmp in order to verify that the key matches > the symbol? The perfect hash table is only used to recognize keywords, since generating a perfect hash is costly. So a strcmp is neccesary to check if it was a keyword at all. If a token would be known to be a keyword, the strcmp would be unnecessary. Falk