advice statement

gwyn at BRL-VLD.ARPA gwyn at BRL-VLD.ARPA
Mon Aug 27 17:18:05 AEST 1984


From:      Doug Gwyn (VLD/VMB) <gwyn at BRL-VLD.ARPA>

C really doesn't need bells and whistles.  In the case of the "percentage
true", do you contemplate extending this to loop breaks, etc. too?  Why
not just comment your code if you care about reader understanding:
	while ( root != next_root /* 90% */ )
		...
The amount of speed improvement possible by letting the optimizer know
which outcome of a test is more likely is miniscule indeed.  The latest
PCC will generate extra loop condition tests at both the "top" and the
"bottom" of do & while loops when appropriate, which saves a very small
amount of loop overhead comparable to worrying about percentage trues.



More information about the Comp.lang.c mailing list