mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
380addd7d2
Inline `<T as From<T>>::from` I noticed (in https://github.com/rust-lang/rust/pull/100693#issuecomment-1218520141) that the MIR for <https://play.rust-lang.org/?version=nightly&mode=release&edition=2021&gist=67097e0494363ee27421a4e3bdfaf513> has inlined most stuff ``` scope 5 (inlined <Result<i32, u32> as Try>::branch) ``` ``` scope 8 (inlined <Result<i32, u32> as Try>::from_output) ``` But yet the do-nothing `from` call was still there: ``` _17 = <u32 as From<u32>>::from(move _18) -> bb9; ``` So let's give this a try and see what perf has to say. |
||
---|---|---|
.. | ||
alloc | ||
backtrace@07872f28cd | ||
core | ||
panic_abort | ||
panic_unwind | ||
portable-simd | ||
proc_macro | ||
profiler_builtins | ||
rtstartup | ||
rustc-std-workspace-alloc | ||
rustc-std-workspace-core | ||
rustc-std-workspace-std | ||
std | ||
stdarch@42df7394d3 | ||
test | ||
unwind |