Time execution of the python-code

Time 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 →

← Previous 1 2 3 ... 6 7 8
Search
Popular Posts
Subscribe
{{post}}