Arham-4

Untitled

Sep 28th, 2021 (edited)
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.55 KB | None | 0 0
  1. import time
  2. from alphabetize import Alphabetize
  3.  
  4. ab = Alphabetize()
  5.  
  6. entry_data = "g"
  7. iterations = 10000
  8.  
  9. sorted = ["a", "b", "d", "e", "f"]
  10. start = time.time()
  11. for i in range(iterations):
  12.     new = ['a', 'c', 'f']
  13.     ab.insert(new, sorted)
  14. print(sorted)
  15. print('took ' + str(time.time() - start) + ' seconds to do this')
  16.  
  17. sorted = ["a", "b", "d", "e", "f"]
  18. start = time.time()
  19. for i in range(iterations):
  20.     new = ['a', 'c', 'f']
  21.     ab.merge(new, sorted)
  22. print(sorted)
  23. print('took ' + str(time.time() - start) + ' seconds to do this')
  24.  
Add Comment
Please, Sign In to add comment