Definition
Instruction Cache
An instruction cache is a cache that stores instructions.
It is used during the fetch stage so that the next instruction can often be read faster than from main memory.
An instruction cache therefore helps the processor keep instruction fetch fast.
Prefetching
Definition
Link to originalInstruction Prefetching
Instruction prefetching is the speculative fetching of instructions into the instruction cache before they are demanded by the fetch stage. The goal is to hide the latency of main memory by ensuring instructions are already present in the cache when the PC reaches them.
The simplest form is sequential prefetching: after fetching cache line , also fetch line . This works well for straight-line code but fetches useless lines after a taken branch.