Line profiler: https://github.com/rkern/line_profiler
For some reason the path wasn't working well for me and I had to do: export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python2.7/site-packages/
to allow the profiler to find my packages.
Only change code that is slow in the profiler. NO MICROOPTIMIZATIONS!!!!
The first goal of the profiling task is to explain why the old code runs faster than the new code
Python profiler: https://docs.python.org/2/library/profile.html Some useful commands: python -m pstats barbazzr.profile http://stefaanlippens.net/python_profiling_with_pstats_interactive_mode
Line profiler: https://github.com/rkern/line_profiler For some reason the path wasn't working well for me and I had to do: export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python2.7/site-packages/ to allow the profiler to find my packages.
Only change code that is slow in the profiler. NO MICROOPTIMIZATIONS!!!!
The first goal of the profiling task is to explain why the old code runs faster than the new code