You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
401 B

7 years ago
7 years ago
  1. import time
  2. from hangman import load_words,filter_wordlist,ALPHABET
  3. words = load_words('words.txt')
  4. def test(input):
  5. s = time.perf_counter()
  6. filter_wordlist('.....',ALPHABET,words,True)
  7. times_mp = time.perf_counter() - s
  8. s = time.perf_counter()
  9. filter_wordlist('.....',ALPHABET,words,False)
  10. times_sc = time.perf_counter() - s
  11. return dict(time_mp=times_mp,times_sc=times_sc)