From: Scott Nudds
Subject: Re: design a city oriented to
Date: 
Message-ID: <8foh7j$4nb@james.hwcn.org>
(Kirk Is) wrote:
> But seriously, I think while compilers and proccessors can do some
> tweaking, making a compiler that could do *that* level of optimization is
> a *seriously* difficult AI problem.  I almost wonder if you'd get into
> territory of the Halting Problem.

  Optimization is an intractible problem.  That's why compilers are so
pathetic at optimization, and why hardware is designed to make it easier
for compilers to optimize rather than the other way around.

  It is still typical for compilers to produce code that is on average 4
times slower and 4 times larger than need be.

-- 
<---->
From: Kirk Is
Subject: Re: design a city oriented to
Date: 
Message-ID: <sgST4.164$m26.3665@news.tufts.edu>
Scott Nudds (·····@james.hwcn.org) wrote:
> (Kirk Is) wrote:
> > But seriously, I think while compilers and proccessors can do some
> > tweaking, making a compiler that could do *that* level of optimization is
> > a *seriously* difficult AI problem.  I almost wonder if you'd get into
> > territory of the Halting Problem.

>   Optimization is an intractible problem.  That's why compilers are so
> pathetic at optimization, and why hardware is designed to make it easier
> for compilers to optimize rather than the other way around.

Well, more to the point, a compiler being really smart about what can be
done in parallel seems difficult. At least, massively parallel; I suppose
I could see a compiler, by careful inspection of where variables interact,
do some 'threading' to take advantage of multiple proccesors, but it's
more of a hack than anything else.

>   It is still typical for compilers to produce code that is on average 4
> times slower and 4 times larger than need be.

Really?  Where do you get that figure?  I thought I had heard that some
optimizing compilers were getting very good, so good that handtweaking ASM
was going to become obsolete. (And of course, since it's getting to the
point where for the majority of programs, developer time is more valuable
the processor cycles...)

And what is that 4 figure in relation to? Human hand optimization of the
code?


-- 
Kirk Israel   [spamblock in effect, use ····@alienbill.com]
"I tell you, we are here on Earth to fart around, 
 and don't let anybody tell you any different." --Kurt Vonnegut