Skip to content

Conversation

@ylpoonlg
Copy link
Contributor

Implement the benchmark functions as suggested by #1512 :

  • GetByteCount: Covers UTF-16 validation
  • GetCharCount: Covers UTF-8 validation
  • GetBytesFromChars: Covers UTF-16 to UTF-8 transcoding
  • GetCharsFromBytes: Covers UTF-8 to UTF-16 transcoding
  • GetStringFromBytes: Covers UTF-8 validation, string allocation and UTF-16 transcoding
  • GetBytesFromString: Covers UTF-16 validation, byte array instantiation and UTF-8 transcoding

Call the methods from Encoding.UTF8 instead of a new UTF8Encoding() instance to test the JIT's devirtualization.

Implement the suggestions from dotnet#1512:
* Break down benchmarks for Unicode validation and transcoding.
* Call from `Encoding.UTF8` so that devirtualization can be tested.
@ylpoonlg
Copy link
Contributor Author

cc @dotnet/arm64-contrib @a74nh @SwapnilGaikwad @tannergooding

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant