Why is String.EndsWith()
on .NET 8
two times slower than on .NET Framework 4.8
, in Chinese and Japanese CultureInfo
?
#97200
Answered
by
huoyaoyuan
JasonWei512
asked this question in
Q&A
-
Full test project and resultExampleOn "Hello World".EndsWith("World"); ... takes 278% time in Chinese
Environment
|
Beta Was this translation helpful? Give feedback.
Answered by
huoyaoyuan
Jan 19, 2024
Replies: 2 comments
-
The default globalization implementation is ICU on .NET Core. See https://learn.microsoft.com/dotnet/core/extensions/globalization-icu . You can compare the performance of NLS mode mentioned in the doc. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
JasonWei512
-
You may want to compare string with "Hello World".EndsWith("World", StringComparison.Ordinal); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The default globalization implementation is ICU on .NET Core. See https://learn.microsoft.com/dotnet/core/extensions/globalization-icu . You can compare the performance of NLS mode mentioned in the doc.