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:
70
70
setup = "import __main__ as z"
71
71
print (f"Benchmark when { number = } :" )
72
72
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
+ )
74
76
print (f"timeit() runs in { timing } seconds" )
75
77
print (f"{ get_set_bits_count_using_brian_kernighans_algorithm (number ) = } " )
76
78
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 } )" ,
78
80
setup = setup ,
79
81
)
80
82
print (f"timeit() runs in { timing } seconds" )
You can’t perform that action at this time.
0 commit comments