Re: Code optimization <LEA Instruction>

From: Jamie Lokier (lkd@tantalophile.demon.co.uk)
Date: Sun Jan 30 2000 - 17:34:49 EST


Jeffrey B. Siegal wrote:
> Jamie Lokier wrote:
> > Not necessarily. The smallest instructions tend to be more complicated
> > and expand to more basic operations, so decoding cost _may_ be reduced,
> > but the next step in translation, and the area used in the cache, and
> > the execution time, may be longer.
>
> -Os doesn't just use the smallest instructions (and note my use of the phrase
> "or something like it"; it also indicates to the compiler that it should
> generate *fewer* instructions. Fewer instructions means faster translation
> and it also means more of the program can fit into the translation cache.

Fewer instructions doesn't always mean fewer operations.

> There is a cooperative relationship between high level code generation
> and low level translation. Currently gcc is optimized to generate
> code for conventional processors, and Crusoe is optimized to translate
> code generated for conventional processors, so the two are roughly in
> sync. But I suspect there is a much better equilibrium that has not
> yet been identified.

Many agree.

IMHO the optimal equilibrium point is not static -- best performance
will result from extending the dynamic compilation idea out onto
executables stored on disk, deep into the dynamic translation process
itself (self optimisation), and with software distribution being more of
an interactive conversation than a one-way download.

It's complicated to imagine it running but it may be less complicated to
program than what we do now in our static environments.

have a nice day,
-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jan 31 2000 - 21:00:26 EST