Likely unlikely()s
Posted Dec 21, 2010 13:58 UTC (Tue) by
vonbrand (subscriber, #4458)
In reply to:
Likely unlikely()s by jzbiciak
Parent article:
Likely unlikely()s
It has been observed that programmers are terrible at guessing where their programs spend most of their time... and that should be much easier than predicting the frequency of some critical branch going one way or the other.
Best leave it alone, or only annotate when extensive measurements show a high bias (and the compiler gets it wrong).
(
Log in to post comments)