Improving app performance with benchmarking
summary
Library shows how to get stable microbenchmarks for Kotlin Java and some NDK code by applying concrete fixes and tools rather than vague advice It runs a 250 ms warmup then measures repeated loops with a minimum rather than average to avoid contention and caching and offers three thermal strategies depending on device: lock clocks with root, setSustainedPerformanceMode via an injected activity and helper thread on N+, and a Thread.sleep cooldown fallback Benchmarks cut noise from 2.25 ms sd to 0.02 ms and drive real 50% view performance wins using measureRepeated and runWithTimingDisabled
AI-written summary · about
chapters (14)
- 0:00Introduction
- 0:59First benchmark
- 3:29The problem with benchmarking
- 4:21Common benchmarking mistakes
- 7:34Studio benchmark module
- 9:27Gradle plugin
- 9:57Program rules
- 28:25Hot code
- 29:00Caches
- 29:44Over parameterizing
- 32:49Closing notes
- 33:27The benchmarking library
- 35:30Summary
- 35:50Outro








