[patch 2/2] iFort compat.: case insensitive symbols (PR 11313)

Jan Kratochvil jan.kratochvil@redhat.com
Mon Nov 22 19:19:00 GMT 2010


On Mon, 22 Nov 2010 19:54:32 +0100, Joel Brobecker wrote:
> > +	  hash = SYMBOL_HASH_NEXT (hash, *string);
> [...]
> > +#define SYMBOL_HASH_NEXT(hash, c) \
> > +  ((hash) * 67 + tolower ((unsigned char) (c)) - 113)
> 
> The lowercasing of the character impact the hash's overal performance?

If there are any concerns about it (I do not think there should be any while
looking and the disassembly plus glibc's __ctype_tolower_loc) we should also
ask why GDB already uses locale-conforming tolower while gcc uses TOLOWER.

GDB could also use it, it is in libiberty.  That one has "zero" cost.


Thanks,
Jan



More information about the Gdb-patches mailing list