|
|
|
|
|
by theoh
3724 days ago
|
|
There was a time (late 90s) when GCC would optimize conditionals in an asymmetric way. Somebody will hopefully correct me, but I think the advice was to make conditionals usually be true, for best performance. Since most coders would never hear about this asymmetry (though that's just my impression) it was a bizarre case of favoring one branch of a conditional over another for purely historical (machine code) reasons. |
|
Branch prediction isn't a GCC thing, it's a processor thing.
Observe this wonderful Stack Overflow question: http://stackoverflow.com/questions/11227809/why-is-processin...