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
{{ message }}
Repository navigation
Investigate preallocating space for ICollections/IIListProvider in SelectEnumerableIterator methods #18979
SelectEnumerableIterator's IIListProvider implementation, e.g. ToArray, ToList, etc. should attempt to preallocate space if the source is an ICollection or IIListProvider. We check before falling back to that iterator if the input is an IList or IPartition, but not if it's one of the parent interfaces.
edit: Adding 'investigate' b/c I'm not sure how common a non-IList ICollection is, or a non-IPartition IIListProvider is. In addition, this may penalize (even if slightly) if the source is neither of those.
changed the title [-]SelectEnumerableIterator should attempt to preallocate space for ICollections/IIListProvider[/-][+]Investigate preallocating space for ICollections/IIListProvider in SelectEnumerableIterator methods[/+]on Oct 16, 2016
This is a theory about a potential perf improvement to potentially investigate. There are many such things that could be looked at... we don't need issues tracking them. If someone finds a performance improvement somewhere and wants to submit a PR for it, that's welcome.
Activity
[-]SelectEnumerableIterator should attempt to preallocate space for ICollections/IIListProvider[/-][+]Investigate preallocating space for ICollections/IIListProvider in SelectEnumerableIterator methods[/+]karelz commentedon Oct 17, 2016
cc: @VSadov
VSadov commentedon Nov 10, 2016
Might not be hard to implement, but need to be sure there is a noticeable positive impact in common scenarios.
stephentoub commentedon Mar 12, 2019
This is a theory about a potential perf improvement to potentially investigate. There are many such things that could be looked at... we don't need issues tracking them. If someone finds a performance improvement somewhere and wants to submit a PR for it, that's welcome.