File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -70,11 +70,13 @@ def do_benchmark(number: int) -> None:
7070 setup = "import __main__ as z"
7171 print (f"Benchmark when { number = } :" )
7272 print (f"{ get_set_bits_count_using_modulo_operator (number ) = } " )
73- timing = timeit ("z.get_set_bits_count_using_modulo_operator(25)" , setup = setup )
73+ timing = timeit (
74+ f"z.get_set_bits_count_using_modulo_operator({ number } )" , setup = setup
75+ )
7476 print (f"timeit() runs in { timing } seconds" )
7577 print (f"{ get_set_bits_count_using_brian_kernighans_algorithm (number ) = } " )
7678 timing = timeit (
77- "z.get_set_bits_count_using_brian_kernighans_algorithm(25 )" ,
79+ f "z.get_set_bits_count_using_brian_kernighans_algorithm({ number } )" ,
7880 setup = setup ,
7981 )
8082 print (f"timeit() runs in { timing } seconds" )
You can’t perform that action at this time.
0 commit comments