June 05, 2002
I have heard in college digital logic classes that compiler technology is holding back the development of advanced processors such as multiprocessing systems, superscalar, etc that the compilers don't keep up in a way to bring these improvements to applications. Also, I have seen that it is really hard to write programs that you can optimize for many different processors and still keep up with development timetables. Especially in processor-intensive programs, I would like to see it be possible for compilers to be better at optimizing for different processors so that code will take advantage of advanced processor technology.

I'll give you an example. I have a Pentium 4 running Linux. You don't need
to read this article:
http://www.tech-report.com/etc/2001q1/sweeney-p4/
But inside it, there is mention by Tim Sweeney that:
"The P4 is a good architecture, it's just not a good architecture for any of
the current program executables on the market. It will take a while (a year
or two perhaps) for Visual C++ to catch up, and for game and applications
developers to recompile and ship new versions of their software that really
take advantage of the P4."

Now, this is a sad state of affairs. You will see that at the Seti@Home
download page:
http://www.setiathome.ssl.berkeley.edu/download.html that they don't have
builds for the Pentium 4 even though it would make the code run faster if it
were optimized for it. Now, Seti@Home is a number-crunching application
(That I have said would probably also make a good processor benchmark). If
they can't manage to churn out optimized versions for all processors, who
can?

I wonder if there can be something that would allow you to build optimized code for almost every platform in existance from the same code base, on any system. That is - building sparc code on a pentium computer, or vice-versa.

I hope people think really hard about platform optimization in the design of the D compilers (especially since this language is designed with cross-platform code development in mind).

Since I am not a compiler developer, but a mostly high-level programmer, I am not sure how you would go about making it easy for cross-platform optimization, but I know that building on systems other than the intended system is always a good thing to be able to do.

I think D should be created with this in mind. Perhaps compilers could have some kind of standardized cross-platform optimization plugin standard they can load and unload for various destination platforms.

In that case, it will also be necessary to make sure that differences in OSes don't affect the way the compiler handles directory layout of code and also text-file format.

Finally (on a slightly different note), I would like to see the ability for compilers to do distributed compilation and also built-in ability to take advantage of RAM to mirror directories during compiling without explicit RAM discs being created pre-compile.