forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit40b0c10
committed
Replace insertion sort in contrib/intarray with qsort().
It's all very well to claim that a simplistic sort is fast in easycases, but O(N^2) in the worst case is not good ... especially if theworst case is as easy to hit as "descending order input". Replace thatbit with our standard qsort.Per bug #12866 from Maksym Boguk. Back-patch to all active branches.1 parent396ef6f commit40b0c10
1 file changed
+25
-26
lines changedLines changed: 25 additions & 26 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
195 | 195 |
| |
196 | 196 |
| |
197 | 197 |
| |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
198 | 218 |
| |
199 |
| - | |
| 219 | + | |
200 | 220 |
| |
201 | 221 |
| |
202 | 222 |
| |
203 |
| - | |
204 |
| - | |
205 |
| - | |
206 |
| - | |
207 |
| - | |
208 |
| - | |
209 |
| - | |
210 |
| - | |
211 |
| - | |
212 |
| - | |
213 |
| - | |
214 |
| - | |
215 |
| - | |
216 |
| - | |
217 |
| - | |
218 |
| - | |
219 |
| - | |
220 |
| - | |
221 |
| - | |
222 |
| - | |
223 |
| - | |
224 |
| - | |
225 |
| - | |
226 |
| - | |
227 |
| - | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
228 | 226 |
| |
229 | 227 |
| |
230 | 228 |
| |
| 229 | + | |
231 | 230 |
| |
232 | 231 |
| |
233 | 232 |
| |
|
0 commit comments
Comments
(0)