pgsql: Use branchless comparisons in btint4cmp and btint8cmp, for speed

Поиск
Список
Период
Сортировка
Искать

pgsql: Use branchless comparisons in btint4cmp and btint8cmp, for speed

От:
Heikki Linnakangas <heikki.linnakangas@iki.fi>
Дата:
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 
Reviewed-by: Matthias van de Meent 
Reviewed-by: Kirill Reshke 
Reviewed-by: Japin Li 
Discussion: https://www.postgresql.org/message-id/5d366878-2007-4d31-861e-19294b7a583b@gmail.com

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(-)

FAQ