2 ms·
Division is a lot more expensive than the multiplication itself, checking the overflow flag after the multiplication - which OP critizes for being too slow - is
by DasIch 12y ago
Division is a lot more expensive than the multiplication itself, checking the overflow flag after the multiplication - which OP critizes for being too slow - is going to be much faster than your check.