Technical Notes
Programming and other technical stuff
Sunday, August 7, 2011
Measuring Python code execution time
import time
timestart = time.time()
# code to measure here
print time.time() - timestart, "seconds"
You can also try time.clock(). It is said to be more accurate.
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment