Message 388215 - Python tracker (original) (raw)

Without the guards the incremental cost drops to 10%.

$ python3.10 -m timeit -r11 -s 'from patched_noguards import Fraction as F' -s 'a=F(10,3)' -s 'b=F(6, 5)' 'a * b' 100000 loops, best of 11: 2.02 usec per loop