However, @ahojnnes moved 2 of the 3 squaring computations outside of the innermost loop, so there have been lots of savings there. You're right that going back to the old `tmp` logic might result in more savings still.