This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: htab_hash_string




--On Friday, August 17, 2001 07:10:30 AM +0100 Neil Booth 
<neil@daikokuya.demon.co.uk> wrote:

> Richard Henderson wrote:-
>
>> A new function for libiberty that I plan on using shortly.
>>
>>
>> r~
>
> I've also sometimes wondered if it's worth hashing up to the first,
> say 20, bytes only, to speed it up.  That would make it more
> reasonable for hashing long string literals; something I intend to get
> us to start doing again.  I don't believe there is much gain in
> assuming that more than the first 20 bytes of many character strings /
> identifiers are identical.

We are now entering the realm of much wild speculation; people have
worried about this a lot.

At least one compiler hashes the first few, last few, and middle few
characters of the string.  The idea is that a lot of functions might
begin and end the same, but even then their middles are different.

-- 
Mark Mitchell                mark@codesourcery.com
CodeSourcery, LLC            http://www.codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]