-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Optimize IndexOf lookups #19963
Optimize IndexOf lookups #19963
Conversation
Hey there @symbiogenesis! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like you wrote a manual benchmark instead of using BenchmarkDotNet.
Can you add a benchmark for this change? and add it to this PR?
https://github.com/dotnet/maui/tree/main/src/Core/tests/Benchmarks/Benchmarks
Then let us know your results before/after. Thanks!
0109d42
Before:
After:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Thank you!
I will put this on the list for some far future blog post. 😄
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
This extension method in Core is referenced in at least 19 places.
With this change, the performance in some cases is orders of magnitude better.
https://dotnetfiddle.net/Anb4rA