diff options
author | Rui Ueyama <ruiu@google.com> | 2015-03-07 03:22:37 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2015-03-07 03:22:37 +0000 |
commit | 923147b95448476478297b30af7645b910da2dbe (patch) | |
tree | 4cea2c6c499bb1842db944d5d4301c895c0512d3 /llvm/lib/Object/COFFObjectFile.cpp | |
parent | 80fce4e7da95876ffc26ba7114933a15787ae66d (diff) | |
download | llvm-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