Commit 39a333a
committed
Marginal performance hack: remove the loop that used to be needed to
look through a freelist for a chunk of adequate size. For a long time
now, all elements of a given freelist have been exactly the same
allocated size, so we don't need a loop. Since the loop never iterated
more than once, you'd think this wouldn't matter much, but it makes a
noticeable savings in a simple test --- perhaps because the compiler
isn't optimizing on a mistaken assumption that the loop would repeat.
AllocSetAlloc is called often enough that saving even a couple of
instructions is worthwhile.1 parent b1a1ea4 commit 39a333a
1 file changed
+7
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
516 | 516 | | |
517 | 517 | | |
518 | 518 | | |
519 | | - | |
520 | 519 | | |
521 | 520 | | |
522 | 521 | | |
| |||
578 | 577 | | |
579 | 578 | | |
580 | 579 | | |
581 | | - | |
582 | | - | |
583 | | - | |
584 | | - | |
585 | | - | |
586 | | - | |
587 | | - | |
588 | | - | |
589 | | - | |
590 | | - | |
591 | | - | |
592 | 580 | | |
593 | 581 | | |
594 | 582 | | |
| 583 | + | |
| 584 | + | |
595 | 585 | | |
596 | 586 | | |
597 | | - | |
598 | | - | |
599 | | - | |
600 | | - | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
601 | 590 | | |
602 | 591 | | |
603 | 592 | | |
| |||
618 | 607 | | |
619 | 608 | | |
620 | 609 | | |
621 | | - | |
| 610 | + | |
622 | 611 | | |
623 | 612 | | |
624 | 613 | | |
| |||
0 commit comments