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

Joel Brobecker brobecker@adacore.com
Mon Nov 22 18:54:00 GMT 2010


> Here is a draft, not yet for review.

So - what do you think? I'm a little torn, because of the following
change which I did not anticipate:

>  	default:
> -	  hash = hash * 67 + *string - 113;
> +	  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?

Your first patch only affects the languages for which the language
is marked as case-insensitive, whereas the second one seems to affect
all languages. If the impact is sufficiently noticeable, then that
would be an argument in favor of your first patch...

(just thinking aloud)

-- 
Joel



More information about the Gdb-patches mailing list