Skip to content

Instantly share code, notes, and snippets.

View justinvanwinkle's full-sized avatar

Justin Van Winkle justinvanwinkle

View GitHub Profile
#!/usr/bin/env python
import time
data = range(10000000)
def test_method(method):
start_time = time.time()
result = method()
assert len(result) == 68888890, 'Method work no good: %s != 68888890' % len(result)
end_time = time.time()
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from cStringIO import StringIO
from UserString import MutableString
data = xrange(100000)
def test_join_way():
return ''.join([str(x) for x in data])