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
FWIW, I'm willing to do the work for this, but I'd like a little guidance. Will adding or removing methods from this type interfere with current perf investigations?
Will adding or removing methods from this type interfere with current perf investigations?
As long as there is at least one benchmark that uses the code path that has initially regressed in 5.0 and can be run for 3.1 it should not be a problem.
Thank you for taking perf investigations into account! 👍
Per the magic decoder ring at dotnet/runtime#41699 (comment), some of the tests in Perf.Utf8Encoding.cs may be testing too many concepts, which can complicate finding regressions.
I'd recommend reworking this file so that it contains a total of six tests:
Encoding.UTF8.GetByteCount(string)
, which exercises onlyUtf16Utility.GetPointerToFirstInvalidChar
(validation).Encoding.UTF8.GetCharCount(byte[])
, which exercises onlyUtf8Utility.GetPointerToFirstInvalidByte
(validation).Encoding.UTF8.GetChars(ROS<byte>, Span<char>)
, which exercises onlyUtf8Utility.TranscodeToUtf16
(transcoding).Encoding.UTF8.GetBytes(ROS<char>, Span<byte>)
, which exercises onlyUtf8Utility.TranscodeToUtf8
(transcoding).Encoding.UTF8.GetBytes(string)
; which exercises validation, byte array instantiation, and transcoding.Encoding.UTF8.GetString(byte[])
, which exercises validation, string instantiation, and transcoding.For each of these tests, we should use
Encoding.UTF8.Xyz
, allowing the JIT's full devirtualization features to kick in./cc @adamsitnik @jeffhandley @kunalspathak @carlossanlop @pgovind @tannergooding
The text was updated successfully, but these errors were encountered: