forked from Mirror/wren
Mainly to get rid of one top level directory. But this will also be useful when there are tests of the embedding API.
20 lines
225 B
Ruby
20 lines
225 B
Ruby
start = Time.now
|
|
|
|
map = Hash.new
|
|
|
|
for i in (1..1000000)
|
|
map[i] = i
|
|
end
|
|
|
|
sum = 0
|
|
for i in (1..1000000)
|
|
sum = sum + map[i]
|
|
end
|
|
puts sum
|
|
|
|
for i in (1..1000000)
|
|
map.delete(i)
|
|
end
|
|
|
|
puts "elapsed: " + (Time.now - start).to_s
|