Commit ab1bd3a
committed
core: optimize {option,result}::collect
The bug #11084 causes these collect functions to run about
twice as slow as they should because llvm is having trouble
optimizing away the closure for some reason. This patch works
around that performance bug by using a simple adapter iterator
explicitly for capturing if the outer iterator returns an
error.1 parent 1ea9991 commit ab1bd3a
2 files changed
+44
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
587 | 587 | | |
588 | 588 | | |
589 | 589 | | |
590 | | - | |
591 | | - | |
592 | | - | |
593 | | - | |
594 | | - | |
595 | | - | |
596 | | - | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
597 | 608 | | |
598 | 609 | | |
599 | | - | |
| 610 | + | |
600 | 611 | | |
601 | | - | |
| 612 | + | |
| 613 | + | |
602 | 614 | | |
603 | | - | |
| 615 | + | |
604 | 616 | | |
605 | 617 | | |
606 | 618 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
585 | 585 | | |
586 | 586 | | |
587 | 587 | | |
588 | | - | |
589 | | - | |
590 | | - | |
591 | | - | |
592 | | - | |
593 | | - | |
594 | | - | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
595 | 606 | | |
596 | 607 | | |
597 | | - | |
| 608 | + | |
598 | 609 | | |
599 | | - | |
| 610 | + | |
| 611 | + | |
600 | 612 | | |
601 | | - | |
| 613 | + | |
602 | 614 | | |
603 | 615 | | |
604 | 616 | | |
| |||
0 commit comments