Re^2: Another silly question

Doug Gwyn gwyn at smoke.BRL.MIL
Sat Apr 29 12:42:46 AEST 1989


In article <10160 at smoke.BRL.MIL> gwyn at brl.arpa (Doug Gwyn) writes:
>What you should write is simply
>	if ( p2 - p1 < p4 - p3 )

I forgot to say why.  Although this might result in generated code that
does unnecessary work, on the other hand it might not.  Concern for such
low-level "microefficiency" is nearly always misplaced.  If this
particular test occurred in bottleneck code, then it might be worthwhile
to tweak it, but in the vast majority of cases the visually simpler code
is preferable.



More information about the Comp.lang.c mailing list