Commit b1e9e39
committed
Use internal iteration in
Because LLVM is unable to optimize well external iteration with some iterator kinds (e.g. `chain()`).
To do that I had to hoist the `size_hint()` call to the beginning of the loop (since I no longer have access to the iterator inside the loop), which might slightly pessimize certain iterators that are able to give more accurate size bounds during iteration (e.g. `flatten()`). However, the effect should not be big, and also, common iterators like these also suffer from the external iteration optimizibility problem (e.g. `flatten()`).Vec::extend_desugared()
1 parent a1208bf commit b1e9e39
1 file changed
+6
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3780 | 3780 | | |
3781 | 3781 | | |
3782 | 3782 | | |
3783 | | - | |
| 3783 | + | |
3784 | 3784 | | |
3785 | 3785 | | |
3786 | 3786 | | |
3787 | 3787 | | |
3788 | 3788 | | |
3789 | 3789 | | |
3790 | 3790 | | |
3791 | | - | |
| 3791 | + | |
| 3792 | + | |
| 3793 | + | |
3792 | 3794 | | |
3793 | 3795 | | |
3794 | | - | |
3795 | | - | |
| 3796 | + | |
3796 | 3797 | | |
3797 | 3798 | | |
3798 | 3799 | | |
| |||
3801 | 3802 | | |
3802 | 3803 | | |
3803 | 3804 | | |
3804 | | - | |
| 3805 | + | |
3805 | 3806 | | |
3806 | 3807 | | |
3807 | 3808 | | |
| |||
0 commit comments