Uh oh!
There was an error while loading. Please reload this page.
[release/5.0-rc2] Disable arm64 intrinsics in UTF-16 validation code paths - #42064
Conversation
Dotnet-GitSync-Bot
commented
Sep 10, 2020
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
@GrabYourPitchforks or @adamsitnik could one of you please fill in template? |
jeffhandley
commented
Sep 10, 2020
I'll fill in the template.... |
danmoseley
commented
Sep 10, 2020
@dotnet/dnceng this is a new one: https://github.com/dotnet/runtime/pull/42064/checks?check_run_id=1096236869 |
ghost
commented
Sep 10, 2020
@danmosemsft This was fallout from switching to the new service fabric API which was reverted today. New runs should not see this: https://github.com/dotnet/core-eng/issues/10759 |
danmoseley
commented
Sep 10, 2020
Thanks @riarenas |
danmoseley
commented
Sep 10, 2020
Presumably this means there was a hole in our microbenchmarks (for non ASCII) -- is that tracked by dotnet/performance#1512? |
jeffhandley
commented
Sep 10, 2020
That is correct; thanks for calling that out, @danmosemsft. |
jeffhandley
commented
Sep 10, 2020
@GrabYourPitchforks / @adamsitnik - This backport was approved, but before we merge into RC2, we need to re-run the benchmarks and verify that we got the expected results. Could one of you do that and post the results here please? |
jeffhandley
commented
Sep 10, 2020
I overlooked @adamsitnik's comment on the PR for master. @carlossanlop - are you set up to be able to build this and run the benchmarks? |
carlossanlop
commented
Sep 10, 2020
@jeffhandley I can verify this in my WSL2. I'll run the performance tests before and after the changes in this PR. |
I built the runtime repo in my WSL2 using |
GrabYourPitchforks
commented
Sep 10, 2020
Thank you for the confirmation, Carlos! :) |
jeffhandley
commented
Sep 10, 2020
Thanks, @carlossanlop! That data is super clear and matches expectations based on what we previously observed. I'll go ahead and merge. |
Backport of #42052 to release/5.0-rc2 to fix#41699, which is a performance regression in UTF8/UTF-16 code paths that was introduced during our ARM64 Optimization effort during Preview 8 and discovered during our 5.0 perf sign-off effort.
Customer Impact
Disables the ARM64-intrinsicified UTF-16 validation code paths since they ended up having poorer performance characteristics for non-ASCII data compared to their 3.x counterparts. With this PR, we skip the ARM64 intrinsics entirely but stay within vectorized code as much as possible. The codegen and perf should be on-par with what shipped in 3.x.
Here are the regressions that were found in
Utf8Encoding.GetByteCountthat this PR would resolve:Testing
We have extensive unit test coverage of this area and all tests are passing. We still need to complete performance runs with this fix merged into master, but we will collect that data to verify that the regressions are eliminated before merging this into RC2.
Risk
Low. We are bypassing the intrinsics code path and falling back to the previous code path used, with good unit test coverage across the area.
Once this change is in, we can re-introduce tweaked versions of the ARM64 code path, validate the perf numbers, and consider a cherry-pick of the "real" fix into the 5.x servicing branches if we see performance improvements that would justify the servicing.