2 ms·
Any half-decent optimizing compiler will turn those two implementations into the exact same assembly. That being said, that looks like Python source code - and
by TheLoneWolfling 12y ago
Any half-decent optimizing compiler will turn those two implementations into the exact same assembly.
That being said, that looks like Python source code - and as the default Python interpreter doesn't do much in the way of optimization, you are correct in that case. (Although I wonder about PyPy.)