|Effectiveness of compilers today email@example.com (1993-02-14)|
|Effectiveness of compilers firstname.lastname@example.org (1993-02-19)|
|From:||email@example.com (Mike Albaugh)|
|Date:||Fri, 19 Feb 1993 18:03:51 GMT|
ANDREAS ARFF (firstname.lastname@example.org) wrote:
: Could someone tell me more about this. Are there any tests between common
: compilers and assembler programmers. Who is the best?
In my experience with "simple" chips (68K, pdp11) there are three
Human "tweaks" assembly code output from compiler. This tends to
improve (or worsen) by the oft-quoted 10%.
Human attempts to hand-compile significant piece of code directly
from HLL. This sometimes gets a gain of 2x, but can also be a disaster, as
human error takes its toll. On simpler chips, sufficient rigor can usually
make it work, but I wouldn't even attempt it on something like the i860.
Human re-thinks algorithm in terms not constrained by the HLL.
This is where impressive gains can be made. My personal best data point is
an eight-fold improvement in a data-decompression routine. This was
measured against the "tweaked" output of a C compiler, and
accepted/produced the same data format dictated by the C version, so
correctness was relatively easy to determine. Implementing the same
algorithm in C was slower than the original, as it involved bit-pointers,
rotates, and co-routining. This is not to say that I was using any
particular feature of the specific chip (68k), but rather the sort of
operations that are common to a lot of chips, but difficult to express in
C. No, Herman, you don't need to add to this :-)
The major problem with the perennial flame war is that it seems to
end up being cast as a battle between a _particular_ HLL (usually C, on
UseNet) and the grubbiest sort of "speed at any price" bit-twiddling. I
almost never code in octal, but rely on an "industrial strength" macro-
assembler and, when needed, write special-purpose programs to generate the
"assembly" code. Yes, sometimes I write directly in assembly, but only the
expectation that the code I write will go into a _lot_ of ROMS, or dire
need (Trap handlers come to mind) is sufficient to get me to do much of
that sort of thing...
Of course, _sometimes_ I write in assembly for _fun_ :-)
| Mike Albaugh (email@example.com || netcom.com!agames.com!albaugh)
| Atari Games Corp (Arcade Games, no relation to the makers of the ST)
| 675 Sycamore Dr. Milpitas, CA 95035 voice: (408)434-1709
Return to the
Search the comp.compilers archives again.