Skip to content

[browser][non-icu] HybridGlobalization faster encoding for change case. - #85516

Merged
ilonatommy merged 5 commits into
dotnet:mainfrom
ilonatommy:hg-change-case-faster-decoding
May 3, 2023
Merged

[browser][non-icu] HybridGlobalization faster encoding for change case.#85516
ilonatommy merged 5 commits into
dotnet:mainfrom
ilonatommy:hg-change-case-faster-decoding

Conversation

@ilonatommy

@ilonatommyilonatommy commented Apr 28, 2023

Copy link
Copy Markdown
Member

Implements a chunk of web-api based globalization. Is a part of HybridGlobalization feature and contributes to #79989.

Speeds up the decoding process:

measurementtime without this PR [ms]time with this PR [ms]time ICU4C [ms]increase vs ICU [times]
String, TextInfo ToLower2.46861.64290.42603,80
String, TextInfo ToUpper2.51421.00030.44322,25
String, TextInfo ToTileCase47.051544.895114.84323,02

An attempt of encoding implementation using TextEncoder was actually slower than existing one, so it did not get into this PR.

measurementtime with this PR [ms]time with this PR + TextEncoder [ms]
String, TextInfo ToLower1.6429ms3.0513ms
String, TextInfo ToUpper1.0003ms3.1530ms
String, TextInfo ToTileCase44.8951ms55.6864ms

Relevant discussions:

invariant change case on C# side: #85510 (comment)
TextEncoder usage implications: #85510 (comment)

@ghost

Copy link
Copy Markdown

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

Issue Details

Implements a chunk of web-api based globalization. Is a part of HybridGlobalization feature and contributes to #79989.

Speeds up the decoding process:

measurementtime without this PR [ms]time with this PR [ms]time ICU4C [ms]increase vs ICU [times]
String, TextInfo ToLower2.46861.64290.42603,80
String, TextInfo ToUpper2.51421.00030.44322,25
String, TextInfo ToTileCase47.051544.895114.84323,02

An attempt of encoding implementation using TextEncoder was actually slower than existing one, so it did not get into this PR.

measurementtime with this PR [ms]time with this PR + TextEncoder [ms]
String, TextInfo ToLower1.6429ms3.0513ms
String, TextInfo ToUpper1.0003ms3.1530ms
String, TextInfo ToTileCase44.8951ms55.6864ms
Author:ilonatommy
Assignees:ilonatommy
Labels:

arch-wasm, area-System.Globalization

Milestone:-

@ilonatommy
ilonatommy merged commit e15f073 into dotnet:mainMay 3, 2023
ilonatommy added a commit to ilonatommy/runtime that referenced this pull request May 23, 2023
ilonatommy added a commit that referenced this pull request May 24, 2023
* Normalization.
* Missing measurement.
* Trying to fix trimming error.
* Applied @pavelsavara's idea.
* Code review improvement.
* Feedback: standardize the exceptions.
* Revert changes from #85516 to clean the CI.
* feedback
@ghostghost locked as resolved and limited conversation to collaborators Jun 2, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-wasmWebAssembly architecturearea-System.Globalization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@ilonatommy@pavelsavara