Re: python : timeit - Tool for measuring execution time

2015-04-23 Thread anubhav1691
On Wednesday, April 22, 2015 at 10:20:58 PM UTC+5:30, Ganesh Pal wrote: > Thank you ,  this answers my question  : ) Hi, Thanks for asking this question, it introduced me to the timeit module. Just a friendly, next time refrain yourself from top posting. Cheers! -- https://mail.python.org/mai

Re: python : timeit - Tool for measuring execution time

2015-04-22 Thread Ganesh Pal
Thank you , this answers my question : ) On Apr 22, 2015 6:39 PM, "Michael Torrie" wrote: > > On 04/21/2015 09:31 PM, Ganesh Pal wrote: > > Iam not able to understand what why only 10 loops were run ? what > > does this mean and how does this work ? > > I have a hunch you're mistakenly thinkin

Re: python : timeit - Tool for measuring execution time

2015-04-22 Thread Ian Kelly
On Wed, Apr 22, 2015 at 7:07 AM, Michael Torrie wrote: > I have a hunch you're mistakenly thinking that Python is only running > through ten iterations of your for i in range(100) loop. This is > not the case. The entire thing is running (all 100 iterations of > your loop), but is run te

Re: python : timeit - Tool for measuring execution time

2015-04-22 Thread Michael Torrie
On 04/21/2015 09:31 PM, Ganesh Pal wrote: > Iam not able to understand what why only 10 loops were run ? what > does this mean and how does this work ? I have a hunch you're mistakenly thinking that Python is only running through ten iterations of your for i in range(100) loop. This is not

Re: python : timeit - Tool for measuring execution time

2015-04-21 Thread Ben Finney
Ganesh Pal writes: > Iam running the below command on Linux machine have Python 2.7 > installed , If it hasn't already been said: You should be targeting Python 3 wherever possible (with the ‘python3’ command). Since you're not in this case – and you are specifically testing Python 2 features –

python : timeit - Tool for measuring execution time

2015-04-21 Thread Ganesh Pal
Hi Team, Iam running the below command on Linux machine have Python 2.7 installed , I was trying to figure out the speed difference between xrange and range functions. range : python -m timeit 'for i in range(100):' ' pass' 10 loops, best of 3: 90.5 msec per loop $ python -m timeit 'for i