From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12678 invoked by alias); 1 Apr 2005 16:35:54 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 12636 invoked from network); 1 Apr 2005 16:35:49 -0000 Received: from unknown (205.217.158.180) by sourceware.org with QMTP; 1 Apr 2005 16:35:49 -0000 Received: (qmail 13370 invoked by uid 10); 1 Apr 2005 16:35:47 -0000 Received: (qmail 24847 invoked by uid 500); 1 Apr 2005 16:35:38 -0000 To: Stas Kiselev Cc: binutils@sourceware.org Subject: Re: Optimization of GAS References: From: Ian Lance Taylor Date: Fri, 01 Apr 2005 16:35:00 -0000 In-Reply-To: Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2005-04/txt/msg00044.txt.bz2 Stas Kiselev writes: > I want to make GAS faster. I profiled it and found out that lots of the > time takes on working with hash. What do you thing about changing hash > mechanism into hash_map from stl. Will it work faster ? STL is C++ code. gas is written in C. So using hash_map directly would be rather difficult. I expect that it is possible to speed up the hash code in gas. It would also be interesting to see if it can be called less often. A common usage is simply looking up instruction mnemonics, in which the set of instructions is fixed at the start of assembly, and really, if we do appropriate tests, it is fixed when the assembler is built. Can we take advantage of that, perhaps by doing perfect hashing? Ian