Re: Non-urgent issue with fs/isofs/util.c

Matthew Kirkwood (weejock@ferret.lmh.ox.ac.uk)
Fri, 18 Sep 1998 10:19:13 +0100 (GMT)


On Fri, 18 Sep 1998, Helge Hafting wrote:

> >I don't think we need to be to concerned right now, but changing:
> > if (((year+2) % 4) == 0 && month > 2)
> >to:
> > if (((year+2) % 4) == 0 && month > 2 && year != 130) should
> >fix it.

> 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.

gcc would do that anyway.

Matthew.

-
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/