public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
* [binutils-gdb] Make the default gas symbol hash table larger
@ 2023-07-14  3:37 Alan Modra
  0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2023-07-14  3:37 UTC (permalink / raw)
  To: bfd-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a879fdb267171e2dfaccd3047dc5ae6d0f4bdc7e

commit a879fdb267171e2dfaccd3047dc5ae6d0f4bdc7e
Author: Alan Modra <amodra@gmail.com>
Date:   Fri Jul 14 10:48:27 2023 +0930

    Make the default gas symbol hash table larger
    
    We may as well start with the symbol table a little larger, saving
    time resizing.  Even a simple C hello world compiled with -O2 -g will
    exceed 16 symbols (by well over 3 times with gcc-11).
    
            * symbols.c (symbol_begin): Create sy_hash with more entries.

Diff:
---
 gas/symbols.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gas/symbols.c b/gas/symbols.c
index a335c316903..ea05801e356 100644
--- a/gas/symbols.c
+++ b/gas/symbols.c
@@ -3103,7 +3103,7 @@ symbol_begin (void)
 {
   symbol_lastP = NULL;
   symbol_rootP = NULL;		/* In case we have 0 symbols (!!)  */
-  sy_hash = htab_create_alloc (16, hash_symbol_entry, eq_symbol_entry,
+  sy_hash = htab_create_alloc (1024, hash_symbol_entry, eq_symbol_entry,
 			       NULL, xcalloc, free);
 
 #if defined (EMIT_SECTION_SYMBOLS) || !defined (RELOC_REQUIRES_SYMBOL)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-07-14  3:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-14  3:37 [binutils-gdb] Make the default gas symbol hash table larger Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).