Re:Rust's unsafe pointer types need an overhaul
by zozbot234 on Sunday March 20, 2022 @12:19PM
(#30743965)
"Default" (static) prediction matters very little in modern processors though. Branch prediction is largely based on dynamic data about the actual program run.
[ Parent
| on HN ]
Re:Rust's unsafe pointer types need an overhaul
by titzer on Sunday March 20, 2022 @12:24PM
(#30744017)
They still do matter because programs are huge, with lots of cold and warm (not hot) code, and there are only so many branch prediction entries. Compilers have been tuned for several decades with this assumption in mind and processors, in turn, keep reinforcing it, because they keep running code produced by such compilers. It'll take some very extensive measurements to show that it is no longer the case.