News for hackers. Stuff that matters.
Re:CPU branch prediction evolution over years by cellularmitosis on Sunday January 01, 2023 @03:49AM (#34204760)
Hopefully others can correct me here, but my intuition is that the lower bound of performance would be determined by the pipeline length. I.e. if your instruction pipeline was 8 stages, worst-case scenario is flushing the pipeline on every instruction, which would cause it to run at 1/8th speed. (At one point I believe the Pentium 4 had a twenty-stage pipeline, yikes!).

In practice, branches aren't every instruction, so the impact will be less.

Re:CPU branch prediction evolution over years by coder543 on Sunday January 01, 2023 @11:26AM (#34207646)
> At one point I believe the Pentium 4 had a twenty-stage pipeline, yikes!

Modern pipeline lengths aren't documented publicly as often as they could be, but Zen 1 was a 19 stage pipeline, and it performed great for the time. But, I think Pentium 4's full pipeline was 31 stages. Regardless, I think CPU designers these days have better tools and techniques for dealing with long pipelines.