The best way would be to perform some benchmarks (to test individual functions) or Profiling (to test the entire application / program). Python comes with built-in profilers.
, , , . .
:
import time
start = time.time()
do_long_code()
print "it took", time.time() - start, "seconds."
Python - , .
:
def test():
"Time me"
L = []
for i in range(100):
L.append(i)
if __name__=='__main__':
from timeit import Timer
t = Timer("test()", "from __main__ import test")
print t.timeit()