diff options
author | Rich Felker <dalias@aerifal.cx> | 2017-03-15 16:50:19 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2017-03-15 16:50:19 -0400 |
commit | a393d5cc8d22b628fcc1da1b3a2cdae42ca643a9 (patch) | |
tree | e6399bb0a600c8e24817b7d4397defb28f391bcd /ldso/dlstart.c | |
parent | 8cba1dc46c8f29261aa441e70bac798f2c2c0f58 (diff) | |
download | musl-a393d5cc8d22b628fcc1da1b3a2cdae42ca643a9.tar.gz musl-a393d5cc8d22b628fcc1da1b3a2cdae42ca643a9.tar.bz2 musl-a393d5cc8d22b628fcc1da1b3a2cdae42ca643a9.tar.xz musl-a393d5cc8d22b628fcc1da1b3a2cdae42ca643a9.zip |
precalculate gnu hash rather than doing it lazily in find_sym inner loop
this change was suggested based on testing done by Timo Teräs almost
two years ago; the branch (and probably call prep overhead) in the
inner loop was found to contribute noticably to total symbol lookup
time. this change will make lookup slightly slower if libraries were
built with only the traditional "sysv" ELF hash table, but based on
how much slower lookup tends to be without the gnu hash table, it
seems reasonable to assume that (1) users building without gnu hash
don't care about dynamic linking performance, and (2) the extra time
spent computing the gnu hash is likely to be dominated by the slowness
of the sysv hash table lookup anyway.
Diffstat (limited to 'ldso/dlstart.c')
0 files changed, 0 insertions, 0 deletions