Time of execution of the python-code

Time of execution of the python-code

import time start = time.time() for i in [0, 100]: i = i + 1 stop_point_somecode = time.time() for j in [1, 1000]: j = j + 1 stop_point_somecode_2 = time.time() print "Runtime somecode %s" % (stop_point_somecode - start) print "All runtime %s" % (stop_point_somecode_2 - start) To calculate, you can create a decorator: ...

Read More →

Search
Popular Posts
Subscribe
{{post}}