Measuring the benefit of operand reuse

An instrument processes 2400 independent measurement pairs. Each pair contains values A and B, each occupying 4 bytes in main memory. For every pair, the processor calculates U = A + B and V = A − B, then writes both results to main memory. Each result occupies 4 bytes.


Compare two specified implementations:

  • Implementation P reads A and B from main memory to calculate U, writes U, reads A and B again to calculate V, and writes V.
  • Implementation Q reads A and B once, keeps both available in processor registers while calculating both results, and writes U and V once each.

For this question, memory traffic means the total number of data bytes transferred between main memory and the processor. Count only the stated operand reads and result writes. Ignore instruction transfers and transfer overhead, and assume every stated read or write reaches main memory.


Find Q's operand-read traffic in bytes, P's total memory traffic in bytes, and the percentage reduction in total memory traffic when changing from P to Q. Give byte counts as exact integers and the percentage to one decimal place.


Main memory supplies operand reads to a processor and receives result writes from it.


Your answers

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Functional Units Questions: