[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Patch: FYI:

From: Jeroen Frijters
Subject: RE: Patch: FYI:
Date: Wed, 21 Jan 2004 11:57:44 +0100

Michael Koch wrote:
> > +    int len = path.length();
> > +    return len > 0 && beginWithRootPathPrefix(path) == len;
> just a thought but wouldnt it be cleaner to write this:
>    return (path.length() > 0 && beginWithRootPathPrefix(path) 
> == path.length();
> Compilers are/should be smart enough to optimize it to write 
> path.length into a register and use it twice.

I'm used to "caching" the method result in cases like these, so I find
it a little easier to parse mentally.

I don't have any overriding objections to writing it out though.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]