Skip to content
This repository was archived by the owner on Aug 2, 2023. It is now read-only.

Attempts at improving encoding performance of UTF8.TryEncodeFromUtf16 #1113

Merged
KrzysztofCwalina merged 5 commits intodotnet:masterfrom
ahsonkhan:EncodingPerfWork
Jan 14, 2017
Merged

Attempts at improving encoding performance of UTF8.TryEncodeFromUtf16 #1113
KrzysztofCwalina merged 5 commits intodotnet:masterfrom
ahsonkhan:EncodingPerfWork

Conversation

@ahsonkhan
Copy link
Contributor

Fixing implementation to take in little endian UTF16 characters and adjusting tests so they use UTF16 LE bytes.

Switching EncodingPerfComparisonTests to use the TextEncoder.Utf8.TryEncodeFromUtf16 method. It should be 3x slower instead of 7x slower now.

As part of Issue #1091 - Productize Encoding APIs

@ahsonkhan
Copy link
Contributor Author

@dotnet-bot test this please

@ahsonkhan
Copy link
Contributor Author

cc @KrzysztofCwalina Please review.

@KrzysztofCwalina KrzysztofCwalina merged commit 6e68be8 into dotnet:master Jan 14, 2017
@ahsonkhan ahsonkhan deleted the EncodingPerfWork branch January 17, 2017 18:57
ahsonkhan added a commit to ahsonkhan/corefxlab that referenced this pull request Jan 28, 2017
…dotnet#1113)

* Attempts at improving performance of TryEncodeFromUtf16

* Fixing implementation to take in little endian UTF16 characters
- Also added surrogate logic

* Removing incorrect byte ordering conversion since System.Char is LE (while source code shows BE for readability)

* Removing unnecessary optional parameter for LE in perf test.

* Minor changes to improve perf, not writing directly to out param.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants