forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit3ae7e4a
committed
Remove BufferBlockPointers array in favor of a base + (bufnum) * BLCKSZ
computation. On modern machines this is as fast if not faster, and wedon't have to clog the CPU's L2 cache with a tens-of-KB pointer array.If we ever decide to adopt a more dynamic allocation method for sharedbuffers, we'll probably have to revert this patch, but in the meantimewe might as well save a few bytes and nanoseconds. Per Qingqing Zhou.1 parentb609695 commit3ae7e4a
File tree
3 files changed
+7
-28
lines changed- src
- backend/storage/buffer
- include/storage
3 files changed
+7
-28
lines changedLines changed: 2 additions & 23 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
22 |
| - | |
| 22 | + | |
23 | 23 |
| |
24 | 24 |
| |
25 |
| - | |
26 |
| - | |
27 | 25 |
| |
28 | 26 |
| |
29 | 27 |
| |
| |||
154 | 152 |
| |
155 | 153 |
| |
156 | 154 |
| |
157 |
| - | |
158 |
| - | |
159 |
| - | |
160 | 155 |
| |
161 | 156 |
| |
162 | 157 |
| |
163 |
| - | |
164 |
| - | |
165 | 158 |
| |
166 | 159 |
| |
167 |
| - | |
168 |
| - | |
169 |
| - | |
170 |
| - | |
171 |
| - | |
172 |
| - | |
173 |
| - | |
174 |
| - | |
175 |
| - | |
176 |
| - | |
177 |
| - | |
178 |
| - | |
179 |
| - | |
180 |
| - | |
181 | 160 |
| |
182 | 161 |
| |
183 | 162 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
54 | 54 |
| |
55 | 55 |
| |
56 | 56 |
| |
57 |
| - | |
| 57 | + | |
58 | 58 |
| |
59 | 59 |
| |
60 | 60 |
| |
|
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
33 | 33 |
| |
34 | 34 |
| |
35 | 35 |
| |
36 |
| - | |
| 36 | + | |
37 | 37 |
| |
38 | 38 |
| |
39 | 39 |
| |
| |||
107 | 107 |
| |
108 | 108 |
| |
109 | 109 |
| |
110 |
| - | |
| 110 | + | |
111 | 111 |
| |
112 | 112 |
| |
113 | 113 |
| |
|
0 commit comments
Comments
(0)