ART Faster `LinkCode()` in `ClassLinker`.
Make `LinkCode()` a member of `ClassLinker` and speed it up
by avoiding a linear (but fast) method code lookup using the
`BitVector::NumSetBits()`, avoiding related function call
overhead as well as pulling some invariant checks out of the
calling loops and eliminating redundant checks.
For a test class with 1000 unannotated static methods and
400 @NeverCompile static methods, this change reduces the
time needed by `ClassLinker::LoadClass()` by roughly 25%.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 329196666
Change-Id: Ifeae520113594acae2e5c19ba746f11ede2dfac2
3 files changed