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

Discussion

A program compiled without optimisation differs from one compiled with it in that the unoptimised program

  • A.cannot be debugged with a symbolic debugger
  • B.contains fewer instructions in the generated code
  • C.runs more slowly but computes the same results
  • D.may produce different results from the optimised version

Answer: C

Optimisation is meant to preserve behaviour exactly. A difference in results indicates either a compiler defect or a program relying on behaviour the language leaves undefined. The latter explanation is by far the more common of the two.

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

Post your comment

Please log in or register to post a comment.