Unit testing your code’s performance, part 1: Big-O scaling
When you implement an algorithm, you also implement tests to make sure the outputs are correct. This can help you: Ensure your code is correct. Catch problems if and when you change it in the future. If you’re trying to make sure your software is fast, or at least doesn’t get slower, automated tests for performance would also be useful. But where should you start? My suggestion: start by testing big-O scaling. It’s a critical aspect of your software’s speed, […]
Read more