Newsgroups: | comp.compilers |
From: | dmr@alice.att.com (Dennis Ritchie) |
Keywords: | C, performance, assembler |
Organization: | AT&T Bell Laboratories, Murray Hill NJ |
References: | 93-10-104 93-10-129 |
Date: | Tue, 2 Nov 1993 04:51:31 GMT |
The only time I recall remarking in print on the relative performance of
assembler vs. C was in the BSTJ `Retrospective' paper of 1978:
Compared to the benefits, the costs of using
a high-level language seem negligible...the object
programs seem somewhat larger.... It is hard to
estimate the average increase in size, because in
rewriting it is difficult to resist the opportunity
to redesign....A typical inflation factor for a
well-coded C program would be about 20 to 40 percent.
The decrease in speed is comparable, but can sometimes
be larger, mainly because subroutine linkage tends to
be more costly....
The above guesses of space and time inflation for C
programs are not based on any comprehensive study.
This waffles, but I don't disavow it. I especially stand by the next
part:
Although such a study might be interesting, it would
be somewhat irrelevant, in that no matter what the
results turned out to be, they would not cause us
to start writing assembly language. The operating
system and the important programs that run under it are
acceptably efficient as they are.
That was 1978, this is 1993, folks.
Dennis Ritchie
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.