This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc 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]

GNU C Library master sources branch, master, updated. glibc-2.14-549-gf039c04


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  f039c043071f2f55943d052fa7d4ad5f1a67db09 (commit)
      from  850fb039cec802072f70ed9763927881bbbf639c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f039c043071f2f55943d052fa7d4ad5f1a67db09

commit f039c043071f2f55943d052fa7d4ad5f1a67db09
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Sat Dec 10 11:53:44 2011 -0500

    Optimize generic ELF hash function a bit more

diff --git a/ChangeLog b/ChangeLog
index 73e9911..93adebd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-12-10  Ulrich Drepper  <drepper@gmail.com>
+
+	* sysdeps/generic/dl-hash.h (_dl_elf_hash): Lift one operation out of
+	the inner loop.
+
 2011-12-06  Andreas Schwab  <schwab@linux-m68k.org>
 
 	[BZ #13472]
diff --git a/sysdeps/generic/dl-hash.h b/sysdeps/generic/dl-hash.h
index 28312ca..e0db00e 100644
--- a/sysdeps/generic/dl-hash.h
+++ b/sysdeps/generic/dl-hash.h
@@ -60,9 +60,12 @@ _dl_elf_hash (const char *name_arg)
 			 But the following is equivalent and a lot
 			 faster, especially on modern processors.  */
 
-		      hash ^= hi;
 		      hash ^= hi >> 24;
 		    }
+
+		  /* Second part of the modified formula.  This
+		     operation can be lifted outside the loop.  */
+		  hash &= 0x0fffffff;
 		}
 	    }
 	}

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                 |    5 +++++
 sysdeps/generic/dl-hash.h |    5 ++++-
 2 files changed, 9 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


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