Skip to content

Instantly share code, notes, and snippets.

@hktechn0
Created September 15, 2010 22:03
Show Gist options
  • Save hktechn0/581577 to your computer and use it in GitHub Desktop.
Save hktechn0/581577 to your computer and use it in GitHub Desktop.
import time
if __name__ == "__main__":
s = set()
l = list()
N = 10000000
a = time.clock()
for i in xrange(N):
s.add(i)
b = time.clock()
for i in xrange(N):
l.append(i)
c = time.clock()
print b - a
print c - b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment