Skip to content

Optimize Enumerable.Distinct<T>() for HashSet<T> #112630

Discussion options

You must be logged in to vote

Right, but the gains are not the same.

They certainly can be. Many of them avoid significant amounts of work, and even ones that are smaller matter much more because they're much, much, much more common.

Demonstrate that this special-casing would be valuable en mass, and we can consider it. In the meantime, you can do it yourself in your own impls for your own use.

Replies: 2 comments 13 replies

Comment options

You must be logged in to vote
1 reply
@ActivistInvestor
Comment options

Comment options

You must be logged in to vote
12 replies
@ActivistInvestor
Comment options

@stephentoub
Comment options

@ActivistInvestor
Comment options

@stephentoub
Comment options

Answer selected by ActivistInvestor
@ActivistInvestor
Comment options

@DrkWzrd
Comment options

# for free to join this conversation on GitHub. Already have an account? # to comment
Category
Ideas
Labels
None yet
3 participants