aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/COFFObjectFile.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2015-03-07 03:22:37 +0000
committerRui Ueyama <ruiu@google.com>2015-03-07 03:22:37 +0000
commit923147b95448476478297b30af7645b910da2dbe (patch)
tree4cea2c6c499bb1842db944d5d4301c895c0512d3 /llvm/lib/Object/COFFObjectFile.cpp
parent80fce4e7da95876ffc26ba7114933a15787ae66d (diff)
downloadllvm-923147b95448476478297b30af7645b910da2dbe.zip
llvm-923147b95448476478297b30af7645b910da2dbe.tar.gz
llvm-923147b95448476478297b30af7645b910da2dbe.tar.bz2
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
Diffstat (limited to 'llvm/lib/Object/COFFObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions