[browser][non-icu] HybridGlobalization compare#84249
[browser][non-icu] HybridGlobalization compare#84249ilonatommy merged 10 commits intodotnet:mainfrom
HybridGlobalization compare#84249Conversation
|
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsImplements a chunk of web-api based globalization. Is a part of HybridGlobalization feature and contributes to #79989. Requires #84019 to be merged first (it has changes introducing Old, icu-based private API: GlobalizationNative_CompareString New, non-icu private API: CompareStringJS. Affected public API (see: tests in CompareInfoTests.Compare.cs):
All changes in behavior are listed in cc @SamMonoRT
|
HybridGlobalization compare
|
Failures: Blazor WasmBuildTests and AOT timeouts are not connected. |
| hiraganaBig.localeCompare(katakanaSmall, "en-US", { sensitivity: "base" }) // 0; base: a ≠ b, a = á, a = A | ||
| ``` | ||
|
|
||
| - List of all `CompareOptions` combinations always throwing `PlatformNotSupportedException`: |
There was a problem hiding this comment.
In the future, could we use attributes or a compile time analyzer to make builds fail when the user's code attempts to use these combinations? (Obviously not in this PR)
There was a problem hiding this comment.
I think we could but I am not sure if I know how to do it. Do we have a similar mechanism somewhere already?
There was a problem hiding this comment.
I'm not sure, maybe ask in the group chat or channel. I haven't touched any of our generators/analyzers but I know we have a couple like the JSImport/Export generator.
src/libraries/System.Private.CoreLib/src/System/Globalization/CompareInfo.WebAssembly.cs
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/src/System/Globalization/CompareInfo.WebAssembly.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Globalization/tests/CompareInfo/CompareInfoTests.Compare.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Globalization/tests/CompareInfo/CompareInfoTests.Compare.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/src/System/Globalization/CompareInfo.WebAssembly.cs
Outdated
Show resolved
Hide resolved
|
Failures not related. Merging to move forward. If there are any new ideas later, feel free to let me know and we will solve them in a follow-up, cc @pavelsavara, @radical. |
Implements a chunk of web-api based globalization. Is a part of HybridGlobalization feature and contributes to #79989.
Old, icu-based private API: GlobalizationNative_CompareString
New, non-icu private API: CompareString.
Affected public API (see: tests in CompareInfoTests.Compare.cs):
All changes in behavior are listed in
docs\design\features\hybrid-globalization.mdsee final performance here: #85098
cc @SamMonoRT
Performance:
most of the processing time is taken by
mono_wasm_compare_string(~60-70%) while ~50% is used for TextDecoder.decode and only up to 20% for localeCompare.