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

use Count instead of Where+Count #10016

Merged
merged 1 commit into from
Jun 20, 2024
Merged

use Count instead of Where+Count #10016

merged 1 commit into from
Jun 20, 2024

Conversation

SimonCropp
Copy link
Contributor

@SimonCropp SimonCropp commented Jun 6, 2024

Shorten Linq syntax by using just Count instead of Where+Count.

@SimonCropp SimonCropp requested a review from a team as a code owner June 6, 2024 11:09
@erdembayar
Copy link
Contributor

LGTM, it's technically just a cosmetic syntax change, shouldn't change actual behavior.

@SimonCropp
Copy link
Contributor Author

technically just a cosmetic syntax change

nope. this halves the number of linq evaluation. so has memory, cpu, assembly size, build time, and jit time improvements. Admittedly some of thee would be difficult to measure. but the memory + cpu would impact a fast path

@erdembayar
Copy link
Contributor

technically just a cosmetic syntax change

nope. this halves the number of linq evaluation. so has memory, cpu, assembly size, build time, and jit time improvements. Admittedly some of thee would be difficult to measure. but the memory + cpu would impact a fast path

Thank you for the clarification. I haven't done any performance-related work recently, my memory is vague. Also, I noticed that performance numbers vary for tfm. Unfortunately, we're still using net472.

@SimonCropp
Copy link
Contributor Author

Unfortunately, we're still using net472.

it will still result in perf improvements on net472

@erdembayar erdembayar merged commit 9456c1c into NuGet:dev Jun 20, 2024
2 checks passed
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.

2 participants