Machine-translated by Google. Questions are authored in English.
Top

Discussion

An optimising compiler cannot in general produce the fastest possible program because

  • A.optimal code generation is undecidable or intractable
  • B.the target machine specification is never fully available
  • C.the source language does not permit the necessary analysis
  • D.the programmer has not supplied enough type information

Answer: A

Even restricted forms of the problem are computationally hard. Real optimisers apply a sequence of heuristics that usually improve the program without any guarantee of optimality. Measuring the result on real programs is the only way to tune them.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.