Resolver: Reduce number of hash function call.
This is yet another optimization patch. Previously we called SymbolTable::isDefined() and SymbolTable::findByName() from a very frequently executed function. Because isDefined calls findByName, findByName is called twice on each iteration. findByName is not a cheap function. It computes a hash value for a given symbol name. When linking C++ programs, it can be expensive because of C++ mangled long symbols. This patch reduces the number of call from 2 to 1. Performance improvements by this patch was larger than I expected. Linking time of chrome.dll gets almost 5% shorter. llvm-svn: 231549
Loading
Please register or sign in to comment