Linked by Thom Holwerda on Mon 31st Oct 2005 14:07 UTC, submitted by jmony
Thread beginning with comment 53746
To view parent comment, click here.
To read all comments associated with this story, please click here.
To view parent comment, click here.
To read all comments associated with this story, please click here.





Member since:
You are correct that a human can effectively beat a compiler at doing optimizations--as witnessed by what Michael Abrash did with id in meshing integer and floating point operations for maximum throughput.
The problem is that it is resource intensive. A compiler can only deal with what is there in the code--it can't adjust algorithms or data structures for optimum register usage or maximum pipeline throughput--but it can apply the few optimizations that it knows about very quickly. This is the foundation of Knuth's saying that premature optimization is the root of all evil. Adjusting the code for maximum through-put is a waste of time if you're implementing a slow algorithm. It's typically better to know what code your compiler emits, pick your algorithms appropriately, profile what you generate, and hand optimize where it counts.
And when they have a working system, they can't make any valid performance claims against anyone else because every other operating system out there uses memory protection, separates the user from the kernel, and gives processes their own address space which, as the developers know, causes major performance hits.