pgsql: Add likely/unlikely() branch hint macros. - Mailing list pgsql-committers

From Andres Freund
Subject pgsql: Add likely/unlikely() branch hint macros.
Date
Msg-id E1bvBn6-0002DD-7Y@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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
later.

Discussion: <20160727004333.r3e2k2y6fvk2ntup@alap3.anarazel.de>

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/aa3ca5e3dd60bf0b992b74f955378f28e601292a

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


pgsql-committers by date:

Previous
From: Andres Freund
Date:
Subject: pgsql: Use more efficient hashtable for tidbitmap.c to speed up bitmap
Next
From: Andres Freund
Date:
Subject: pgsql: Add a macro templatized hashtable.