Tweak min and max for yet more efficiency

I checked the generated assembly code, and it looks pretty damn good. I've not been able to achieve any better anyways.
Merge pull request #2053 from monarchdodra/maxTweak

Tweak min and max for yet more efficiency