Possibly because, with floating-point values, it notices that it’s converting inf values to inf in a loop and can cut off the work at that point?
Possibly. That starts happening at iteration 430 or so. But if I increase N to 50000 and decrease the outer loop iterations from 150000 to just 98 (to avoid inf) I get 1.2 seconds with CPython and 0.1 seconds with PyPy.