]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
stringmerge: don't presize hash table
authorMichael Matz <matz@suse.de>
Mon, 21 Oct 2024 15:58:32 +0000 (17:58 +0200)
committerMichael Matz <matz@suse.de>
Tue, 22 Oct 2024 12:14:32 +0000 (14:14 +0200)
commit8483536dea6e36e9f4a0949ecad0fcaafd62cf54
tree4005f101eaac7be6b39e51468b513511fd4049c0
parent4689c9b94690b2cd7c3494d31939afea6594ed8b
stringmerge: don't presize hash table

originally the reason for pre-sizing was that that's easier
for a multi-threaded use of the hash table.  That hasn't materialized
yet, so there's not much sense in using the very very conservative
estimates for pre-sizing.  Doing the resize on-demand, whenever we
actually need to add a new entry doesn't change performance.

bfd/
merge.c (sec_merge_hash_insert): Resize as needed from here ...
(record_section): ... not from here.  Don't calculate estimates,
return bool instead of three-state, regard all errors as soft
errors.
(_bfd_merge_sections): Adjust.
bfd/merge.c