I want to know how to profile my code.
I have gone through the docs, but as there were no examples given I could not get anything from it.
I have a large code and it is taking so much time, hence I want to profile and increase its speed.
I havent written my code in method, there are few in between but not completely.
I don't have any main in my code. I want to know how to use profiling.
I'm looking for some example or sample code of about how to profile.
I tried psyco, i.e just addded two lines at the top of my code:
import psyco
psyco.full()
Is this right? It did not show any improvement.
Any other way of speeding up, please suggest.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…