News for hackers. Stuff that matters.
Re:Faster remainders when the divisor is a constant: beating... by bdonlan on Friday February 08, 2019 @08:24PM (#19120104)
The compiler has to assume that your operands might be large enough that they would overflow after a straight multiply.
Re:Faster remainders when the divisor is a constant: beating... by saagarjha on Saturday February 09, 2019 @04:14AM (#19121463)
As acqq/I have mentioned below, there are ways of telling the compiler that the overflow can't multiply so it can freely optimize these away.