Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The mantra you are questioning has actually been introduced by Backus et al themselves in the very description of Fortran. </p> <ul> <li><a href="http://archive.computerhistory.org/resources/text/Fortran/102663113.05.01.acc.pdf" rel="nofollow">The FORTRAN Automaic Coding System (1957)</a></li> </ul> <blockquote> <p>[The programmer] estimated that it might have taken three days to code this job by hand, plus an unknown time to debug it, and that no appreciable increase in speed of execution would have been achieved thereby.</p> </blockquote> <p>From the modern point of view, the problem with your question is not in evaluating a code produced by a compiler, but a code produced by a human. You just can rarely present a completely hand-written assembly code for a sufficiently large program.</p> <p>Nevertheless, in the situation where human beings only need to write a limited amount of code, such a comparison is possible. Consider for example:</p> <ul> <li><a href="http://www.cs.cornell.edu/ezick/publications/ezick03comparing/paper.pdf" rel="nofollow">Man vs. Machine : Comparing Handwritten and Compiler-generated Application-Level Checkpointing </a></li> </ul> <p>where only some pieces of code were generated by human and by compiler. Or</p> <ul> <li><a href="http://dent.cecs.uci.edu/~papers/compendium94-03/papers/1999/codes99/pdffiles/1_1.pdf" rel="nofollow">Development of an Optimizing Compiler for a Fujitsu Fixed-Point Digital Signal Processor</a></li> </ul> <p>where the code is generated for a DSP. And where hand-written code is good at sizes of tens or hundreds lines of C code, and a program of 800 lines of C code is considered large.</p> <p>Besides, there is a known issue of <a href="http://c2.com/cgi/wiki?SufficientlySmartCompiler" rel="nofollow">Sufficiently Smart Compiler</a>. Where, while in theory all the needed algorithms are well known, in practive, due to multiple reasons, compilers or compiler developers fail to apply them. A typical example of this problem is analyzed here:</p> <ul> <li><a href="http://polaris.cs.uiuc.edu/~garzaran/doc/pact11.pdf" rel="nofollow">An Evaluation of Vectorizing Compilers</a></li> </ul> <p>One well known example where compilers do an exceptionally bad job is in the heart of an interpreter loop.</p> <ul> <li><a href="http://article.gmane.org/gmane.comp.lang.lua.general/75426" rel="nofollow">Author of LuaJIT explains why compilers can't beat hand-coded assembly</a></li> </ul> <p>At some point the discussion has moved to the next stage: weather an automatically generated code generator produces as good code as a hand-written code generator.</p> <ul> <li><a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.49.5223&amp;rep=rep1&amp;type=pdf" rel="nofollow">Evaluation of Automatically-Generated Compilers</a></li> <li><a href="http://www.eecs.tufts.edu/~dias/dissertation/dissertation.pdf" rel="nofollow">Automatically Generating the Back End of a Compiler Using Declarative Machine Descriptions</a></li> </ul>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload