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

Discussion

A code generator that ignores machine idioms produces code that is

  • A.smaller but slower than code that uses them
  • B.correct but longer and slower than necessary
  • C.incorrect for programs using those operations
  • D.impossible to execute on the target machine

Answer: B

Correct answer: correct but longer and slower than necessary

Machine idioms - an increment instruction, an add with shift, a multiply-accumulate - do in one instruction what would otherwise take several. Ignoring them costs performance and code size but not correctness, since the longer sequence computes the same result.

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

Post your comment

Please log in or register to post a comment.