You’ve learned about profiling a program’s performance in order to find hot spots or performance bottlenecks. High memory consumption, inefficient CPU use, and excessive function calls can be common indicators of potential issues in your software that need improvement.
In this video course, you:
- Learned that it’s important to profile before you optimize, so you can avoidguessing and focus on real bottlenecks
- Saw how profiling helps pinpoint which parts of your code are slowing thingsdown
- Used Python’s timeit module to measure the average runtime of a smallcode snippet
- Worked with cProfile, a deterministic profiler that records every functioncall and shows exactly how much time is spent in each one
- Tried out Pyinstrument, a statistical profiler that samples your program atregular intervals to show where most of the time is spent