Include numeric loop in for benchmark.

This commit is contained in:
Bob Nystrom
2014-01-20 08:43:10 -08:00
parent 83b5968340
commit d40d04f0c5
5 changed files with 14 additions and 12 deletions
+4 -2
View File
@@ -1,8 +1,10 @@
import time
list = range(0, 2000000)
start = time.clock()
list = []
for i in xrange(0, 1000000):
list.append(i)
sum = 0
for i in list:
sum += i