Messages in this thread | | | Date | Mon, 02 Jun 2014 09:24:04 +0200 | From | Clemens Ladisch <> | Subject | Re: [PATCH] arch: ia64: kernel: palinfo.c: Optimization of the Code |
| |
Rickard Strandqvist wrote: > From what I know, AND is faster then modulo.
Which is why the compiler does this optimization automatically, if it can prove that it is correct.
> - if (i != 0 && (i%64) == 0) > + if (i != 0 && (i&63) == 0)
Did you prove that i cannot be negative?
Regards, Clemens
| |