forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit4f658dc
committed
Support fls().
The immediate impetus for this is that Noah Misch's patch to elideunnecessary table and index rebuilds when changing typmod for temporaltypes uses it; and this is extracted from that patch, with somefurther commentary by me. But it seems logically separate from theremainder of the patch, so I'm committing it separately; this is notthe first time someone has wanted fls() in the backend and probablywon't be the last.If we end up using this in more performance-critical spots it may beworthwhile to add some architecture-specific optimizations to oursrc/port version of fls() - e.g. any x86 platform can implement thisusing the assembly instruction BSRL. But performance won't mattera bit for assessing typmod changes, so I'm not worried about thatright now.1 parentf7d7dad commit4f658dc
File tree
5 files changed
+74
-2
lines changed- src
- include
- port
5 files changed
+74
-2
lines changedLines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
20833 | 20833 |
| |
20834 | 20834 |
| |
20835 | 20835 |
| |
20836 |
| - | |
| 20836 | + | |
| 20837 | + | |
20837 | 20838 |
| |
20838 | 20839 |
| |
20839 | 20840 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1335 | 1335 |
| |
1336 | 1336 |
| |
1337 | 1337 |
| |
1338 |
| - | |
| 1338 | + | |
1339 | 1339 |
| |
1340 | 1340 |
| |
1341 | 1341 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
158 | 158 |
| |
159 | 159 |
| |
160 | 160 |
| |
| 161 | + | |
| 162 | + | |
| 163 | + | |
161 | 164 |
| |
162 | 165 |
| |
163 | 166 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
396 | 396 |
| |
397 | 397 |
| |
398 | 398 |
| |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
399 | 403 |
| |
400 | 404 |
| |
401 | 405 |
| |
|
Lines changed: 64 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + |
0 commit comments
Comments
(0)