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)
NUnit currently uses
ToLower()to do case-insensitive strings comparisons. We should consider moving towards in-place comparisons using theEquals()StartsWith()andEndsWith()overloads which take in astringcomparisoninstead. 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)