Python dis module and constant folding

Hi people! Recently, I was super confused when I found out that: >>> pow(3,89) runs slower than: >>> 3**89 I tried to think of a suitable answer but couldn’t find any. I timed the execution of both of these statements using the timeit module in Python3: $ python3 -m timeit ‘pow(3,89)’ 500000 loops, best of …

Python dis module and constant folding Read More »