logoalt Hacker News

rayinertoday at 2:20 PM2 repliesview on HN

Using random values defeats the purpose of the branch predictor. The best branch predictor for this test would be one that always predicts the branch taken or not taken.


Replies

gpderettatoday at 3:07 PM

The author is running the benchmark multiple times with the same random seed to discover how long a pattern can the predictor learn.

dundarioustoday at 2:52 PM

There will be runs of even and runs of odd outputs from the rng. This benchmark tests how well does the branch predictor "retrain" to the current run. It is a good test of this adaptability of the predictor.

The benchmark is still narrow in focus, and the results don't unequivocally mean AMD's predictor is overall "the best".