... and it was by no means Rust's fault.<p>Rust's slice.binary_search_by() used to have an implementation equivalent to upper_bound(), and it got improved recently.<p>The PR of the improvement: <a href="https://github.com/rust-lang/rust/pull/74024" rel="nofollow">https://github.com/rust-lang/rust/pull/74024</a><p>Polkadot's postmortem: <a href="https://polkadot.network/a-polkadot-postmortem-24-05-2021/" rel="nofollow">https://polkadot.network/a-polkadot-postmortem-24-05-2021/</a>