Recipe
Python
Beginner
10 min
Profiling with cProfile and timeit: find where a script spends its time
Afterwards you can time a piece of code properly with timeit, find the function that takes the time with cProfile, and see whether a fix helped.
Performance
Cross-disciplinary