Slicing after [u8]::first performs unnessessary bound check #75268
Labels
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
I-slow
Issue: Problems and improvements with respect to performance of generated code.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Playground link: https://play.rust-lang.org/?version=stable&mode=release&edition=2018&gist=2e2d548aa3a7b89bfb074456d971450d
This slice always exists because of the branch, but it performs bound check.
Real case: RustPython/RustPython#2077
The text was updated successfully, but these errors were encountered: