Original link: Think Your Python Code Is Slow? Stop Guessing and Start Measuring / towards data science.
Pretty detailed guide.