I think v1 is going to pretty universally require application-level fixes.
Intuition. But you could use performance counters to measure the rate of misses and estimate the impact, I think. Just add K*M where M is # of misses and K is pipeline stall + fetch cost.
-
-
I do not believe that intuition is a useful guide when estimating the interactions between, and impact of, changes to speculation and cache behaviour.
-
consider also that some speculative loads are benign, e.g.: if(cond) { arr[i] += 1; } else { arr[i] -= 1; } whichever path is speculated, the load is good.
-
In this case a good compiler can/should hoist the load out of the branches. So it doesn't matter if cpu can speculate it.
-
Not necessarily, because inc dword ptr [eax], for example, generates shorter code.
-
compare for example mov eax, dword ptr [ecx] test ebx, ebx je 1f inc eax jmp 2f 1: dec eax 2: mov dword ptr [ecx], eax test ebx, ebx je 3f inc dword ptr [ecx] jmp 4f 3: dec dword ptr [ecx] 4:
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.