In this post I will talk about some tools and ways in which you can profile the interpreter, when running a Python script.
Just like in our previous post, the meaning of CPU profiling is the same, but now we are not targeting the Python script. Instead we want to know how the Python interpreter works and where it spends the most time when running our Python script.
We see next how you can trace the CPU usage and find the hotspots in our interpreter.