]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Faster string merging
authorMichael Matz <matz@suse.de>
Wed, 20 Jul 2022 15:22:15 +0000 (17:22 +0200)
committerMichael Matz <matz@suse.de>
Fri, 20 Jan 2023 13:58:04 +0000 (14:58 +0100)
commit1a528d3ef07fc6084fc51759c1b2f8abb5c8127e
treea8a6592b42048b515755cf3894427ff8ac88753f
parent2e175383bfe010c05c55fb19e29b5c0665229a9c
Faster string merging

* use power-of-two hash table
* use better hash function (hashing 32bits at once and with better
  mixing characteristics)
* use input-offset-to-entry maps instead of retaining full input
  contents for lookup time
* don't reread SEC_MERGE section multiple times
* care for cache behaviour for the hot lookup routine

The overall effect is less usage in libz and much faster string merging
itself.  On a debug-info-enabled cc1 the effect at the time of this
writing on the machine I used was going from 14400 perf samples to 9300
perf samples or from 3.7 seconds to 2.4 seconds, i.e. about 33% .
bfd/config.in
bfd/configure
bfd/configure.ac
bfd/elflink.c
bfd/merge.c