Skip to content

Instantly share code, notes, and snippets.

@shiumachi
Created May 31, 2010 20:29
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 shiumachi/420248 to your computer and use it in GitHub Desktop.
Save shiumachi/420248 to your computer and use it in GitHub Desktop.
import time
import random
import psyco
psyco.full()
a = []
for i in xrange(10000000):
a.append(random.randint(1,100000000))
print "No,time"
for i in xrange(8):
N = pow(10,i)
t0 = time.clock()
b = a[:N]
b.sort()
print "%d,%.2f" % (i,time.clock()-t0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment