|Folk Theorem: Assemblers are superior to Compilers firstname.lastname@example.org (1993-10-24)|
|re: Folk Theorem: Assemblers are superior to Compilers email@example.com (1993-10-27)|
|Re: Folk Theorem: Assemblers are superior to Compilers firstname.lastname@example.org.OZ.AU (1993-10-28)|
|Re: re: Folk Theorem: Assemblers are superior to Compilers email@example.com (1993-10-27)|
|Re: Folk Theorem: Assemblers are superior firstname.lastname@example.org (1993-11-02)|
|From:||email@example.com (Jean Mehat)|
|Keywords:||performance, assembler, comment|
|Date:||Wed, 27 Oct 1993 01:54:54 GMT|
Mike Elliott <firstname.lastname@example.org> wrote:
> Folk Theorems:
>[assember code is 1) faster and 2) smaller than compiler code]
>So . . . compiler weenies of the world . . . can you help me out with
>citations which refute (or for that matter, support) these folk theorems?
I think these folk theorems may as well be true. I thought at first that
it may be false when the processor is designed for the compiler (like the
RISC delayed branch), but I think it's just that no one, except a
compiler's writer, cares to use delayed branch ; with reasonable training,
anyone should be able to use it like a compiler.
At least for C, what makes the compiler (relatively) inefficient is that
the functions are compiled independently. It forbids register allocation
across function calls. It constrains the compiler to make pessimistic
assumptions on the register usage by the called functions. Didn't Ritchie
accounted for a 10% loss when the Unix kernel was rewritten in C?
The real point is that it takes much longer to write an assembler program,
it's easier to make bugs, it's more difficult to understand and to
maintain. These are the good reasons to use a decent high level language.
Jean Mehat, universite de Paris 8 Vincennes a Saint Denis,
email@example.com, (1) 49 40 64 03, (1) 49 40 67 83 (fax)
[There are compilers that do interprocedure register allocation, but you
don't see a whole lot of them on PCs. Again, the irregular register set
complicates an already difficult task. -John]
Return to the
Search the comp.compilers archives again.