runtime: [Perf] Regressions in System.Text.Perf_Utf8Encoding for Greek and Cyrillic
Run Information
Architecture | x64 |
---|---|
OS | Windows 10.0.18362 |
Baseline | 508e56025f66f5c2c00a8f1902816959bb61e0ac |
Compare | 65bcecebde4aebd5926952ccfc4dc8e7fbf7eaed |
Diff | Diff |
Regressions in System.Text.Perf_Utf8Encoding
Benchmark | Baseline | Test | Test/Base | Test Quality | Baseline IR | Compare IR | IR Ratio | Baseline ETL | Compare ETL |
---|---|---|---|---|---|---|---|---|---|
GetString - Duration of single invocation | 348.09 μs | 381.20 μs | 1.10 | 0.00 | |||||
GetString - Duration of single invocation | 223.28 μs | 240.51 μs | 1.08 | 0.00 | |||||
GetBytes - Duration of single invocation | 204.86 μs | 217.86 μs | 1.06 | 0.01 | |||||
GetBytes - Duration of single invocation | 126.23 μs | 139.66 μs | 1.11 | 0.01 |
Historical Data in Reporting System
Repro
git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f netcoreapp5.0 --filter 'System.Text.Perf_Utf8Encoding*'
Payloads
Histogram
System.Text.Perf_Utf8Encoding.GetString(Input: Greek)
System.Text.Perf_Utf8Encoding.GetString(Input: Cyrillic)
System.Text.Perf_Utf8Encoding.GetBytes(Input: Greek)
System.Text.Perf_Utf8Encoding.GetBytes(Input: Cyrillic)
Docs
Profiling workflow for dotnet/runtime repository Benchmarking workflow for dotnet/runtime repository
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 26 (25 by maintainers)
From @L2:
Regarding System.Text.Perf_Utf8Encoding.GetBytes(Input: Cyrillic) The regression seems to happen from this commit:
JIT: revise inlinee scale computations #51593
Commit: a4b0a038df1b PR: https://github.com/dotnet/runtime/pull/51593 It largely affects this method’s assembly (code blocks are moved around):System.Text.Unicode.Utf8Utility.TranscodeToUtf8(Char*, Int32, Byte*, Int32, Char* ByRef, Byte* ByRef)
Source: https://github.com/dotnet/runtime/blob/main/src/libraries/System.Private.CoreLib/src/System/Text/Unicode/Utf8Utility.Transcoding.cs#L842 The assemblies for this method are identical in Checked Mode but different in Release Mode. Trying to perform a jitdump using Release Mode crashes the jitdump. (Building in Release and Checked -> copying over the Checked crljit.dll into Release -> using Release with env var COMPlus_JitDump:TranscodeToUtf8 On the same note, I’ve also experienced the Debug Mode jitdump crash for this particular method at this commit (multiple assert failures).