lkml.org 
[lkml]   [1998]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Non-urgent issue with fs/isofs/util.c
Date
From
"Helge Hafting" <helge.hafting@daldata.no> said:

[...]

> The equivalent code
> if (!((year+2) & 3) && month > 2 && year != 130) is probably
> faster. The somewhat expensive mod operator is
> replaced by a bitwise "and", that is faster on most platforms.

... and your compiler knows that, and should replace the original code by
this one if warranted. Take a look at the assembly output for both
alternatives before proposing optimizations.
--
Dr. Horst H. von Brand mailto:vonbrand@inf.utfsm.cl
Departamento de Informatica Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria +56 32 654239
Casilla 110-V, Valparaiso, Chile Fax: +56 32 797513


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:44    [W:0.059 / U:4.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site