Files
wren/test/benchmark/map_numeric.py
Bob Nystrom 64eccdd9be Reorganize tests and benchmark scripts.
Mainly to get rid of one top level directory. But this will
also be useful when there are tests of the embedding API.
2015-03-14 12:45:56 -07:00

20 lines
283 B
Python

from __future__ import print_function
import time
start = time.clock()
map = {}
for i in range(1, 1000001):
map[i] = i
sum = 0
for i in range(1, 1000001):
sum = sum + map[i]
print(sum)
for i in range(1, 1000001):
del map[i]
print("elapsed: " + str(time.clock() - start))