Accurate Benchmarking

I'll share a mathematical approach to discounting the loop overhead when looping over a piece of code in order to measure how long it takes (as compared to some alternative piece of code). This might be a well-known approach, and there might be better methods, but it is nevertheless a method I independently came up with and have used in the past. The premise We have a piece of code, method1() ,…