Measuring the time complexity of a piece of code is a common technique used to optimize algorithms and other kinds of functions, by estimating their cost in terms of execution time. Let’s take a look at how to use “big o notation” to describe, measure, and improve the time complexity of a few different functions.