[COFF] Avoid allocating temporary vectors during ICF
Heap profiling with ETW shows that LLD performs 4,053,721 heap allocations over its lifetime, and ~800,000 of them come from assocEquals. These vectors are created just to do a comparison, so fuse the comparison into the loop and avoid the allocation. ICF is overall a small portion of the time spent linking, and I did not measure overall throughput improvements from this change above the noise threshold. However, these show up in the heap profiler, and the work is done, so we might as well land it if the code is clear enough. Reviewed By: hans Differential Revision: https://reviews.llvm.org/D79297
Loading
Please sign in to comment