Add likely/unlikely() branch hint macros.

These are useful for very hot code paths. Because it's easy to guess
wrongly about likelihood, and because such likelihoods change over time,
they should be used sparingly.

Past tests have shown it'd be a good idea to use them in some places,
e.g. in error checks around ereports that ERROR out, but that's work for

Discussion: <>



Modified Files
src/include/c.h | 16 ++++++++++++++++
1 file changed, 16 insertions(+)

Sent via pgsql-committers mailing list (
To make changes to your subscription:

Reply via email to