[Tutor] Time

Hugo Arts hugo.yoshi at gmail.com
Thu Jun 24 14:59:09 CEST 2010


On Wed, Jun 23, 2010 at 3:11 AM, Dave Angel <davea at ieee.org> wrote:
>
> If you're really looking to measure performance, you should use the timeit
> module.  But for simply deciding how much time has elapsed between two
> points in your code, you can use the time.time() function.
>

Another one I think is worth mentioning is the cProfile module. Though
timeit or time.time are more useful when you simply want to know how
long some task took, when you're optimizing your code and wondering
what's taking a lot of time, cProfile will tell you.

Hugo


More information about the Tutor mailing list