Skip to content

Optimize System.Text.ASCIIUtility for arm64 using cross-platform intrinsics #41292

Description

@jeffhandley

This item tracks the remaining System.Text.ASCIIUtility methods that can be optimized for ARM64 using intrinsics. Many were completed in 5.0.0 with #35034, but two methods remain. Both of them had prior attempts to apply ARM64 intrinsics, but the efforts were not completed.

Update for .NET 7
Now that we have cross-platform intrinsics APIs (#49397), these optimizations should be completed using those APIs instead of adding ARM64-specific intrinsics code paths. The effort could optionally include first measuring performance of these methods with the ARM64-specific intrinsics in place, and then measuring the performance of these methods with the cross-platform intrinsics.

We previously attempted to implement these optimizations during .NET 5, but the draft PRs linked above were closed because they were introducing unexpected regressions. Therefore, the effort on these optimizations must include investigation of those pitfalls and finding an approach that simultaneously optimizes the code for ARM64 and avoids regressions elsewhere.

Example use of the new cross-platform intrinsics: #63722

Activity

  1. added this to the 6.0.0 milestone on Aug 24, 2020
  2. removed
    untriagedNew issue has not been triaged by the area owner
    on Aug 24, 2020
  3. tarekgh commented on Aug 25, 2020

    @tarekgh
    Member
  4. added
    Cost:SWork that requires one engineer up to 1 week
    on Jan 15, 2021
  5. 8 remaining items

  6. added
    Cost:MWork that requires one engineer up to 2 weeks
    and removed
    Cost:SWork that requires one engineer up to 1 week
    on Feb 23, 2022
  7. a74nh commented on May 3, 2022

    @a74nh
    Contributor

    Could you please assign this to @SwapnilGaikwad

  8. ghost added
    in-prThere is an active PR which will close this issue when it is merged
    on Jun 1, 2022
  9. ghost removed
    in-prThere is an active PR which will close this issue when it is merged
    on Jun 30, 2022
  10. danmoseley commented on Jun 30, 2022

    @danmoseley
    Contributor

    @kunalspathak with the attached change is this now addressed for all architectures, or should this remain open?

  11. a74nh commented on Jun 30, 2022

    @a74nh
    Contributor

    System.Text.ASCIIUtility.GetIndexOfFirstNonAsciiChar() is done for Arm64/X64.

    Expecting a pull request for System.Text.ASCIIUtility.NarrowUtf16ToAscii() to be raised late this week/early next week.

  12. kunalspathak commented on Jun 30, 2022

    @kunalspathak
    Contributor

    System.Text.ASCIIUtility.GetIndexOfFirstNonAsciiChar() is done for Arm64/X64.

    Expecting a pull request for System.Text.ASCIIUtility.NarrowUtf16ToAscii() to be raised late this week/early next week.

    It's other way round. NarrowUtf16ToAscii() is complete and System.Text.ASCIIUtility.GetIndexOfFirstNonAsciiChar() is not yet complete.

  13. a74nh commented on Jun 30, 2022

    @a74nh
    Contributor

    It's other way round. NarrowUtf16ToAscii() is complete and System.Text.ASCIIUtility.GetIndexOfFirstNonAsciiChar() is not yet complete.

    Oops, yes :)

  14. ghost added
    in-prThere is an active PR which will close this issue when it is merged
    on Jul 5, 2022
  15. ghost removed
    in-prThere is an active PR which will close this issue when it is merged
    on Jul 7, 2022
  16. ghost locked as resolved and limited conversation to collaborators on Aug 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions