1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-01 10:06:57 +03:00

Optimize generic ELF hash function a bit more

This commit is contained in:
Ulrich Drepper
2011-12-10 11:53:44 -05:00
parent 850fb039ce
commit f039c04307
2 changed files with 9 additions and 1 deletions

View File

@ -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;
}
}
}