Add python3 to benchmarks.

This commit is contained in:
Bob Nystrom
2014-02-12 17:22:42 -08:00
parent 8ebbba2bc0
commit 92971d1cfa
6 changed files with 59 additions and 35 deletions
+9 -1
View File
@@ -1,8 +1,16 @@
from __future__ import print_function
import time
# Map "range" to an efficient range in both Python 2 and 3.
try:
range = xrange
except NameError:
pass
start = time.clock()
list = []
for i in xrange(0, 1000000):
for i in range(0, 1000000):
list.append(i)
sum = 0