summaryrefslogtreecommitdiff
path: root/compiler/optimizing/stack_map_stream.h
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/stack_map_stream.h
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/stack_map_stream.h')
-rw-r--r--compiler/optimizing/stack_map_stream.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/optimizing/stack_map_stream.h b/compiler/optimizing/stack_map_stream.h
index 8c7b1c01a7..a3daa29b4e 100644
--- a/compiler/optimizing/stack_map_stream.h
+++ b/compiler/optimizing/stack_map_stream.h
@@ -110,7 +110,7 @@ class StackMapStream : public DeletableArenaObject<kArenaAllocStackMapStream> {
// Invokes the callback with pointer of each BitTableBuilder field.
template<typename Callback>
- void ForEachBitTable(Callback callback) {
+ void ForEachBitTable(Callback&& callback) {
size_t index = 0;
callback(index++, &stack_maps_);
callback(index++, &register_masks_);