I found that creation of a class is way slower than instantiation of a class.
>>> from timeit import Timer as T >>> def calc(n): ... return
This might give you the intuition:
>>> class Haha(object): pass ... >>> sys.getsizeof(Haha) 904 >>> sys.getsizeof(Haha()) 64
Class object is much more complex and expensive structure than an instance of that class.