summaryrefslogtreecommitdiff
path: root/contrib/btree_gist/btree_utils_num.h
diff options
context:
space:
mode:
authorAndres Freund2017-12-13 00:32:31 +0000
committerAndres Freund2017-12-13 00:55:37 +0000
commit101c7ee3ee847bac970c74b73b4f2858484383e5 (patch)
tree0e2c14000aa86975fbb36fb36470f54251b83b54 /contrib/btree_gist/btree_utils_num.h
parent4d6ad31257adaf8a51e1c4377d96afa656d9165f (diff)
Use new overflow aware integer operations.
A previous commit added inline functions that provide fast(er) and correct overflow checks for signed integer math. Use them in a significant portion of backend code. There's more to touch in both backend and frontend code, but these were the easily identifiable cases. The old overflow checks are noticeable in integer heavy workloads. A secondary benefit is that getting rid of overflow checks that rely on signed integer overflow wrapping around, will allow us to get rid of -fwrapv in the future. Which in turn slows down other code. Author: Andres Freund Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'contrib/btree_gist/btree_utils_num.h')
-rw-r--r--contrib/btree_gist/btree_utils_num.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/contrib/btree_gist/btree_utils_num.h b/contrib/btree_gist/btree_utils_num.h
index 17561fa9e4e..d7945f856c8 100644
--- a/contrib/btree_gist/btree_utils_num.h
+++ b/contrib/btree_gist/btree_utils_num.h
@@ -89,8 +89,6 @@ typedef struct
#define GET_FLOAT_DISTANCE(t, arg1, arg2) Abs( ((float8) *((const t *) (arg1))) - ((float8) *((const t *) (arg2))) )
-#define SAMESIGN(a,b) (((a) < 0) == ((b) < 0))
-
/*
* check to see if a float4/8 val has underflowed or overflowed
* borrowed from src/backend/utils/adt/float.c