> What's to say that a computer program can't code assembly better than
> any human possibly could?  There are a ton of tasks that computers do
> thousands of times better than humans.  I think it makes perfect sense
> that code written in C can execute faster than human-written assembly
> code.

No compiler will ever do *all* of the optimizations
that are possible, because most optimizations are
NP-complete or even much worse. For example the
equivalance of boolean expressions is NP-complete.
Some potential optimizations (such as replacement
of data structures) may not even computable.
This is why humans must choose the algorithms and
data strucures.

Compilers are very good at *small, local optimizations*,
such as putting variables in registers, common
sub-expression elimination, and choosing the fastest
instructions. Compilers almost always
outperform humans on these tasks because compilers
consistently try every trick they know, and they
don't get tired.

Even way back in the 1970s, studies showed that
optimizers consistently outperformed humans on
these tasks, and back then, many people
still practiced doing assembler regularly.

Today, performance combines programmer and compiler
intelligence. Neither can replace the other.
Please use both.

Michael Wing

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

Reply via email to