from timeit import Timer as T
def calc(n):
return T("class CLS(object): pass").timeit(n)
print(calc(90000))
print(calc(90000))
print(calc(90000))
# python3.4
1.1714721370008192
1.0723806529986177
1.111804607000522
# python2.7
15.7533519268
16.7191421986
16.8397979736
from timeit import Timer as T
def calc(n):