Site icon TechHype.io

Kotlin Tips – How Long Does Your Code Take?

Especially for long-running operations, it can be useful to know how much time it takes to run your code. Thankfully, the kotlin.time package comes with some functions that can help you measure the execution time of functions while still returning values from them! Watch Seb give a quick overview of the measureTimedValue function, and learn how you can time your code!

For accurately benchmarking your code, check out: https://github.com/Kotlin/kotlinx-benchmark

Exit mobile version