I’d like to start this post with a short quote from the article:
How can a compiler for a high order language beat assembly code in both size and performance? It is because of a reasonably high level of maturity on the part of both compiler technology in general and the compiler vendor in specific. When a vendor brings a wealth of experience to bear on the task of optimization, it goes beyond the capabilities of any one individual, no matter how experienced.
I wholeheartedly agree with that, and I think it is reasonable to expect that a compiler vendor will only get better at maintaining and improving on his product(s) as time passes. The above was originally written in 1992, in an article by Patricia K. Lawlis (PhD) and Terence W. Elam (PE, CMfgE) for the Proceedings of TRI-Ada ’92, Orlando, FL, November 16-20, Association for Computing Machinery (ACM), New York, 1992.
Here’s the abstract of the article:
With the intent of getting an Ada waiver, a defense contractor wrote a portion of its software in Ada to prove that Ada could not produce real-time code. The expectation was that the resultant machine code would be too large and too slow to be effective for a communications application. However, the opposite was verified. With only minor source code variations, one version of the compiled Ada code was much smaller while executing at approximately the same speed, and a second version was approximately the same size but much faster than the corresponding assembly code.
And here’s the link: Ada Outperforms Assembly: A Case Study.
It is a very interesting read, both for the historical and technical perspectives. And it doesn’t hurt either that Ada is shown in a very positive light. And to think; the compiler vendors have had almost 20 years since then to improve on their product!