forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit036297c
committed
Pack struct ParsedWord more tightly.
In a 64-bit build there's an awful lot of useless pad space inParsedWords. Since we may allocate large arrays of these,it's worth some effort to reduce their size.Here we reduce the alen field from uint32 to uint16, and then re-orderthe fields to avoid unnecessary padding. alen is only used toremember the allocated size of the apos[] array, which is not allowedto exceed MAXNUMPOS (256) elements, so uint16 is plenty of space forit. That gets us from 40 bytes to 24 on 64-bit builds, and from 20bytes to 16 on 32-bit builds.Per discussion of bug #18080. Unfortunately this is an ABI breakso we can't back-patch.Discussion:https://postgr.es/m/1146921.1695411070@sss.pgh.pa.us1 parentcf1c650 commit036297c
1 file changed
+3
-3
lines changedLines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
81 | 81 |
| |
82 | 82 |
| |
83 | 83 |
| |
| 84 | + | |
84 | 85 |
| |
85 | 86 |
| |
| 87 | + | |
86 | 88 |
| |
87 | 89 |
| |
88 | 90 |
| |
89 | 91 |
| |
90 | 92 |
| |
91 | 93 |
| |
92 | 94 |
| |
93 |
| - | |
| 95 | + | |
94 | 96 |
| |
95 | 97 |
| |
96 | 98 |
| |
97 |
| - | |
98 | 99 |
| |
99 |
| - | |
100 | 100 |
| |
101 | 101 |
| |
102 | 102 |
| |
|
0 commit comments
Comments
(0)