Add hash table to link virtual methods
Added a hash table for turning the O(m*n) lookup average case to
O(m+n) average case. There is probably still some room for improvement.
Before:
WaitTime: 2121
WaitTime: 2051
WaitTime: 2134
WaitTime: 2104
WaitTime: 2237
WaitTime: 2391
4.99% art::MethodNameAndSignatureComparator::HasSameNameAndSignature(art::mirror::ArtMethod)
1.65% art::ClassLinker::LinkVirtualMethods(art::Thread*, art::Handle<art::mirror::Class>)
After:
WaitTime: 2038
WaitTime: 1965
WaitTime: 1979
WaitTime: 1976
WaitTime: 1957
WaitTime: 2004
0.46% art::MethodNameAndSignatureComparator::HasSameNameAndSignature(art::mirror::ArtMethod*)
1.39% art::ClassLinker::LinkVirtualMethods(art::Thread*, art::Handle<art::mirror::Class>)
Bug: 18054905
Bug: 16828525
(cherry picked from commit a9ca9ac444ceb2cf5e8bd5c98c1ed47f2a9a94dd)
Change-Id: If847afb7194daa05ace38d15862e4b871dfffae1
3 files changed