Skip to content

Instantly share code, notes, and snippets.

@graingert
Forked from devdave/gist:5892749
Created June 30, 2013 01:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save graingert/5893367 to your computer and use it in GitHub Desktop.
Save graingert/5893367 to your computer and use it in GitHub Desktop.
from uuid import uuid1
from time import time
def main():
test = dict()
limit = 10 ** 10
while limit:
limit -= 1
x = {n:uuid1().hex for n in range(15)}
if len(set(x.values())) != len(x.keys()):
print "Collision"
return
if __name__ == '__main__':
start = time()
main()
print time() - start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment