Advertisement
adrienbrody2011

Performance check (Python)

May 11th, 2013
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. import sys
  2. import time
  3.  
  4. sys.stdin = open('d:\\input.txt')
  5. sys.stdout = open('d:\\time.txt', 'a')
  6. SIZE = 10000000
  7. TIMES = 1
  8. res_time = 0
  9. for i in range(TIMES):
  10.     a = [int(input()) for j in range(SIZE)]
  11.     s_time = time.clock()
  12.     a.sort()
  13.     t_time = time.clock()
  14.     res_time += t_time-s_time
  15. print('Python: %.2f' % (res_time/TIMES))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement