From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7291 invoked by alias); 12 Apr 2005 13:53:36 -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 7159 invoked from network); 12 Apr 2005 13:53:28 -0000 Received: from unknown (HELO petasus.ims.intel.com) (62.118.80.130) by sourceware.org with SMTP; 12 Apr 2005 13:53:28 -0000 Received: from mssmsxvs01.ims.intel.com (mssmsxvs01.ims.intel.com [10.125.2.23]) by petasus.ims.intel.com (8.12.9-20030918-01/8.12.10/d: small-solo.mc,v 1.2 2004/09/17 18:05:04 root Exp $) with SMTP id j3CE09Lf010997; Tue, 12 Apr 2005 14:00:17 GMT Received: from mssmsx331.ccr.corp.intel.com ([10.125.2.16]) by mssmsxvs01.ims.intel.com (SAVSMTP 3.1.7.47) with SMTP id M2005041217531305408 ; Tue, 12 Apr 2005 17:53:13 +0400 Received: from mssmsx403.ccr.corp.intel.com ([10.125.2.52]) by mssmsx331.ccr.corp.intel.com with Microsoft SMTPSVC(6.0.3790.211); Tue, 12 Apr 2005 17:53:13 +0400 Received: from nnsmsx401.ccr.corp.intel.com ([10.125.16.24]) by mssmsx403.ccr.corp.intel.com with Microsoft SMTPSVC(6.0.3790.211); Tue, 12 Apr 2005 17:53:12 +0400 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: GAS Date: Tue, 12 Apr 2005 13:53:00 -0000 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: From: "Zagorodnev, Grigory" To: "Nick Clifton" Cc: "Stas Kiselev" , X-OriginalArrivalTime: 12 Apr 2005 13:53:12.0834 (UTC) FILETIME=[F7E85620:01C53F66] X-SW-Source: 2005-04/txt/msg00288.txt.bz2 Hi, Nick! Hash statistics says that increasing the size we really reduce average chain length and number of hash comparisons. However I was not able to measure any comptime change on 1.3MB of x86 assembly source code. Hopefully bigger sources will expose the gain. Therefore we may keep default hash size value unchanged. Also there is a little problem with the patch: new command line option has no affect on symbol table and local symbol table hashes because routine parse_args gets called after symbol_begin in "as.c", where these hashes allocated.=20 Best regards! - Grigory >-----Original Message----- >From: Nick Clifton [mailto:nickc@redhat.com] >Sent: Wednesday, April 06, 2005 3:15 PM >To: Zagorodnev, Grigory >Cc: Stas Kiselev; binutils@sources.redhat.com >Subject: Re: GAS > >Hi Grigory, > >> Similar issue was reported against 'ld' 1.5 years ago. Simple change of >> default hash size from 4K to 64K gave 2x link time improvement. >> http://lists.gnu.org/archive/html/bug-gnu-utils/2003-08/msg00153.html >> >> Thus the patch may look like this: >> >> $ diff gas/hash.c.org gas/hash.c >> >> 38c38 >> < #define DEFAULT_SIZE (4051) >> --- >>>#define DEFAULT_SIZE (65537) > >We might as well do this properly. Please could you try the attached >patch which as well as changing the default hash size adds two new >switches: --hash-size=3D and --reduce-memory-overheads which >behave in much the same way as their linker namesakes. > >If the patch works for you and there are no objections then I will apply >it next week. > >Cheers > Nick > >gas/ChangeLog > >2005-04-06 Nick Clifton > > * hash.c (DEFAULT_SIZE): Delete. Replace with: > (gas_hash_table_size): New static variable. > (set_gas_hash_table_size): New function: Records a requested size > for the hash tables. > (get_gas_hash_table_size): New function: Return a prime number > near the requested size of the hash table. > (hash_new): Use get_gas_hash_table_size. > * hash.h: Add a prototype for set_gas_hash_table_size. > * as.c (show_usage): Add description of new switches: --hash-size > and --reduce-memory-overheads. > (option_values): Add OPTION_HASH_TABLE_SIZE and > OPTION_REDUCE_MEMORY_OVERHEADS. > (std_longpopts): Add entries for the new options. > (parse_args): Handle the new options. > * Makefile.am: Add a dependency of as.c on hash.h. > * Makefile.in: Regenerate. > * doc/as.texinfo: Document the new switches. > * NEWS: Mention the new switches.