Created
August 28, 2016 11:52
-
-
Save tistaharahap/168ac94857a4d9c93fc07c06cb555474 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
def load(number, max): | |
for x in xrange(1, max): | |
number*number*x | |
if __name__ == '__main__': | |
max = 100000000 | |
_start = time.time() | |
load(10, max) | |
_end = time.time() | |
elapsed_time = float(_end) - float(_start) | |
print 'Elapsed Time: %.2f second' % elapsed_time | |
print 'Ops/second: %.2f' % (float(max) / elapsed_time) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment