Try the 30-day free trial https://brilliant.org/kimylamp/. And get an annual premium subscription with 20% discount. A small branch prediction experiment. 00:00 Risc-v asm of “if” condition. “Branch if equal”. 01:21 Pipeline stages overview. 02:09 “Branch-if-equal” in the pipeline. 02:50 A condition check is very late. 03:32 More pipeline stages. 03:45 Predicting the correct path? 03:58 Let’s try to estimate some conditional branches statistics. 04:35 The first branch prediction idea. The same as the last time. 05:11 Loops. How many mispredictions? 06:06 Twice-in-a-row idea. 06:24 Real test on my CPU. 06:50 Let’s collect a trace. 07:20 Risc-v simulator from github. 08:14 Let’s use python. 09:05 Injecting prints into cpython code. 10:27 Reading the trace with pandas. Some statistics. 13:23 Trying some strategies. 14:45 A real branch predictor is limited in table entries 15:17 Branch Target Buffer