Simplify option-iterator flattening in the compiler#158627
Conversation
In many cases where we are flattening `option::IntoIter<I>`, we can use `into_flat_iter()` instead for a simpler implementation.
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Simplify option-iterator flattening in the compiler
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (118fe6f): comparison URL. Overall result: ✅ improvements - no action neededBenchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up. @rustbot label: -S-waiting-on-perf -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)This perf run didn't have relevant results for this metric. CyclesResults (primary 2.3%, secondary -0.9%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 485.565s -> 488.649s (0.64%) |
|
Of course I hoped for more of a perf improvement, but at least it's not bad. :) |
|
Some changes occurred to the core trait solver cc @rust-lang/initiative-trait-system-refactor Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt Some changes occurred in coverage instrumentation. cc @Zalathar |
|
r? @nnethercote rustbot has assigned @nnethercote. Use Why was this reviewer chosen?The reviewer was selected based on:
|
In many cases where we are flattening
option::IntoIter<I>, we can useOption::into_flat_iter()instead for a simpler implementation. A fewother cases have more direct constructs available.