Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

System.Linq: Genericize ToDictionary optimizations for IList<T>#5261

Closed
jamesqo wants to merge 1 commit intodotnet:masterfrom
jamesqo:patch-5
Closed

System.Linq: Genericize ToDictionary optimizations for IList<T>#5261
jamesqo wants to merge 1 commit intodotnet:masterfrom
jamesqo:patch-5

Conversation

@jamesqo
Copy link
Copy Markdown
Contributor

@jamesqo jamesqo commented Jan 8, 2016

Also removed no-longer needed array overloads and replaced foreach with for.

Also removed no-longer needed array overloads and replaced `foreach` with `for`.
@jamesqo jamesqo changed the title Genericize ToDictionary optimizations for IList System.Linq: Genericize ToDictionary optimizations for IList<T> Jan 8, 2016
@stephentoub
Copy link
Copy Markdown
Member

You say "optimizations", but at first glance I'd expect the changes you've made would actually harm performance, e.g. accessing an array is slower when done via an interface. Please share your performance tests and results. Thanks.

@ikopylov
Copy link
Copy Markdown
Contributor

This change will definitely lead to a perf regression for both Array and List<T>.

For the other collections that implement IList<T> the change may give a minor improvement except some corner cases (ImmutableList as discussed in #4551).

In any case, the performance tests are required.

@jamesqo jamesqo deleted the patch-5 branch February 21, 2016 02:50
@karelz karelz modified the milestone: 1.0.0-rtm Dec 3, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants