Skip to content
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

[browser][HybridGlobalization][tracking] Regressions of text APIs when running in *HybridGlobalization* mode. #94473

Closed
2 of 7 tasks
matouskozak opened this issue Nov 7, 2023 · 3 comments
Assignees
Labels
Milestone

Comments

@matouskozak
Copy link
Member

matouskozak commented Nov 7, 2023

Based on our investigations, some of the String, TextInfo and CompareInfo APIs are running slower with WASM HybridGlobalization (HG) enabled than with HG disabled.

Here is the summary of the largest regressions. We compare the default behavior (using ICU4C) to the scenario with enabled HG (both running with interpreter, similar numbers are reported for AOT as well).

API time ICU4C [ms] time HG [ms] slow-down
String, TextInfo ToLower 0.2698 90.9531 33611%
String, TextInfo ToUpper 0.2545 90.9077 35620%
String, TextInfo ToTitleCase 7.1761 113.7647 1485%
String, String Compare 0.0397 0.374 842%
String, String Equals 0.0397 0.3717 836%
String, CompareInfo Compare 0.0393 0.373 849%
String, String IndexOf 4.7239 2362.6667 49915%
String, String LastIndexOf 8.1408 2361 28902%

Note: These regressions only influence application where HG is enabled (e.g., by adding <HybridGlobalization>true</HybridGlobalization> to the .csproj file) as it is not the default settings.


Tracking list of APIs waiting to be optimize:


cc: @ilonatommy @mkhamoyan @SamMonoRT

@ghost
Copy link

ghost commented Nov 7, 2023

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

Based on our investigations, some of the String, TextInfo and CompareInfo APIs are running slower with WASM HybridGlobalization (HG) enabled than with HG disabled.

Here is the summary of the largest regressions. We compare the default behavior (using ICU4C) to scenario with enabled HG (both running with interpreter).

API time ICU4C [ms] time HG [ms] slow-down
String, TextInfo ToLower 0.2698 90.9531 33611%
String, TextInfo ToUpper 0.2545 90.9077 35620%
String, TextInfo ToTitleCase 7.1761 113.7647 1485%
String, String Compare 0.0397 0.374 842%
String, String Equals 0.0397 0.3717 836%
String, CompareInfo Compare 0.0393 0.373 849%
String, String IndexOf 4.7239 2362.6667 49915%
String, String LastIndexOf 8.1408 2361 28902%

Similar numbers are reported for AOT as well.

Note: These regressions only influence application where HG is enabled (e.g., by adding <HybridGlobalization>true</HybridGlobalization> to the .csproj file) as it is not the default settings.


Tracking list of APIs waiting to be optimize:

  • ToLower
  • ToUpper
  • ToTitleCase
  • Compare
  • Equals
  • IndexOf
  • LastIndexOf

cc: @ilonatommy @mkhamoyan @SamMonoRT

Author: matouskozak
Assignees: -
Labels:

arch-wasm, area-System.Globalization

Milestone: -

@matouskozak matouskozak self-assigned this Nov 7, 2023
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Nov 7, 2023
@SamMonoRT SamMonoRT removed the untriaged New issue has not been triaged by the area owner label Nov 8, 2023
@SamMonoRT SamMonoRT added this to the 9.0.0 milestone Nov 8, 2023
@matouskozak matouskozak modified the milestones: 9.0.0, 10.0.0 Jul 24, 2024
@matouskozak
Copy link
Member Author

Moving to .net 10 as it is not blocking a release. Hybrid globalization on browser is an optional feature. cc: @ilonatommy

@matouskozak
Copy link
Member Author

Closing as not planned, more info #110526

@matouskozak matouskozak closed this as not planned Won't fix, can't repro, duplicate, stale Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants