commit | a1d7993c5469f828d369d97d36179cc3dcfd3e1d | [log] [tgz] |
---|---|---|
author | Ian Rogers <irogers@google.com> | Thu Sep 27 00:33:21 2012 -0700 |
committer | Ian Rogers <irogers@google.com> | Thu Sep 27 00:33:21 2012 -0700 |
tree | b569f2f7b33f6b694e5990ffd6d7234b84afcf59 | |
parent | 4d980b0e085ea59bc243da3eff5ea84acc7afc24 [diff] |
Force inlining of ObjectArray::Get. Hot array access used in Class::Implements, forcing inlining moves InstanceOfNot DalvikPerf benchmark from 416 to 176. Change-Id: Ibf06d46ed82a50dbdc5620ed2b81a3f3d173ad41
diff --git a/src/object.h b/src/object.h index 07debab..947b77d 100644 --- a/src/object.h +++ b/src/object.h
@@ -1127,7 +1127,7 @@ } template<class T> -T* ObjectArray<T>::Get(int32_t i) const { +inline T* ObjectArray<T>::Get(int32_t i) const { if (UNLIKELY(!IsValidIndex(i))) { return NULL; }