Skip to content

TextEncoder.FindFirstCharacterToEncodeUtf8 not being used anywhere. #39829

Closed

Description

@eiriktsarpalis

Discovered this issue while working on ARM64 intrinsics optimizations for System.Text.Encodings.Web. While the method is public, it is also marked EditorBrowsable.Never. There are however unit tests consuming it.

A lot of the intrinsics optimizations for this project live in FindFirstCharacterToEncodeUtf8 implementations, and as a result we're not seeing performance improvements when benchmarking TextEncoder.EncodeUtf8.

Activity

  1. tarekgh commented on Jul 23, 2020

    @tarekgh
    Member

    @GrabYourPitchforks just checking if you are triaging this area?

  2. GrabYourPitchforks commented on Aug 14, 2020

    @GrabYourPitchforks
    Member

    This method was at one point used by System.Text.Json (see source). They've stopped using the API since then, but since it's a public API we need to keep it around in perpetuity.

    What is this bug tracking? That we should stop making perf changes to this API? I'd be fine with that if that's the direction we want to go.

  3. added this to the Future milestone on Aug 14, 2020
  4. eiriktsarpalis commented on Aug 14, 2020

    @eiriktsarpalis
    MemberAuthor

    What is this bug tracking?

    Unlike TextEncoder.Encode(string) which depends on FindFirstCharacterToEncode(char*), TextEncoder.EncodeUtf8 does not make use of FindFirstCharacterToEncodeUtf8. The issue then is that TextEncoder.EncodeUtf8 does not take advantage of any of the hardware intrinsics optimizations. If that's intentional or not necessary to improve on, I can close the issue.

  5. ghost added
    in-prThere is an active PR which will close this issue when it is merged
    on Mar 9, 2021
  6. ghost removed
    in-prThere is an active PR which will close this issue when it is merged
    on Mar 19, 2021
  7. ghost locked as resolved and limited conversation to collaborators on Apr 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions