forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commite530be9
committed
Remove duplicate reads from the inner loops in generic atomic ops.
The pg_atomic_compare_exchange_xxx functions are defined to update*expected to whatever they read from the target variable. Therefore,there's no need to do additional explicit reads after we've initializedthe "old" variable. The actual benefit of this is somewhat debatable,but it seems fairly unlikely to hurt anything, especially since wewill override the generic implementations in most performance-sensitivecases.Yura Sokolov, reviewed by Jesper Pedersen and myselfDiscussion:https://postgr.es/m/7f65886daca545067f82bf2b463b218d@postgrespro.ru1 parent34ae182 commite530be9
1 file changed
+24
-48
lines changedLines changed: 24 additions & 48 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
170 | 170 |
| |
171 | 171 |
| |
172 | 172 |
| |
173 |
| - | |
174 |
| - | |
175 |
| - | |
176 |
| - | |
177 |
| - | |
178 |
| - | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
179 | 176 |
| |
180 | 177 |
| |
181 | 178 |
| |
| |||
186 | 183 |
| |
187 | 184 |
| |
188 | 185 |
| |
189 |
| - | |
190 |
| - | |
191 |
| - | |
192 |
| - | |
193 |
| - | |
194 |
| - | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
195 | 189 |
| |
196 | 190 |
| |
197 | 191 |
| |
| |||
211 | 205 |
| |
212 | 206 |
| |
213 | 207 |
| |
214 |
| - | |
215 |
| - | |
216 |
| - | |
217 |
| - | |
218 |
| - | |
219 |
| - | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
220 | 211 |
| |
221 | 212 |
| |
222 | 213 |
| |
| |||
227 | 218 |
| |
228 | 219 |
| |
229 | 220 |
| |
230 |
| - | |
231 |
| - | |
232 |
| - | |
233 |
| - | |
234 |
| - | |
235 |
| - | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
236 | 224 |
| |
237 | 225 |
| |
238 | 226 |
| |
| |||
261 | 249 |
| |
262 | 250 |
| |
263 | 251 |
| |
264 |
| - | |
265 |
| - | |
266 |
| - | |
267 |
| - | |
268 |
| - | |
269 |
| - | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
270 | 255 |
| |
271 | 256 |
| |
272 | 257 |
| |
| |||
357 | 342 |
| |
358 | 343 |
| |
359 | 344 |
| |
360 |
| - | |
361 |
| - | |
362 |
| - | |
363 |
| - | |
364 |
| - | |
365 |
| - | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
366 | 348 |
| |
367 | 349 |
| |
368 | 350 |
| |
| |||
382 | 364 |
| |
383 | 365 |
| |
384 | 366 |
| |
385 |
| - | |
386 |
| - | |
387 |
| - | |
388 |
| - | |
389 |
| - | |
390 |
| - | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
391 | 370 |
| |
392 | 371 |
| |
393 | 372 |
| |
| |||
398 | 377 |
| |
399 | 378 |
| |
400 | 379 |
| |
401 |
| - | |
402 |
| - | |
403 |
| - | |
404 |
| - | |
405 |
| - | |
406 |
| - | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
407 | 383 |
| |
408 | 384 |
| |
409 | 385 |
| |
|
0 commit comments
Comments
(0)