forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit05b4293
committed
Minor speed hacks in AllocSetReset: avoid clearing the freelist headers
when the blocks list is empty (there can surely be no freelist items ifthe context contains no memory), and use MemSetAligned not MemSet toclear the headers (we assume alignof(pointer) >= alignof(int32)).Per discussion with Atsushi Ogawa. He proposes some further hackingthat I'm not yet sold on, but these two changes are unconditional winssince there is no case in which they make things slower.1 parent0ff7a2c commit05b4293
1 file changed
+10
-4
lines changedLines changed: 10 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
14 |
| - | |
| 14 | + | |
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
| |||
395 | 395 |
| |
396 | 396 |
| |
397 | 397 |
| |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
398 | 402 |
| |
399 |
| - | |
| 403 | + | |
| 404 | + | |
400 | 405 |
| |
401 | 406 |
| |
402 | 407 |
| |
403 |
| - | |
| 408 | + | |
404 | 409 |
| |
405 | 410 |
| |
406 | 411 |
| |
| |||
427 | 432 |
| |
428 | 433 |
| |
429 | 434 |
| |
| 435 | + | |
430 | 436 |
| |
431 | 437 |
| |
432 | 438 |
| |
| |||
451 | 457 |
| |
452 | 458 |
| |
453 | 459 |
| |
454 |
| - | |
| 460 | + | |
455 | 461 |
| |
456 | 462 |
| |
457 | 463 |
| |
|
0 commit comments
Comments
(0)