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

Narrow four utf16 chars to ascii and write to buffer #39508

Merged

Conversation

pgovind
Copy link
Contributor

@pgovind pgovind commented Jul 17, 2020

I decided to split up my single PR into multiple ones so I can isolate CI bugs better. I believe this change should be good to go in.

In the process of splitting, I eventually found that the ARM64 CI legs seem to be broken currently. I opened #39582 to test that claim.

Perf results:

Before and After Arm64 optimizations

calope@calopearm:~/performance/src/tools/ResultsComparer$ dotnet run --base ~/pgovind_before/ --diff ~/pgovind_after/ --threshold 0.01%
summary:
better: 1, geomean: 1.244
total diff: 1
No Slower results for the provided threshold = 0.01% and noise filter = 0.3ns.

Faster base/diff Base Median (ns) Diff Median (ns) Modality
System.Text.Experimental.Perf.Intrinsics 1.24 10433.00 8384.06
No file given

@jkotas jkotas added the NO-REVIEW Experimental/testing PR, do NOT review it label Jul 17, 2020
@pgovind pgovind force-pushed the NarrowFourUtf16CharsToAsciiAndWriteToBuffer branch from 16ce598 to b22083f Compare July 17, 2020 19:26
@pgovind pgovind removed the NO-REVIEW Experimental/testing PR, do NOT review it label Jul 18, 2020
@ghost
Copy link

ghost commented Jul 18, 2020

Tagging subscribers to this area: @tannergooding
Notify danmosemsft if you want to be subscribed.

@pgovind pgovind requested a review from echesakov July 18, 2020 02:09
@@ -8,6 +8,8 @@ internal static class Vector64
public static Vector64<ulong> Create(ulong value) => throw new PlatformNotSupportedException();
public static Vector64<uint> CreateScalar(uint value) => throw new PlatformNotSupportedException();
public static Vector64<byte> AsByte<T>(this Vector64<T> vector) where T : struct => throw new PlatformNotSupportedException();
public static Vector64<T> GetLower<T>(this Vector128<T> vector) where T : struct => throw new PlatformNotSupportedException();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are not strictly needed for this PR, but all of these APIs will be needed in subsequent PRs. Let me know if you'd rather that I keep this clean.

@pgovind pgovind force-pushed the NarrowFourUtf16CharsToAsciiAndWriteToBuffer branch 2 times, most recently from 40c7685 to c719dde Compare July 20, 2020 23:31
@pgovind pgovind force-pushed the NarrowFourUtf16CharsToAsciiAndWriteToBuffer branch from c719dde to 938efce Compare July 28, 2020 21:59
@pgovind
Copy link
Contributor Author

pgovind commented Jul 28, 2020

Rebasing on the latest master to see if CI passes

@pgovind
Copy link
Contributor Author

pgovind commented Jul 29, 2020

CI failures are unrelated. Merging.

@pgovind pgovind merged commit 5644260 into dotnet:master Jul 29, 2020
Jacksondr5 pushed a commit to Jacksondr5/runtime that referenced this pull request Aug 10, 2020
* Shims

* shim

* Cherry-pick

* NarrowFourUtf16CharsToAsciiAndWriteToBuffer

* Address comments

* Nit
@ghost ghost locked as resolved and limited conversation to collaborators Dec 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants