-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[release/5.0-rc2] Disable arm64 intrinsics in UTF-16 validation code paths #42064
[release/5.0-rc2] Disable arm64 intrinsics in UTF-16 validation code paths #42064
Conversation
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? |
I'll fill in the template.... |
@dotnet/dnceng this is a new one:
https://github.com/dotnet/runtime/pull/42064/checks?check_run_id=1096236869 |
@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 |
Thanks @riarenas |
Presumably this means there was a hole in our microbenchmarks (for non ASCII) -- is that tracked by dotnet/performance#1512? |
That is correct; thanks for calling that out, @danmosemsft. |
@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? |
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? |
@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
|
Thank you for the confirmation, Carlos! :) |
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.GetByteCount
that 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.