[net.lang.c] CMU technical report on C language efficiency

warren@ihnss.UUCP (10/26/83)

A while back, I posted a news item on having read an interesting
report with C program timings and discussion of optimization of code
on the vax.  I have gotten 3 requests for how to get the report, all
from sites for which I doubt that the return mail path works.  My
answer is, unfortunately, I am not sure.  I suspect that CMU sells
or gives technical reports to the general public, as MIT does. 
Maybe some CMU person or graduate on the net could confirm this. 
Once again, the report is

CMU-CS-82-134

It is from 

Department of Computer Science
Carnegie Mellon University

(I believe they are in Pittsburgh, but I don't have a mailing
address.)

-- 

	Warren Montgomery
	ihnss!warren
	IH x2494

chris@umcp-cs.UUCP (10/27/83)

An interesting thing they found was that

	i--;

ran slower than

	i -= 1;

They thought that was strange, so they looked at the assembly output.
It was the same for both statements.  The reason i -= 1 ran faster was
that it was on a longword boundary.

Just goes to show that when you're looking too hard for efficency,
you're probably going to find the wrong thing.  Or, as Jon Bentley of
Bell Labs says, "People who deal with bits should expect to get bitten."

(Sorry if I misspelled your name there.)
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci
UUCP:	{seismo,allegra,brl-bmd}!umcp-cs!chris
CSNet:	chris@umcp-cs		ARPA:	chris.umcp-cs@CSNet-Relay