Skip to content

Instantly share code, notes, and snippets.

@njoyce
Created March 3, 2011 00:28
Show Gist options
  • Save njoyce/852084 to your computer and use it in GitHub Desktop.
Save njoyce/852084 to your computer and use it in GitHub Desktop.
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