Use branchless comparisons in btint4cmp and btint8cmp, for speed

The comment on pg_cmp_*() points out that the old form can produce
better code if the comparison is inlined, but that's not a concern
here because btint4cmp() and btint8cmp() are invoked through the
function manager and won't be inlined.

Author: David Geier <[email protected]>
Reviewed-by: Matthias van de Meent <[email protected]>
Reviewed-by: Kirill Reshke <[email protected]>
Reviewed-by: Japin Li <[email protected]>
Discussion: 
https://www.postgresql.org/message-id/[email protected]

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/41467b1d88303fbaea4ddd20c21ac4b8ce6b92d7

Modified Files
--------------
src/backend/access/nbtree/nbtcompare.c | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)

Reply via email to