Lancern's Treasure Chest
18:24 · Feb 18, 2022 · Fri
Lancern's Treasure Chest
rustc 不会消除两个相邻的 unbox + box 操作。。。
Zulip 上已经有人发现了这个问题:
https://github.com/rust-lang/rust/issues/93707
GitHub
Could the compiler automatically re-use `Box` allocations as an optimization? · Issue #93707 · rust-lang/rust
I tried this code: https://play.rust-lang.org/?version=nightly&mode=release&edition=2021&gist=f7612dfa44bc15ef44bd7d759dce1b87 pub fn demo(x: Box<i32>) -&g...
Home
Powered by
BroadcastChannel
&
Sepia