Re: optimizing compiler against average assembly programmer.

Walter Banks <walter@bytecraft.com>
30 Jun 1997 00:07:25 -0400

          From comp.compilers

Related articles
optimizing compiler against iaverage assembly programmer. gclind01@starbase.spd.louisville.edu (1997-06-15)
Re: optimizing compiler against average assembly programmer. cef@geodseic.com (Charles Fiterman) (1997-06-19)
Re: optimizing compiler against average assembly programmer. tgl@netcom.com (1997-06-20)
Re: optimizing compiler against average assembly programmer. rboland@csi.uottawa.ca (Ralph Boland) (1997-06-24)
Re: optimizing compiler against average assembly programmer. dglaston@asc.corp.mot.com (Daniel Glastonbury) (1997-06-24)
Re: optimizing compiler against average assembly programmer. walter@bytecraft.com (Walter Banks) (1997-06-30)
Re: optimizing compiler against average assembly programmer. gclind01@starbase.spd.louisville.edu (1997-06-30)
Re: optimizing compiler against average assembly programmer. norman@kbss.bt.co.uk (Norman Hilton) (1997-06-30)
Re: optimizing compiler against average assembly programmer. debray@cs.arizona.edu (1997-06-30)
Re: optimizing compiler against average assembly programmer. cef@geodesic.com (Charles Fiterman) (1997-07-04)
Re: optimizing compiler against average assembly programmer. vkarvone@raita.oulu.fi (1997-07-04)
Re: optimizing compiler against average assembly programmer. rhyde@cs.ucr.edu (1997-07-04)
[11 later articles]
| List of all articles for this month |
From: Walter Banks <walter@bytecraft.com>
Newsgroups: comp.compilers,comp.lang.asm.x86
Date: 30 Jun 1997 00:07:25 -0400
Organization: Byte Craft Limited
References: 97-06-071 97-06-074
Keywords: assembler, optimize

Charles Fiterman wrote:
>
> The human should always win and here is why.
>
> First the human writes the whole thing in a high level language.
>
> Second he profiles it to find the hot spots where it spends
> its time.
>
> Third he has the compiler produce assembly for those small
> sections of code.
>
> Fourth he hand tunes them looking for tiny improvements over
> the machine generated code.
>
> The human wins because he can use the machine.




That algorithm will always win. However, take an non
trival assembly program and create algorithmically similar C
and the compiled results will very similiar often smaller.


Many of the compilers have reached the point where given
a non-trival problem and implementing it in a assembler
and in C the compiled code is very often better in both
size and execution time.


Your point is well taken. I have seen cases in some of the
compilers we have written where the compiler would generate
better code than I could. Mostly because the compiler remembered
all the side-effects of the instruction set as implemented by
the hardware.


Walter Banks
http://www.bytecraft.com
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.