You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
I suggest we wait a bit until rust-lang/rust#141915 concludes that this cannot be fixed before allowing the lint by default. Allowing it would not solve the problem retroactively, and it might be fixed soon in the compiler now that the issue is known.
Turns out the issue has been known for a year already: rust-lang/rust#125738
Despite that, a fix has not materialized.
The same argument was made on the Clippy side a year ago when this issue was initially discovered: #12826
Given that it's been a year already and there is no fix in sight, but Clippy has been actively making people's code slower through that entire year. Sadly disabling the lint by default will not undo the damage already done, but perhaps it's time to at least stop slowing down new code?
Uh oh!
There was an error while loading. Please reload this page.
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 inimage-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
Additional Labels
No response
The text was updated successfully, but these errors were encountered: