File tree Expand file tree Collapse file tree 2 files changed +5
-17
lines changed Expand file tree Collapse file tree 2 files changed +5
-17
lines changed Original file line number Diff line number Diff line change 995995 * [ Sol1] ( project_euler/problem_686/sol1.py )
996996
997997## Quantum
998+ * [ Bb84] ( quantum/bb84.py )
998999 * [ Deutsch Jozsa] ( quantum/deutsch_jozsa.py )
9991000 * [ Half Adder] ( quantum/half_adder.py )
10001001 * [ Not Gate] ( quantum/not_gate.py )
Original file line number Diff line number Diff line change @@ -38,26 +38,13 @@ def atbash(sequence: str) -> str:
3838
3939
4040def benchmark () -> None :
41- """Let's benchmark them side-by-side..."""
41+ """Let's benchmark our functions side-by-side..."""
4242 from timeit import timeit
4343
4444 print ("Running performance benchmarks..." )
45- print (
46- "> atbash_slow()" ,
47- timeit (
48- "atbash_slow(printable)" ,
49- setup = "from string import printable ; from __main__ import atbash_slow" ,
50- ),
51- "seconds" ,
52- )
53- print (
54- "> atbash()" ,
55- timeit (
56- "atbash(printable)" ,
57- setup = "from string import printable ; from __main__ import atbash" ,
58- ),
59- "seconds" ,
60- )
45+ setup = "from string import printable ; from __main__ import atbash, atbash_slow"
46+ print (f"> atbash_slow(): { timeit ('atbash_slow(printable)' , setup = setup )} seconds" )
47+ print (f"> atbash(): { timeit ('atbash(printable)' , setup = setup )} seconds" )
6148
6249
6350if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments