lkml.org 
[lkml]   [2014]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2014-06-02 10:21    [W:0.081 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site