diff options
author | Ulrich Drepper <drepper@gmail.com> | 2011-12-10 11:53:44 -0500 |
---|---|---|
committer | Ulrich Drepper <drepper@gmail.com> | 2011-12-10 11:53:44 -0500 |
commit | f039c043071f2f55943d052fa7d4ad5f1a67db09 (patch) | |
tree | 2c64a4951dd64770b17439dee64a79697eb09bd3 /sysdeps | |
parent | 850fb039cec802072f70ed9763927881bbbf639c (diff) | |
download | glibc-f039c043071f2f55943d052fa7d4ad5f1a67db09.zip glibc-f039c043071f2f55943d052fa7d4ad5f1a67db09.tar.gz glibc-f039c043071f2f55943d052fa7d4ad5f1a67db09.tar.bz2 |
Optimize generic ELF hash function a bit more
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/generic/dl-hash.h | 5 |
1 files changed, 4 insertions, 1 deletions
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; } } } |