Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.NET 9 perf improvements to Enumerable.Any() invalidates rule CA1860 #7576

Open
Muximize opened this issue Feb 14, 2025 · 0 comments
Open

.NET 9 perf improvements to Enumerable.Any() invalidates rule CA1860 #7576

Muximize opened this issue Feb 14, 2025 · 0 comments

Comments

@Muximize
Copy link

Analyzer

Diagnostic ID: CA1860 (Avoid using Enumerable.Any() extension method)

Describe the improvement

dotnet/runtime#99218 significantly improved .Any() performance. Doesn't this invalidate this rule?

Describe suggestions on how to achieve the rule

Disable the rule for .NET 9 and later.

Additional context

https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-9/#linq

@Muximize Muximize changed the title .NET 9 performance improvements to Enumerable.Any() invalidates rule CA1860 .NET 9 perf improvements to Enumerable.Any() invalidates rule CA1860 Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant