And If you, if you look let's say something which is a four kilo entry
version of this. That's pretty big actually.
But a four kilo entry branch history table with two bits per entry.
Now we're starting to get somewhere, we can get sort of 80 to 90 percent
prediction accuracy. So that's, that's starting to get us
there, and then we had to build. I don't know, eight kilobits worth of
storage. And we had to somehow pipe it into our
next PC logic. Which is kind of a sensitive path on our
processor. But, you know that's, that's can be
helpful in performance. So let's actually before I move off.
I want to make one, one point. There are other ways to organize this.
Table. So what we're really doing here is, we're
indexing into a table and we're, let's say running through some sort of finite state
machine decoder here, which tells us taken or not taken.
And that we're individually updating subentries of this table, for a particular
branch. You could think about having other things
to index into this table. So, either more complex cache functions,
or maybe some other history information, or maybe previous states or just some
other bits up here. So this is just a base cases.
We're gonna show some more exam-, more complicated examples for spatial
correlating predictors. But you, a lot of the ideas we are going
to talk about in spatial correlating predictor.
You could apply that to these temporal coordinating predictors.
But I just wanted to make that point that these things do what we're going to talk
about we're going to show more, much more sophisticate versions in our spatial
correlation predictors, but the you can apply level ideas back to these temporal
ones. Okay so let's look at spatial correlation.
We talked about temporal correlation. So, in time, one, one branch in the, and
the direction that one branch goes has a high probability that it's going to
influence or, or it's going to predict rather the, whether that branch in future
is going to be taken or not taken. That's, that's what is, a temporal
prediction is. A spatial prediction, what it's trying to
get at this, this, this piece of code here is that, if you have let's say one branch,
do something, the future branch that's, lets say right below it, is going to
somehow be correlated. So a good example case, and this is kind
of the canonical example here is, If you check this value, and it's less than
seven. It's also less than five.
And you get code like this relatively often.
So these, these. These branches are correlated.
But they're not the same branch. They're different branches.
This branch and this branch. So we're having some sort of spatial
correlation here, and we want to try to exploit this somehow.
And this was Yael Pats and, and one of his students came up with this, not that long
ago surprisingly. In the, in the, in the 90's.
And the idea here is that I don't know, we're gonna have an extra register.
We'll call a branch history register. Which will store whether previous branches
that we've executed were taken or not taken.
And then use that to index into some tables.
Or use that somehow to predict what's going on.