Skip to content

Perform case-insensitive string comparisons in-place #4086

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

Closed
stevenaw opened this issue Mar 26, 2022 · 0 comments · Fixed by #4088
Closed

Perform case-insensitive string comparisons in-place #4086

stevenaw opened this issue Mar 26, 2022 · 0 comments · Fixed by #4088
Assignees
Milestone

Comments

@stevenaw
Copy link
Member

NUnit currently uses ToLower() to do case-insensitive strings comparisons. We should consider moving towards in-place comparisons using the Equals() StartsWith() and EndsWith() overloads which take in a stringcomparison instead. This should help reduce memory overhead, especially on large suites where GC overhead can become a factor.

NOTE: I attempted this at one point in the past but I recall the potential for breaking behaviour on either Windows or Linux on .netcore <= 3.1. I'm wondering if it's worth revisiting this now that netcore3.1 will be hitting EOL in the foreseeable future and .NET 5+ supports the same ICU tables as linux now (https://docs.microsoft.com/en-us/dotnet/core/extensions/globalization-icu)

@stevenaw stevenaw changed the title Perform case-insensitive comparisons in-place Perform case-insensitive string comparisons in-place Mar 26, 2022
@stevenaw stevenaw self-assigned this Mar 26, 2022
@stevenaw stevenaw added this to the 4.0 milestone Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants