|Assembly verses a high-level language. email@example.com (1995-11-20)|
|Re: Assembly verses a high-level language. firstname.lastname@example.org (1995-11-22)|
|Re: Assembly verses a high-level language. email@example.com (1995-11-28)|
|Re: Assembly verses a high-level language. firstname.lastname@example.org (1995-11-29)|
|Re: Assembly verses a high-level language. Graham.Matthews@pell.anu.edu.au (Graham Matthews) (1995-11-29)|
|Re: Assembly verses a high-level language. john_reiser@MENTORG.COM (1995-12-09)|
|Re: Assembly verses a high-level language. email@example.com (1995-12-09)|
|From:||firstname.lastname@example.org (Robert A Duff)|
|Organization:||The World Public Access UNIX, Brookline, MA|
|Date:||Tue, 28 Nov 1995 16:12:49 GMT|
Stavros Macrakis <email@example.com> wrote:
>All this said, there is no guarantee than an assembly program will be
>faster than a compiled program.
My experience is that assembly language is often more efficient at
first, but after a few years of maintenance, it becomes less efficient.
I've seen cases where a large assembly language program was rewritten in
a high-level language, for portability, or ease of maintenance, and
everybody was surprised that in addition to those expected benefits, the
I suppose the performance of programs in any language would typically
tend to deteriorate during maintenance, unless one is very careful, but
it seems to me that with assembly language, it deteriorates faster. I
can think of two reasons:
First, if I modify a line of code in a procedure written in Ada or C or
whatever, the compiler will re-optimize that entire procedure. For
example, it will redo register allocation. In assembly, the original
coder might have done a better job of register allocation than a
compiler, but when a line of code is modified, the programmer is
unlikely to rewrite the entire procedure doing register allocation from
scratch -- to do so would risk introducing additional bugs.
Second, as new versions of the same machine come out, the relative
timing of various instructions may change, so various "clever tricks"
done for speed in the original assembly code might actually become
slower than alternative code sequences. With a high level language, it
is often feasible to recompile with a newer version of the compiler,
whereas with assembly, it is unlikely to be feasible to rewrite the
Return to the
Search the comp.compilers archives again.