From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10636 invoked by alias); 22 Nov 2010 18:54:44 -0000 Received: (qmail 10625 invoked by uid 22791); 22 Nov 2010 18:54:41 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,KAM_STOCKGEN X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 22 Nov 2010 18:54:37 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 7BE892BAC2B; Mon, 22 Nov 2010 13:54:35 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id mIHSmT2BpxRS; Mon, 22 Nov 2010 13:54:35 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 171ED2BAB7C; Mon, 22 Nov 2010 13:54:35 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 28F101457E1; Mon, 22 Nov 2010 10:54:32 -0800 (PST) Date: Mon, 22 Nov 2010 18:54:00 -0000 From: Joel Brobecker To: Jan Kratochvil Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [patch 2/2] iFort compat.: case insensitive symbols (PR 11313) Message-ID: <20101122185432.GT2634@adacore.com> References: <20101108183133.GE2933@adacore.com> <20101122035334.GA9229@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101122035334.GA9229@host0.dyn.jankratochvil.net> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-11/txt/msg00307.txt.bz2 > 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