0

I am going through Macrobenchmarking documentation : https://developer.android.com/topic/performance/benchmarking/benchmarking-overview

It mentions:

It allows you to control compiling, starting and stopping your application to directly measure actual app startup or scrolling, instead of only the specific jitted, hot functions, with all disk accesses cached.

I understand the first part about controlling compile, startup as benchmark provides us with those options while writing the tests. But unable to understand what the second part means only the specific jitted, hot functions, with all disk accesses cached.

Can someone help me understand this. Is this related to AOT compilation or something else?

Ben Weiss
  • 17,182
  • 6
  • 67
  • 87
gaurav jain
  • 3,119
  • 3
  • 31
  • 48
  • Have you seen: https://source.android.com/docs/core/runtime/jit-compiler – Morrison Chang Nov 13 '22 at 05:18
  • Yes I did read about JIT / ART and how the changes have been done in Android over the years (Recent changes regarding Baseline profiles), there's an excellent article as well: https://medium.com/proandroiddev/android-runtime-how-dalvik-and-art-work-6e57cf1c50e5 Just wanted to confirm whether this is related to compilation only or something else – gaurav jain Nov 13 '22 at 05:22
  • Honestly I think that particular quote `instead of only specific jitted, hot functions, with all disk accesses cached` refers to what is done with/by the [Microbenchmarking library](https://developer.android.com/topic/performance/benchmarking/benchmarking-overview#microbenchmark) as a contrast to the Macrobenchmarking library as that library has `warmed up Just in Time (JIT), disk accesses cached` wording. – Morrison Chang Nov 13 '22 at 07:39

1 Answers1

1

With the macrobenchmark library you gain full control over several states in contrast to the Microbenchmark library.

This is related to JIT (Just-in-Time) and AOT (Ahead-of-Time) compilation.

I agree that the phrasing is targeted at developers who already have an understanding of these libraries and it will be updated shortly.

Ben Weiss
  • 17,182
  • 6
  • 67
  • 87