mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
e44784b875
Uses assume to check the length against a constant upper bound. The inlined result then informs the optimizer of the sound value range. This was tried with unreachable_unchecked before which introduces a branch. This has the advantage of not being executed in sound code but complicates basic blocks. It resulted in ~2% increased compile time in some worst cases. Add a codegen test for the assumption, testing the issue from #67186 |
||
---|---|---|
.. | ||
benches | ||
src | ||
tests | ||
Cargo.toml |