Skip to content

Conversation

@lindexi
Copy link
Member

@lindexi lindexi commented Mar 28, 2023

Description

We can use string.Equals(string1, string2, StringComparison.Ordinal) to check for equality, see https://learn.microsoft.com/en-us/dotnet/csharp/how-to/compare-strings and https://learn.microsoft.com/en-us/dotnet/standard/base-types/best-practices-strings

Use the String.Compare and String.CompareTo methods to sort strings, not to check for equality.

Reference #7500

Customer Impact

Small performance improvements

Regression

None.

Testing

Just CI.

Risk

Low.

Microsoft Reviewers: Open in CodeFlow

@lindexi lindexi requested a review from a team as a code owner March 28, 2023 09:35
@ghost ghost assigned lindexi Mar 28, 2023
@ghost ghost added the PR metadata: Label to tag PRs, to facilitate with triage label Mar 28, 2023
@ghost ghost requested review from dipeshmsft and singhashish-wpf March 28, 2023 09:35
@ghost ghost added the Community Contribution A label for all community Contributions label Mar 28, 2023
@dipeshmsft
Copy link
Member

Hey @lindexi, I think we can create an issue for this if there will be more similar PRs.

@lindexi
Copy link
Member Author

lindexi commented Apr 19, 2023

@dipeshmsft Can I find any similar issues?

@dipeshmsft
Copy link
Member

Let me take a look, if I find a similar issue, I will ping you back here.

@dipeshmsft
Copy link
Member

@lindexi, I wasn't able to look at another similar issue. However, we have run the test pass on this fix. No new fails.
Thanks for your continued support.

Also, you have mentioned in the Customer Impact section that we may have small performance improvements, do you have any benchmarks for the same ?

@lindexi
Copy link
Member Author

lindexi commented Apr 28, 2023

Also, you have mentioned in the Customer Impact section that we may have small performance improvements, do you have any benchmarks for the same ?

@dipeshmsft Sorry, I didn't measure the performance in wpf. I'm just measuring it in my demo project.

@ghost ghost locked as resolved and limited conversation to collaborators May 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Community Contribution A label for all community Contributions PR metadata: Label to tag PRs, to facilitate with triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants