News for hackers. Stuff that matters.
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.
Re:Rust's unsafe pointer types need an overhaul by zozbot234 on Sunday March 20, 2022 @12:55PM (#30744314)
The fact that modern CPU architectures in general have abandoned custom prediction hints suggests that static branch prediction is being viewed as less important.
Re:Rust's unsafe pointer types need an overhaul by titzer on Sunday March 20, 2022 @06:23PM (#30747326)
Sure, but default "predict not-taken" is a very decent zero-cost heuristic that hardware will probably keep using for the foreseeable future.