Because many optimizations take exponential or worse
time to figure out if they apply. This means that
the sun would explode before your compile would finish.

Yes, compilers will get more sophisticated over time.
No, they will not replace any algorithms or data structures.

Michael Wing

> Why should a super-sophisticated compiler with algebraic type
> inference not be able to do this one day?
> 
> On Nov 22, 2007 12:36 AM, Dave Dyer <[EMAIL PROTECTED]> wrote:
> >
> > Arguments about the quality of compiler optimizations vs. hand coding
> > are pointless, because programmers optimize programs in ways that 
compilers
> > are (correctly) forbidden to do; by changing the algorithm.
> >
> > For example, if I happen to know "x" will always be an  integer
> > from 0 to 359, I can replace sin(x) with a table lookup.  No compiler
> > can ever do that, even if I include assert(x>=0 && x<360) in the code
> > somewhere (which would be a good idea even if I "know" it).
> >
> > _______________________________________________
> > computer-go mailing list
> > computer-go@computer-go.org
> > http://www.computer-go.org/mailman/listinfo/computer-go/
> >
> _______________________________________________
> computer-go mailing list
> computer-go@computer-go.org
> http://www.computer-go.org/mailman/listinfo/computer-go/
> 



-- 



_______________________________________________
computer-go mailing list
computer-go@computer-go.org
http://www.computer-go.org/mailman/listinfo/computer-go/

Reply via email to