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

Discussion

Branch prediction hints or code layout based on profile data aim to

  • A.eliminate every conditional branch from the program
  • B.guarantee that no branch is ever mispredicted
  • C.place the frequently executed path in consecutive locations
  • D.reduce the total number of instructions that the program contains

Answer: C

Correct answer: place the frequently executed path in consecutive locations

Laying the hot path out contiguously means the processor fetches ahead along it, branches are usually not taken, and cache lines are filled with code that will be executed. The cold paths are moved out of line. Nothing is removed from the program; what changes is where it sits.

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

Post your comment

Please log in or register to post a comment.