3 ms·
I'm curious; is the extra cmp something that's actually required by Rust's semantics, or is this more along the lines of an optimizer bug/missed optimization?
by aw1621107 6y ago
I'm curious; is the extra cmp something that's actually required by Rust's semantics, or is this more along the lines of an optimizer bug/missed optimization?
- pthariensflame 6y agoThe latter, definitely.
- ridiculous_fish 6y agoThis particular case is because array delegates to slice for Eq, and slice has the pointer comparison - though it looks like there's some churn here with 'guaranteed_eq' so it may be fixed soon [1]. 1: https://doc.rust-lang.org/src/core/slice/mod.rs.html#6610 https://doc.rust-lang.org/src/core/slice/mod.rs.html#6610
- aw1621107 6y agoAh, ok. Thanks for explaining!