Commit 677e023
authored
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 87e60a7 commit 677e023
1 file changed
+5
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3543 | 3543 | | |
3544 | 3544 | | |
3545 | 3545 | | |
3546 | | - | |
| 3546 | + | |
| 3547 | + | |
| 3548 | + | |
3547 | 3549 | | |
3548 | 3550 | | |
3549 | | - | |
3550 | | - | |
| 3551 | + | |
3551 | 3552 | | |
3552 | 3553 | | |
3553 | 3554 | | |
| |||
3556 | 3557 | | |
3557 | 3558 | | |
3558 | 3559 | | |
3559 | | - | |
| 3560 | + | |
3560 | 3561 | | |
3561 | 3562 | | |
3562 | 3563 | | |
| |||
0 commit comments