[Info-vax] Anyone still around ? :-)
Arne Vajhøj
arne at vajhoej.dk
Wed Oct 9 18:55:41 EDT 2019
On 10/8/2019 10:19 AM, osuvman50 at gmail.com wrote:
> I was considering making a post about the failure of the C compiler's optimizer
> to recognize and optimize the pattern:
>
> choice = permutation % (CARDS_IN_DECK-i);
> permutation = permutation / (CARDS_IN_DECK-i);
>
> but didn't think I'd get any constructive responses. (refactoring to eliminate a
> divide makes the whole program run 18% faster on both alpha and IA64).
What happens if you use stdlib.h div?
Arne
More information about the Info-vax
mailing list