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 }}
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
LINQ already special-cases the very common case of using Select on input T[]s and List<T>s, but it doesn't take this to the next step of optimizing the case where that's then turned back into an array, a common pattern in its own right, e.g.
var names = people.Select(p => p.Name).ToArray();
This commit does so, modifying the internal Iterator type to support customization of ToArray, and updating the internal Buffer type to use it. Changing Buffer not only helps ToArray but also Reverse and OrderBy, both of which convert the input sequence into an array internally.
0 commit comments