Commit fab7dff
authored
Reuse inner allocation in collect_bicolor_runs (#1578)
This commit removes an unecessary iteration of every iteration of the
loop inside collect_bicolor_runs(). The vec collection on every
iteration of the loop results in a lot of allocations and frees for
every node in the graph. We can reuse a single vec between each
iteration and avoid this memory pressure.1 parent 4c2ac5f commit fab7dff
1 file changed
Lines changed: 11 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
588 | 588 | | |
589 | 589 | | |
590 | 590 | | |
| 591 | + | |
591 | 592 | | |
592 | 593 | | |
| 594 | + | |
593 | 595 | | |
594 | 596 | | |
595 | | - | |
596 | | - | |
597 | | - | |
598 | | - | |
599 | | - | |
600 | | - | |
601 | | - | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
602 | 600 | | |
603 | 601 | | |
604 | 602 | | |
| |||
638 | 636 | | |
639 | 637 | | |
640 | 638 | | |
641 | | - | |
642 | | - | |
643 | | - | |
644 | | - | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
645 | 643 | | |
646 | | - | |
647 | | - | |
| 644 | + | |
| 645 | + | |
648 | 646 | | |
649 | 647 | | |
650 | 648 | | |
| |||
0 commit comments