This is the mail archive of the gcc@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]

Re: [RFC] Speed up htab/walk_tree?



On Apr 6, 2004, at 15:42, Richard Guenther wrote:

Thanks,
Richard.
--- /home/rguenth/src/gcc/gccssa/gcc/tree-inline.c 2004-03-29 10:54:31.000000000 +0200
+++ gcc/tree-inline.c 2004-04-06 19:39:43.788564736 +0200
@@ -1971,7 +1971,13 @@


       /* Don't walk the same tree twice, if the user has requested
          that we avoid doing so.  */
-      slot = htab_find_slot (htab, *tp, INSERT);
+      hashval_t hash = ((long)*tp >> 3);
+      unsigned int index = hash % htab->size;


The other thing to check is do with the profilebootstrap as most likely htab->size
is going to be a power of 2. This might be able to get better timings.


Thanks,
Andrew Pinski


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