Created
May 31, 2010 20:27
-
-
Save shiumachi/420243 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import psyco | |
psyco.full() | |
def alloc(size, default = 0): return [default] * size | |
print "No,time" | |
for i in xrange(9): | |
t0 = time.clock() | |
N = pow(10,i) | |
a = alloc(N) | |
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