forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit32cf7f7
committed
Improve performance of float overflow checks in btree_gist
The current code could do unnecessary calls to isinf() (two for theargument values all the time while one could be sufficient in somecases). zero_is_valid was never used but the result value was stillchecked on 0 in the first position of the check.This is similar to607f8ce. btree_gist has just copy-pasted the codedoing those checks from the backend float4/8 code, as of the macroCHECKFLOATVAL(), to do the work.Author: Haiying TangDiscussion:https://postgr.es/m/OS0PR01MB611358E3A7BC3C2F874AC36BFBF39@OS0PR01MB6113.jpnprd01.prod.outlook.com1 parent2576dcf commit32cf7f7
File tree
3 files changed
+8
-21
lines changed- contrib/btree_gist
3 files changed
+8
-21
lines changedLines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5 | 5 |
| |
6 | 6 |
| |
7 | 7 |
| |
| 8 | + | |
8 | 9 |
| |
9 | 10 |
| |
10 | 11 |
| |
| |||
98 | 99 |
| |
99 | 100 |
| |
100 | 101 |
| |
101 |
| - | |
| 102 | + | |
| 103 | + | |
102 | 104 |
| |
103 | 105 |
| |
104 | 106 |
| |
|
Lines changed: 5 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5 | 5 |
| |
6 | 6 |
| |
7 | 7 |
| |
| 8 | + | |
8 | 9 |
| |
9 | 10 |
| |
10 | 11 |
| |
| |||
76 | 77 |
| |
77 | 78 |
| |
78 | 79 |
| |
79 |
| - | |
80 |
| - | |
| 80 | + | |
| 81 | + | |
81 | 82 |
| |
82 | 83 |
| |
83 | 84 |
| |
| |||
106 | 107 |
| |
107 | 108 |
| |
108 | 109 |
| |
109 |
| - | |
| 110 | + | |
| 111 | + | |
110 | 112 |
| |
111 | 113 |
| |
112 | 114 |
| |
|
Lines changed: 0 additions & 17 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
89 | 89 |
| |
90 | 90 |
| |
91 | 91 |
| |
92 |
| - | |
93 |
| - | |
94 |
| - | |
95 |
| - | |
96 |
| - | |
97 |
| - | |
98 |
| - | |
99 |
| - | |
100 |
| - | |
101 |
| - | |
102 |
| - | |
103 |
| - | |
104 |
| - | |
105 |
| - | |
106 |
| - | |
107 |
| - | |
108 |
| - | |
109 | 92 |
| |
110 | 93 |
| |
111 | 94 |
| |
|
0 commit comments
Comments
(0)