-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
S-blockedStatus: marked as blocked ❌ on something else such as an RFC or other implementation workStatus: marked as blocked ❌ on something else such as an RFC or other implementation work
Description
Description
The manual_clamp
lint nags me to replace .max(0).min(255)
with .clamp(0,255)
in image-webp crate, but doing that results in significantly slower code.
You can find the full details and the assembly comparison in the issue I opened on the rustc repo: rust-lang/rust#141915
The root cause of the slowdown is still being investigated.
We've put an #[allow]
on the affected piece of code in image-web
, but it would be nice to disable this lint by default so it wouldn't cause any further performance regressions across the ecosystem.
Version
I've reproduced the regression on rustc 1.75, 1.82 and 1.87
Additional Labels
No response
Metadata
Metadata
Assignees
Labels
S-blockedStatus: marked as blocked ❌ on something else such as an RFC or other implementation workStatus: marked as blocked ❌ on something else such as an RFC or other implementation work