[Tutor] how to calculate program compile time?

Christian Witts cwitts at compuscan.co.za
Thu Dec 8 12:19:04 CET 2011


On 2011/12/08 12:59 PM, surya k wrote:
> I'm doing puzzles where we need to write code that works as fast a 
> possible
>
> So, how can I check the compile time of my program ?...
>
>
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
You can use the `timeit` [1] module or outside of Python if you're using 
Linux you can use `time`. That will give you your total execution time.

You can also look at further performance tips [2] if needed.

[1] http://docs.python.org/library/timeit.html
[2] http://wiki.python.org/moin/PythonSpeed/PerformanceTips
-- 

Christian Witts
Python Developer
//
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20111208/9f2f9ba3/attachment.html>


More information about the Tutor mailing list