Zen 5's 2-ahead branch predictor: how a 30 year old idea allows for new tricks
1–10 of 196 posts
Re: Zen 5's 2-ahead branch predictor: how a 30 year old idea allows for new tricks
#2Re: Zen 5's 2-ahead branch predictor: how a 30 year old idea allows for new tricks
#3why when we have a conditional branch we cannot just fetch and prepare instructions for both possible branches and then discard the incorrect one?
is this that much harder or there are other reasons that makes this not worth it
Re: Zen 5's 2-ahead branch predictor: how a 30 year old idea allows for new tricks
#4that's probably bad idea but I would like to learn why: why when we have a conditional branch we cannot just fetch and prepare instructions for both possible branches and then discard the incorrect one? is this that much harder or there are other reasons that makes this not worth it
Re: Zen 5's 2-ahead branch predictor: how a 30 year old idea allows for new tricks
#5For example Z-buffers[1]. It's used by 3d video games. When it's first published on paper, it's not even the main topic of the paper, just some side notes because it requires expensive amount of memory to run.
Turn out megabytes is quite cheap few decades latter, and every realtime 3d renderer ended up using it.
Re: Zen 5's 2-ahead branch predictor: how a 30 year old idea allows for new tricks
#6As a novice in this area, it's not clear to me after reading this what exactly the 2-ahead branch predictor is.
Re: Zen 5's 2-ahead branch predictor: how a 30 year old idea allows for new tricks
#7that's probably bad idea but I would like to learn why: why when we have a conditional branch we cannot just fetch and prepare instructions for both possible branches and then discard the incorrect one? is this that much harder or there are other reasons that makes this not worth it
Re: Zen 5's 2-ahead branch predictor: how a 30 year old idea allows for new tricks
#8It's always interesting to see decades old papers, sometimes published with little to no fanfares, suddenly becomes "state of the art" because hardware have become powerful enough. For example Z-buffers[1]. It's used by 3d video games. When it's first published on paper, it's not even the main topic of the paper, just some side notes because it requires expensive amount of memory to run. Turn out megabytes is quite c…
Re: Zen 5's 2-ahead branch predictor: how a 30 year old idea allows for new tricks
#9that's probably bad idea but I would like to learn why: why when we have a conditional branch we cannot just fetch and prepare instructions for both possible branches and then discard the incorrect one? is this that much harder or there are other reasons that makes this not worth it
As far as I can tell, branch predictors have always been too good for it to be worth it. Moderns CPUs have instruction reorder buffers that are hundreds of instructions deep, so even if only 8 of those instructions are conditional jumps, there's 256 different paths your program could take. If your branch predictor predicts all 8 correctly >50% of the time (It does), doing 256x the work to cover your ass is not worth it.
Re: Zen 5's 2-ahead branch predictor: how a 30 year old idea allows for new tricks
#10It's always interesting to see decades old papers, sometimes published with little to no fanfares, suddenly becomes "state of the art" because hardware have become powerful enough. For example Z-buffers[1]. It's used by 3d video games. When it's first published on paper, it's not even the main topic of the paper, just some side notes because it requires expensive amount of memory to run. Turn out megabytes is quite c…
I sometimes wonder if there’s an academic career hidden in there for an engineer: go to the library and read what the CS folks were publishing on physical papers, maybe there are some ideas that can actually be implemented now that weren’t practical back then.