Commit 8e1eadd
authored
Rollup merge of #120853 - blyxyas:no-collect, r=cjgillot
Avoid a collection and iteration on empty passes
Just some mini optimization I saw in the wild. This way, we avoid a `collect` and `map` on an empty `passes`. Honestly, I don't even think this is big enough of a change to make a benchmark, but I'd still like to see results.
Based on [this book](https://nnethercote.github.io/perf-book/iterators.html#collect-and-extend)1 file changed
+3
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
| 367 | + | |
| 368 | + | |
373 | 369 | | |
374 | 370 | | |
| 371 | + | |
375 | 372 | | |
376 | 373 | | |
377 | 374 | | |
| |||
0 commit comments