-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Perf -30%] System.Tests.Perf_String.IndexerCheckPathLength #2290
Comments
@DrewScoggins - I see the title says |
Hmm, I am not sure, but it looks like this did not get filed correctly. I will take a look at this. |
The benchmark shows regression after my 32B method alignment changes because the hot loop earlier was contained in a 32B chunk, but with alignment, is split. However, I don't see the loop alignment changes would have any effect on this benchmark because there is a method call inside the loop that would just flush the cached code from DSB that that of the method Before loop alignment: G_M42081_IG03: ;; offset=0034H
00007ffb`a6f66c94 488BCE mov rcx, rsi
00007ffb`a6f66c97 8BD3 mov edx, ebx
00007ffb`a6f66c99 E83A1A90FF call System.Tests.Perf_String:getStringCharNoInline(System.String,int):ushort
00007ffb`a6f66c9e 03F8 add edi, eax
; =========================== 32B boundary ===========================
00007ffb`a6f66ca0 FFC3 inc ebx
00007ffb`a6f66ca2 3BEB cmp ebp, ebx
00007ffb`a6f66ca4 7FEE jg SHORT G_M42081_IG03
;; bbWeight=4 PerfScore 13.00 After loop alignment: 00007ffb`a6f371b4 0F1F40000F1F840000000000 align
; =========================== 32B boundary ===========================
00007ffb`a6f371c0 align
00007ffb`a6f371c0 align
;; bbWeight=1 PerfScore 8.25
G_M42081_IG03: ;; offset=0040H
00007ffb`a6f371c0 488BCE mov rcx, rsi
00007ffb`a6f371c3 8BD3 mov edx, ebx
00007ffb`a6f371c5 E88E1690FF call System.Tests.Perf_String:getStringCharNoInline(System.String,int):ushort
00007ffb`a6f371ca 03F8 add edi, eax
00007ffb`a6f371cc FFC3 inc ebx
00007ffb`a6f371ce 3BEB cmp ebp, ebx
00007ffb`a6f371d0 7FEE jg SHORT G_M42081_IG03 |
This was brought up in the past in dotnet/runtime#13090 (comment). From my analysis and trying out the loop alignment changes, this benchmark could certainly showing bimodal behavior because of memory alignment of string _s1 ? |
* Update dependencies from https://github.com/dotnet/arcade build 20220303.1 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk From Version 7.0.0-beta.22152.1 -> To Version 7.0.0-beta.22153.1 * Update dependencies from https://github.com/dotnet/arcade build 20220304.3 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk From Version 7.0.0-beta.22152.1 -> To Version 7.0.0-beta.22154.3 * Update dependencies from https://github.com/dotnet/arcade build 20220307.6 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk From Version 7.0.0-beta.22152.1 -> To Version 7.0.0-beta.22157.6 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Run Information
Regressions in System.Tests.Perf_String
Related Issue on x86 Windows
[Perf -8%] System.Tests.Perf_String.Replace_Char
Historical Data in Reporting System
Repro
Histogram
System.Tests.Perf_String.ToLowerInvariant(s: "test")
System.Tests.Perf_String.TrimEnd_CharArr(s: "Test", c: [' ', ' '])
System.Tests.Perf_String.Replace_Char(text: "Hello", oldChar: 'a', newChar: 'b')
System.Tests.Perf_String.TrimEnd(s: "Test")
System.Tests.Perf_String.ToUpperInvariant(s: "TEST")
System.Tests.Perf_String.Trim(s: " Test")
System.Tests.Perf_String.Replace_Char(text: "This is a very nice sentence", oldChar: 'z', newChar: 'y')
System.Tests.Perf_String.ToLower(s: "test")
System.Tests.Perf_String.Substring_Int(s: "dzsdzsDDZSDZSDZSddsz", i: 0)
System.Tests.Perf_String.Remove_Int(s: "dzsdzsDDZSDZSDZSddsz", i: 0)
System.Tests.Perf_String.TrimStart(s: "Test")
Docs
Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository
The text was updated successfully, but these errors were encountered: