summaryrefslogtreecommitdiff
path: root/compiler/optimizing/intrinsic_objects.cc
diff options
context:
space:
mode:
author Santiago Aboy Solanes <solanes@google.com> 2024-02-07 17:15:16 +0000
committer Santiago Aboy Solanes <solanes@google.com> 2024-02-09 08:56:51 +0000
commit554d48465f31b0e073f2c53a09ed9851f8b3e692 (patch)
tree64b15c98af9470921939b36f6b02fc7e81e18af4 /compiler/optimizing/intrinsic_objects.cc
parent158c3ff1fd1b7e283cfc568150e8249e639e6788 (diff)
Pass functors as rvalues when possible
On local compiles I saw that DeleteAllImpureWhich was the third most time consuming method, using pprofs sorting in bottom-up. By passing the functor it uses as rvalue, the method speeds up ~10% and it drops from the third most time consuming to the fourth. The other modified methods in the CL are not showing up in the pprof profile that I took, but changing them to use rvalues shouldn't affect them negatively. Test: Locally compile, take a trace, and observe time spent Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b Change-Id: I6c363d5601fd4865f4e7881e64b883bd6bbedb69
Diffstat (limited to 'compiler/optimizing/intrinsic_objects.cc')
-rw-r--r--compiler/optimizing/intrinsic_objects.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/optimizing/intrinsic_objects.cc b/compiler/optimizing/intrinsic_objects.cc
index 6c799d4132..c625d435ae 100644
--- a/compiler/optimizing/intrinsic_objects.cc
+++ b/compiler/optimizing/intrinsic_objects.cc
@@ -35,7 +35,7 @@ static int32_t FillIntrinsicsObjects(
ObjPtr<mirror::ObjectArray<mirror::Object>> live_objects,
int32_t expected_low,
int32_t expected_high,
- T type_check,
+ T&& type_check,
int32_t index)
REQUIRES_SHARED(Locks::mutator_lock_) {
ObjPtr<mirror::ObjectArray<mirror::Object>> cache =