Benchmark your code's performance

Intermediate
Developer
Student
Visual Studio Code

Learn how to measure, profile, and debug your Python code to find and fix performance problems.

Learning objectives

After you complete this module, you'll be able to:

  • Understand code efficiency and Big O notation.

  • Measure and compare function performance with timeit.

  • Use cProfile to find performance bottlenecks.

  • Use the Visual Studio Code debugger to inspect and fix incorrect results.

  • Optimize code for better performance.

Prerequisites

  • Familiarity with writing and running Python code in Visual Studio Code

  • Familiarity with functions, loops, and lists