Created
March 3, 2011 00:28
-
-
Save njoyce/852084 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 timeit | |
import pyamf | |
class Foo(tuple): | |
pass | |
list_of_foo = [] | |
for x in xrange(1000000): | |
list_of_foo.append(Foo(['foo', 'bar', 'baz'])) | |
def encode(): | |
pyamf.encode(list_of_foo) | |
t = timeit.Timer('encode', 'from __main__ import encode') | |
print t.timeit(number=100000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment