Profiling Python Code

While trying to optimize some code, I discovered cProfile profiler for python. This is pretty nifty.

It can be invoked on the command-line as a -m option, e.g.:

python -m cProfile mycode.py

Comments

Popular Posts