You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TextEncoder.FindFirstCharacterToEncodeUtf8 not being used anywhere. #39829
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.
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.
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.
Activity
tarekgh commentedon Jul 23, 2020
@GrabYourPitchforks just checking if you are triaging this area?
GrabYourPitchforks commentedon Aug 14, 2020
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.
eiriktsarpalis commentedon Aug 14, 2020
Unlike
TextEncoder.Encode(string)which depends onFindFirstCharacterToEncode(char*),TextEncoder.EncodeUtf8does not make use ofFindFirstCharacterToEncodeUtf8. The issue then is thatTextEncoder.EncodeUtf8does 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.