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

Replace IEnumerable.Count() with .Any() #120

Merged

Conversation

Vakadavr
Copy link
Contributor

Using .Any() may be slightly faster then .Count(). Because Count() method have to iterate through all elements of IEnumerable while for Any() iterating first element is enough.

Also there was suspicious #if directive with same code in both branches.

@danielwertheim danielwertheim merged commit fe65dd0 into danielwertheim:master Nov 15, 2019
@danielwertheim
Copy link
Owner

Merged. Thanks @Vakadavr

Will be released soon as I need to give the Azure PipeLine a bit of "attention".

@danielwertheim
Copy link
Owner

Released

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants