3 ms·
The compiler only knows about the program and maybe statistical information about the data. The CPU knows about the actual data currently being processed. The
by std_throwaway 9y ago
The compiler only knows about the program and maybe statistical information about the data.
The CPU knows about the actual data currently being processed.
Therefore, the CPU can do more by using branch prediction and speculative execution. It is more expensive in terms of energy per computation but so far it was worth it. The CPU can also optimize old code on-the-fly.