I understand what this does:
Built-in Function: long __builtin_expect (long exp, long c)
but I don't know how to determine if this actually has any effect on my processor.
Would this show up in the assembly?
I understand what this does:
Built-in Function: long __builtin_expect (long exp, long c)
but I don't know how to determine if this actually has any effect on my processor.
Would this show up in the assembly?
Effect of __builtin_expect
does not depend on target processor. Instead it informs compiler about the most likely branch outcome which allows it to generate better code (e.g. by speculatively executing operations before branch or scheduling instructions to favor expected path).
To summarize, __builtin_expect
always has effect, regardless of target architecture, and you should be able to see it in generated asm code.