P99

◆ P99_LIKELY

#define P99_LIKELY (   ...)    P99_EXPECT(!!(__VA_ARGS__), 1)

Mark the conditional expression as being likely.

This can be useful e.g to test the return value of printf.

Use with care, as humans are particularly bad at branch prediction. If unsure, first test your conditional for some time to see that the case is really as likely as you think.

See also
P99_EXPECT
P99_UNLIKELY
Examples
test-p99-pow.c.

Definition at line 1010 of file p99_compiler.h.