I am new to assembly language and cache design and recently our professor gave us a question about writing assembly language instructions to make computers with specific cache design run faster. I have no clue how to use assembly to improve performance. Can I get any hints?
The two cache designs are like this:
Cache A: 128 sets, 2-way set associative, 32-byte blocks, write-through, and no-write-allocate. Cache B: 256 sets, direct-mapped, 32-byte blocks, write-back, and write-allocate.
The question is:
Describe a little assembly language program snippet, two instructions are sufficient, that makes Computer A (uses the Cache A design) run as much faster as possible than Computer B (uses the Cache B design).
And there is another question asking the opposite:
Write a little assembly language program snippet, two instructions is sufficient, that makes Computer B run as much faster as possible than Computer A.