mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
8fe73e80d7
Refactor memchr to allow optimization Closes #75659 The implementation already uses naive search if the slice if short enough, but the case is complicated enough to not be optimized away. This PR refactors memchr so that it exists early when the slice is short enough. Codegen-wise, as shown in #75659, memchr was not inlined previously so the only way I could find to test this is to check if there is no memchr call. Let me know if there is a more robust solution here. |
||
---|---|---|
.. | ||
benches | ||
src | ||
tests | ||
Cargo.toml |