Performance improvements by philipc · Pull Request #14 · rust-lang/thorin · GitH...
source link: https://github.com/rust-lang/thorin/pull/14
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
This approximately doubles the speed for a large test case (thorin -e llvm-project/build/bin/opt -o opt.dwp
). (Interestingly, both llvm-dwp
and my Ubuntu's dwp
fail to handle this test case.)
Most of the time is still spend in PackageStringTable::remap_str_offsets_section
. I think the main way we could further improve that is by using the strings in PackageStringTable::data
as the hash keys instead of allocating a Vec
for each one, but I don't know if that is possible with existing HashMap
APIs. Maybe custom allocators will allow this.
I also tried radix_trie
, but it is much slower.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK