logic to get the interpretation time

2 views
Skip to first unread message

uday3prakash

unread,
Feb 26, 2015, 1:19:12 AM2/26/15
to lamp_t...@googlegroups.com
Here are two examples showing the interpretation time, comparision between range and xrange

$ python -m timeit 'for i in range(1000000):' ' pass'
10 loops, best of 3: 90.5 msec per loop
 
$ python -m timeit 'for i in xrange(1000000):' ' pass'
10 loops, best of 3: 51.1 msec per loop
Reply all
Reply to author
Forward
0 new messages