Re: Code review request: small optimization to localtime.c
- From: Dag-Erling Smørgrav <des@xxxxxx>
- Date: Thu, 29 Nov 2007 15:50:07 +0100
"M. Warner Losh" <imp@xxxxxxxxxx> writes:
Please find enclosed some small optimizations. [...]
almost completely unrelated, but while you're at it:
if (__isthreaded != 0) {
__isthreaded is clearly (by its name) a predicate, comparing it
explicitly to 0 is redundant and disrupts my flow of thought when
reading the code. Instead of just reading "if is threaded", I have to
take a second to parse the expression and check which way the comparison
goes.
We already have a policy (unwritten as far as I know) of using explicit
comparisons for variables which are not clearly predicates, can we also
have one of *not* using explicit comparisons for those that are? And
document both cases in style(9)?
DES
--
Dag-Erling Smørgrav - des@xxxxxx
_______________________________________________
freebsd-arch@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@xxxxxxxxxxx"
- Follow-Ups:
- Re: Code review request: small optimization to localtime.c
- From: M. Warner Losh
- Re: Code review request: small optimization to localtime.c
- References:
- Code review request: small optimization to localtime.c
- From: M. Warner Losh
- Code review request: small optimization to localtime.c
- Prev by Date: Re: Removal of /etc/skel, your opinions please
- Next by Date: Re: Removal of /etc/skel, your opinions please
- Previous by thread: Re: Code review request: small optimization to localtime.c
- Next by thread: Re: Code review request: small optimization to localtime.c
- Index(es):
Relevant Pages
|
|