This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fwd: PATCH: Improve ht use


and Bootstrapped and regtested on ppc-darwin....

Begin forwarded message:

From: Devang Patel <dpatel@apple.com>
Date: Fri Feb 14, 2003 4:14:20 PM US/Pacific
To: gcc-patches@gcc.gnu.org
Cc: Devang Patel <dpatel@apple.com>
Subject: PATCH: Improve ht use

Hi,

In tree.c, type_hash_table exhibits poor collision per search ratio
(more than one per search). And Inliner can reuse hash table
it uses during tree walk. This simple patch squeezes ~1%
from Finder_FE build time.

2003-02-14 Devang Patel <dpatel@apple.com>
* tree-inline.c (optimize_inline_calls): Reuse id.tree_pruner hash table.
* tree.c (TYPE_HASH_INITIAL_SIZE): Increase initial size to 4111.

OK to commit ?
3.3?

-Devang

Index: tree.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/tree.c,v
retrieving revision 1.289
diff -r1.289 tree.c
109c109
< #define TYPE_HASH_INITIAL_SIZE 1000
---
> #define TYPE_HASH_INITIAL_SIZE 4111
Index: tree-inline.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/tree-inline.c,v
retrieving revision 1.43
diff -r1.43 tree-inline.c
1440,1441c1440,1442
< id.tree_pruner = htab_create (37, htab_hash_pointer,
< htab_eq_pointer, NULL);
---
> if (!id.tree_pruner)
> id.tree_pruner = htab_create (131, htab_hash_pointer,
> htab_eq_pointer, NULL);
1445c1446
< htab_delete (id.tree_pruner);
---
> htab_empty (id.tree_pruner);


-Devang


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]