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

[83871] LINQ Performance #83872

Closed
wants to merge 1 commit into from
Closed

Conversation

JBraunsmaJr
Copy link

#83871 As noted within the issue I created, I observed a rather significant performance between using a Where.Any and Any. When in reality, it should perform almost the same.

After I created an overload for arrays performance improved (view #83871 for details). It is likely this issue exists in many other areas.

@ghost ghost added the community-contribution Indicates that the PR has been added by a community member label Mar 24, 2023
@ghost
Copy link

ghost commented Mar 24, 2023

Tagging subscribers to this area: @dotnet/area-system-linq
See info in area-owners.md if you want to be subscribed.

Issue Details

#83871 As noted within the issue I created, I observed a rather significant performance between using a Where.Any and Any. When in reality, it should perform almost the same.

After I created an overload for arrays performance improved (view #83871 for details). It is likely this issue exists in many other areas.

Author: JBraunsmaJr
Assignees: -
Labels:

area-System.Linq, community-contribution

Milestone: -

@JBraunsmaJr
Copy link
Author

@dotnet-policy-service agree

@huoyaoyuan
Copy link
Member

Thanks for contribution. Please note that adding new public method requires a reviewing process and additional coding process.

For LINQ, generally we don't add overload for specific collection types (except special cases like ImmutableArray<T>, which has in its own LINQ helper class). Instead, we detect common collection types like arrays and process them specially, like you pointed out in the issue.

Please also note that changes to detect certain collection types may also be rejected, since it may regress the code size and performance of other collection type.

@stephentoub
Copy link
Member

Thanks for contribution. Please note that adding new public method requires a reviewing process and additional coding process.

Closing per this. Further discussion can happen in the issue. Thanks.

@ghost ghost locked as resolved and limited conversation to collaborators Apr 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Linq community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants