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

Fix which path is taken in Enumerable.Select for empty partition #88425

Merged
merged 2 commits into from
Jul 6, 2023

Conversation

stephentoub
Copy link
Member

My recent changes to improve perf of some LINQ iterators by implementing IList<T> caused Select on an empty partition to start preferring a path that wasn't optimized for empty. This fixes it. I searched and don't see any other operators that would be similarly negatively affected.

Fixes the one related benchmark from #88376 (EmptyTakeSelectToArray). None of the other benchmarks there are related to my previous change.

My recent changes to improve perf of some LINQ iterators by implementing `IList<T>` caused Select on an empty partition to start preferring a path that wasn't optimized for empty.  This fixes it.  I searched and don't see any other operators that would be similarly negatively affected.
@ghost
Copy link

ghost commented Jul 5, 2023

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

Issue Details

My recent changes to improve perf of some LINQ iterators by implementing IList<T> caused Select on an empty partition to start preferring a path that wasn't optimized for empty. This fixes it. I searched and don't see any other operators that would be similarly negatively affected.

Fixes the one related benchmark from #88376 (EmptyTakeSelectToArray). None of the other benchmarks there are related to my previous change.

Author: stephentoub
Assignees: -
Labels:

area-System.Linq

Milestone: -

@stephentoub stephentoub merged commit b9879a7 into dotnet:main Jul 6, 2023
96 of 103 checks passed
@stephentoub stephentoub deleted the fixselectempty branch July 6, 2023 01:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants