dotnet / perf-autofiling-issues

A landing place for auto-filed performance issues before they receive triage
MIT License
9 stars 4 forks source link

[Perf] Windows/x64: 4 Improvements on 2/14/2023 5:47:38 PM #13166

Open performanceautofiler[bot] opened 1 year ago

performanceautofiler[bot] commented 1 year ago

Run Information

Architecture x64
OS Windows 10.0.18362
Baseline 33b552f0c201d1763375c2016aa303fbe9280e02
Compare cbc8695ae0c8c2c2d1ac1fc4546d81e0967ef716
Diff Diff

Improvements in Benchstone.BenchI.IniArray

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[Test - Duration of single invocation](<https://pvscmdupload.blob.core.windows.net/reports/allTestHistory/refs/heads/main_x64_Windows 10.0.18362/Benchstone.BenchI.IniArray.Test.html>) 111.18 ms 58.43 ms 0.53 0.04 False Trace Trace

graph Test Report

Repro

General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md

Payloads

Baseline Compare

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'Benchstone.BenchI.IniArray*'
### Payloads [Baseline]() [Compare]() ### Histogram #### Benchstone.BenchI.IniArray.Test ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 58.42865125 < 104.1134770625. IsChangePoint: Marked as a change because one of 2/9/2023 4:10:34 PM, 2/14/2023 11:21:41 AM, 2/21/2023 5:46:41 AM falls between 2/12/2023 2:35:10 PM and 2/21/2023 5:46:41 AM. IsImprovementStdDev: Marked as improvement because 7.693468227406232 (T) = (0 -58988580.69899925) / Math.Sqrt((181152785558044.38 / (299)) + (965461254316.6604 / (37))) is greater than 1.9670919629190173 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (37) - 2, .975) and 0.09394077212042395 = (65104552.642820604 - 58988580.69899925) / 65104552.642820604 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; Benchstone.BenchI.IniArray.Test() sub rsp,28 mov rcx,offset MT_System.Char[] mov edx,10 call CORINFO_HELP_NEWARR_1_VC xor edx,edx M00_L00: xor ecx,ecx nop dword ptr [rax] M00_L01: mov r8d,ecx mov word ptr [rax+r8*2+10],20 inc ecx cmp ecx,10 jl short M00_L01 inc edx cmp edx,989680 jl short M00_L00 add rsp,28 ret ; Total bytes of code 65 ``` ### Compare Jit Disasm ```assembly ; Benchstone.BenchI.IniArray.Test() sub rsp,28 mov rcx,offset MT_System.Char[] mov edx,10 call CORINFO_HELP_NEWARR_1_VC xor edx,edx M00_L00: xor ecx,ecx nop dword ptr [rax] M00_L01: mov r8d,ecx mov word ptr [rax+r8*2+10],20 inc ecx cmp ecx,10 jl short M00_L01 inc edx cmp edx,989680 jl short M00_L00 add rsp,28 ret ; Total bytes of code 65 ``` ### Docs [Profiling workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/profiling-workflow-dotnet-runtime.md) [Benchmarking workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/benchmarking-workflow-dotnet-runtime.md)

Run Information

Architecture x64
OS Windows 10.0.18362
Baseline 33b552f0c201d1763375c2016aa303fbe9280e02
Compare cbc8695ae0c8c2c2d1ac1fc4546d81e0967ef716
Diff Diff

Improvements in System.Tests.Perf_Int32

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[TryParse - Duration of single invocation](<https://pvscmdupload.blob.core.windows.net/reports/allTestHistory/refs/heads/main_x64_Windows 10.0.18362/System.Tests.Perf_Int32.TryParse(value%3a%20%224%22).html>) 13.38 ns 9.87 ns 0.74 0.63 False Trace Trace
[Parse - Duration of single invocation](<https://pvscmdupload.blob.core.windows.net/reports/allTestHistory/refs/heads/main_x64_Windows 10.0.18362/System.Tests.Perf_Int32.Parse(value%3a%20%224%22).html>) 13.82 ns 10.16 ns 0.73 0.56 False Trace Trace

graph graph Test Report

Repro

General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md

Payloads

Baseline Compare

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Tests.Perf_Int32*'
### Payloads [Baseline]() [Compare]() ### Histogram #### System.Tests.Perf_Int32.TryParse(value: "4") ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 9.869536540616874 < 12.694252001618093. IsChangePoint: Marked as a change because one of 1/30/2023 9:42:46 PM, 2/14/2023 11:21:41 AM, 2/21/2023 5:46:41 AM falls between 2/12/2023 2:35:10 PM and 2/21/2023 5:46:41 AM. IsImprovementStdDev: Marked as improvement because 4.396602239347764 (T) = (0 -10.484524211206404) / Math.Sqrt((1.9331510349551586 / (299)) + (0.92729576725793 / (37))) is greater than 1.9670919629190173 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (37) - 2, .975) and 0.06929840418163492 = (11.265183446889194 - 10.484524211206404) / 11.265183446889194 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; System.Tests.Perf_Int32.TryParse(System.String) sub rsp,38 vxorps xmm4,xmm4,xmm4 vmovdqa xmmword ptr [rsp+20],xmm4 xor eax,eax mov [rsp+30],rax test rdx,rdx je short M00_L01 lea rax,[rdx+0C] mov edx,[rdx+8] mov [rsp+20],rax mov [rsp+28],edx call qword ptr [7FFC96F0D8B8]; System.Globalization.NumberFormatInfo.get_CurrentInfo() mov r8,rax lea rcx,[rsp+20] lea r9,[rsp+30] mov edx,7 call qword ptr [7FFC96D1D3F0]; System.Number.TryParseInt32IntegerStyle(System.ReadOnlySpan`1, System.Globalization.NumberStyles, System.Globalization.NumberFormatInfo, Int32 ByRef) test eax,eax sete al movzx eax,al M00_L00: add rsp,38 ret M00_L01: xor edx,edx mov [rsp+30],edx xor eax,eax jmp short M00_L00 ; Total bytes of code 95 ``` ```assembly ; System.Globalization.NumberFormatInfo.get_CurrentInfo() sub rsp,28 mov rcx,7FFC96B54E68 mov edx,250 call CORINFO_HELP_GETSHARED_GCTHREADSTATIC_BASE mov rcx,[rax+8] test rcx,rcx jne short M01_L00 mov rcx,1E206400488 mov rcx,[rcx] test rcx,rcx jne short M01_L00 mov rcx,1E206400468 mov rcx,[rcx] test rcx,rcx je short M01_L03 M01_L00: cmp byte ptr [rcx+61],0 jne short M01_L01 mov rax,[rcx+18] test rax,rax je short M01_L01 add rsp,28 ret M01_L01: mov rdx,2229AF17430 mov rax,[rcx] mov rax,[rax+50] call qword ptr [rax] mov rdx,rax mov rax,rdx test rax,rax je short M01_L02 mov rcx,offset MT_System.Globalization.NumberFormatInfo cmp [rax],rcx jne short M01_L04 M01_L02: add rsp,28 ret M01_L03: call qword ptr [7FFC96D175D0] mov rcx,rax jmp short M01_L00 M01_L04: call qword ptr [7FFC96BED8B8] int 3 ; Total bytes of code 157 ``` ```assembly ; System.Number.TryParseInt32IntegerStyle(System.ReadOnlySpan`1, System.Globalization.NumberStyles, System.Globalization.NumberFormatInfo, Int32 ByRef) push r15 push r14 push r13 push r12 push rdi push rsi push rbp push rbx sub rsp,48 xor eax,eax mov [rsp+30],rax mov esi,edx mov rbx,r8 mov rdi,r9 mov rbp,[rcx] mov r14d,[rcx+8] test r14d,r14d je near ptr M02_L09 xor r15d,r15d movzx r12d,word ptr [rbp] test sil,1 je short M02_L00 cmp r12d,20 je near ptr M02_L20 lea eax,[r12-9] cmp eax,4 jbe near ptr M02_L20 M02_L00: mov r13d,1 test sil,4 je short M02_L01 cmp byte ptr [rbx+0BD],0 je near ptr M02_L22 cmp r12d,2D je near ptr M02_L11 cmp r12d,2B je near ptr M02_L21 M02_L01: xor ebx,ebx xor eax,eax lea ecx,[r12-30] cmp ecx,9 ja near ptr M02_L09 cmp r12d,30 je near ptr M02_L10 M02_L02: lea eax,[r12-30] inc r15d xor ecx,ecx M02_L03: cmp r15d,r14d jae near ptr M02_L05 mov edx,r15d movzx r12d,word ptr [rbp+rdx*2] lea edx,[r12-30] cmp edx,9 ja near ptr M02_L08 inc r15d lea eax,[rax+rax*4] lea eax,[r12+rax*2-30] mov r12d,eax inc ecx cmp ecx,8 mov eax,r12d jl short M02_L03 cmp r15d,r14d jae short M02_L05 mov ecx,r15d movzx r12d,word ptr [rbp+rcx*2] lea ecx,[r12-30] cmp ecx,9 ja short M02_L07 inc r15d xor ebx,ebx cmp eax,0CCCCCCC setg bl lea eax,[rax+rax*4] lea eax,[r12+rax*2-30] mov r12d,eax mov eax,r13d shr eax,1F add eax,7FFFFFFF cmp r12d,eax seta al movzx eax,al or eax,ebx movzx ebx,al cmp r15d,r14d jb near ptr M02_L13 M02_L04: test ebx,ebx mov eax,r12d jne near ptr M02_L14 M02_L05: imul eax,r13d mov [rdi],eax xor eax,eax M02_L06: add rsp,48 pop rbx pop rbp pop rsi pop rdi pop r12 pop r13 pop r14 pop r15 ret M02_L07: mov [rsp+44],eax jmp near ptr M02_L15 M02_L08: mov [rsp+44],eax jmp near ptr M02_L15 M02_L09: xor eax,eax mov [rdi],eax mov eax,1 jmp short M02_L06 M02_L10: inc r15d cmp r15d,r14d jae short M02_L05 mov ecx,r15d movzx r12d,word ptr [rbp+rcx*2] cmp r12d,30 je short M02_L10 lea ecx,[r12-30] cmp ecx,9 mov [rsp+44],eax ja short M02_L15 jmp near ptr M02_L02 M02_L11: mov r13d,0FFFFFFFF inc r15d cmp r15d,r14d jae short M02_L09 jmp near ptr M02_L26 M02_L12: mov ebx,1 inc r15d cmp r15d,r14d jae short M02_L14 M02_L13: cmp r15d,r14d jae near ptr M02_L27 mov ecx,r15d movzx ecx,word ptr [rbp+rcx*2] mov eax,ecx lea ecx,[rax-30] cmp ecx,9 jbe short M02_L12 mov [rsp+44],r12d mov r12d,eax jmp short M02_L15 M02_L14: xor eax,eax mov [rdi],eax mov eax,2 jmp near ptr M02_L06 M02_L15: mov ecx,r12d call qword ptr [7FFC96D1D720]; System.Number.IsWhite(Int32) test eax,eax je short M02_L19 test sil,2 je near ptr M02_L09 mov r12d,[rsp+44] jmp short M02_L17 M02_L16: cmp r15d,r14d jae near ptr M02_L27 mov ecx,r15d movzx ecx,word ptr [rbp+rcx*2] call qword ptr [7FFC96D1D720]; System.Number.IsWhite(Int32) test eax,eax je short M02_L18 M02_L17: inc r15d cmp r15d,r14d jl short M02_L16 M02_L18: cmp r15d,r14d jae near ptr M02_L04 mov [rsp+44],r12d M02_L19: mov [rsp+30],rbp mov [rsp+38],r14d lea rcx,[rsp+30] mov edx,r15d call qword ptr [7FFC96D1D6C0] test eax,eax mov r12d,[rsp+44] jne near ptr M02_L04 jmp near ptr M02_L09 M02_L20: inc r15d cmp r15d,r14d jae near ptr M02_L09 mov ecx,r15d movzx r12d,word ptr [rbp+rcx*2] mov ecx,r12d call qword ptr [7FFC96D1D720]; System.Number.IsWhite(Int32) test eax,eax jne short M02_L20 jmp near ptr M02_L00 M02_L21: inc r15d cmp r15d,r14d jae near ptr M02_L09 jmp near ptr M02_L26 M02_L22: cmp byte ptr [rbx+0BE],0 je short M02_L23 cmp r12d,2D jne short M02_L23 mov r13d,0FFFFFFFF inc r15d cmp r15d,r14d jae near ptr M02_L09 jmp near ptr M02_L26 M02_L23: cmp r15d,r14d jbe short M02_L24 call qword ptr [7FFC96F2D4E0] int 3 M02_L24: mov r8d,r15d lea rbp,[rbp+r8*2] sub r14d,r15d xor r15d,r15d mov rax,[rbx+20] mov [rsp+28],rax mov rbx,[rbx+28] test rax,rax je short M02_L25 xor r8d,r8d cmp dword ptr [rax+8],0 sete r8b test r8d,r8d jne short M02_L25 lea rdx,[rax+0C] mov r8d,[rax+8] cmp r8d,r14d jg short M02_L25 mov r8d,r8d add r8,r8 mov rcx,rbp call qword ptr [7FFC96CA1270] test eax,eax je short M02_L25 mov r15,[rsp+28] mov r15d,[r15+8] cmp r15d,r14d jae near ptr M02_L09 jmp short M02_L26 M02_L25: test rbx,rbx je near ptr M02_L01 xor r8d,r8d cmp dword ptr [rbx+8],0 sete r8b test r8d,r8d jne near ptr M02_L01 lea rdx,[rbx+0C] mov r8d,[rbx+8] cmp r8d,r14d jg near ptr M02_L01 mov r8d,r8d add r8,r8 mov rcx,rbp call qword ptr [7FFC96CA1270] test eax,eax je near ptr M02_L01 mov r13d,0FFFFFFFF mov r15d,[rbx+8] cmp r15d,r14d jae near ptr M02_L09 M02_L26: cmp r15d,r14d jae short M02_L27 mov ecx,r15d movzx r12d,word ptr [rbp+rcx*2] jmp near ptr M02_L01 M02_L27: call CORINFO_HELP_RNGCHKFAIL int 3 ; Total bytes of code 936 ``` ### Compare Jit Disasm ```assembly ; System.Tests.Perf_Int32.TryParse(System.String) sub rsp,38 vxorps xmm4,xmm4,xmm4 vmovdqa xmmword ptr [rsp+20],xmm4 xor eax,eax mov [rsp+30],rax test rdx,rdx je short M00_L01 lea rax,[rdx+0C] mov edx,[rdx+8] mov [rsp+20],rax mov [rsp+28],edx call qword ptr [7FFE489AD8B8]; System.Globalization.NumberFormatInfo.get_CurrentInfo() mov r8,rax lea rcx,[rsp+20] lea r9,[rsp+30] mov edx,7 call qword ptr [7FFE487BDC00]; System.Number.TryParseInt32IntegerStyle(System.ReadOnlySpan`1, System.Globalization.NumberStyles, System.Globalization.NumberFormatInfo, Int32 ByRef) test eax,eax sete al movzx eax,al M00_L00: add rsp,38 ret M00_L01: xor edx,edx mov [rsp+30],edx xor eax,eax jmp short M00_L00 ; Total bytes of code 95 ``` ```assembly ; System.Globalization.NumberFormatInfo.get_CurrentInfo() sub rsp,28 mov rcx,7FFE485F4EA8 mov edx,251 call CORINFO_HELP_GETSHARED_GCTHREADSTATIC_BASE mov rcx,[rax+8] test rcx,rcx jne short M01_L00 mov rcx,23EF6400478 mov rcx,[rcx] test rcx,rcx jne short M01_L00 mov rcx,23EF6400458 mov rcx,[rcx] test rcx,rcx je short M01_L03 M01_L00: cmp byte ptr [rcx+61],0 jne short M01_L01 mov rax,[rcx+18] test rax,rax je short M01_L01 add rsp,28 ret M01_L01: mov rdx,27F8AF67408 mov rax,[rcx] mov rax,[rax+50] call qword ptr [rax] mov rdx,rax mov rax,rdx test rax,rax je short M01_L02 mov rcx,offset MT_System.Globalization.NumberFormatInfo cmp [rax],rcx jne short M01_L04 M01_L02: add rsp,28 ret M01_L03: call qword ptr [7FFE487B9030] mov rcx,rax jmp short M01_L00 M01_L04: call qword ptr [7FFE4868D8B8] int 3 ; Total bytes of code 157 ``` ```assembly ; System.Number.TryParseInt32IntegerStyle(System.ReadOnlySpan`1, System.Globalization.NumberStyles, System.Globalization.NumberFormatInfo, Int32 ByRef) push r15 push r14 push r13 push r12 push rdi push rsi push rbp push rbx sub rsp,48 xor eax,eax mov [rsp+30],rax mov esi,edx mov rbx,r8 mov rdi,r9 mov rbp,[rcx] mov r14d,[rcx+8] test r14d,r14d je near ptr M02_L09 xor r15d,r15d movzx r12d,word ptr [rbp] test sil,1 je short M02_L00 cmp r12d,20 je near ptr M02_L20 lea eax,[r12-9] cmp eax,4 jbe near ptr M02_L20 M02_L00: mov r13d,1 test sil,4 je short M02_L01 cmp byte ptr [rbx+0BD],0 je near ptr M02_L22 cmp r12d,2D je near ptr M02_L11 cmp r12d,2B je near ptr M02_L21 M02_L01: xor ebx,ebx xor eax,eax lea ecx,[r12-30] cmp ecx,9 ja near ptr M02_L09 cmp r12d,30 je near ptr M02_L10 M02_L02: lea eax,[r12-30] inc r15d xor ecx,ecx M02_L03: cmp r15d,r14d jae near ptr M02_L05 mov edx,r15d movzx r12d,word ptr [rbp+rdx*2] lea edx,[r12-30] cmp edx,9 ja near ptr M02_L08 inc r15d lea eax,[rax+rax*4] lea eax,[r12+rax*2-30] mov r12d,eax inc ecx cmp ecx,8 mov eax,r12d jl short M02_L03 cmp r15d,r14d jae short M02_L05 mov ecx,r15d movzx r12d,word ptr [rbp+rcx*2] lea ecx,[r12-30] cmp ecx,9 ja short M02_L07 inc r15d xor ebx,ebx cmp eax,0CCCCCCC setg bl lea eax,[rax+rax*4] lea eax,[r12+rax*2-30] mov r12d,eax mov eax,r13d shr eax,1F add eax,7FFFFFFF cmp r12d,eax seta al movzx eax,al or eax,ebx movzx ebx,al cmp r15d,r14d jb near ptr M02_L13 M02_L04: test ebx,ebx mov eax,r12d jne near ptr M02_L14 M02_L05: imul eax,r13d mov [rdi],eax xor eax,eax M02_L06: add rsp,48 pop rbx pop rbp pop rsi pop rdi pop r12 pop r13 pop r14 pop r15 ret M02_L07: mov [rsp+44],eax jmp near ptr M02_L15 M02_L08: mov [rsp+44],eax jmp near ptr M02_L15 M02_L09: xor eax,eax mov [rdi],eax mov eax,1 jmp short M02_L06 M02_L10: inc r15d cmp r15d,r14d jae short M02_L05 mov ecx,r15d movzx r12d,word ptr [rbp+rcx*2] cmp r12d,30 je short M02_L10 lea ecx,[r12-30] cmp ecx,9 mov [rsp+44],eax ja short M02_L15 jmp near ptr M02_L02 M02_L11: mov r13d,0FFFFFFFF inc r15d cmp r15d,r14d jae short M02_L09 jmp near ptr M02_L26 M02_L12: mov ebx,1 inc r15d cmp r15d,r14d jae short M02_L14 M02_L13: cmp r15d,r14d jae near ptr M02_L27 mov ecx,r15d movzx ecx,word ptr [rbp+rcx*2] mov eax,ecx lea ecx,[rax-30] cmp ecx,9 jbe short M02_L12 mov [rsp+44],r12d mov r12d,eax jmp short M02_L15 M02_L14: xor eax,eax mov [rdi],eax mov eax,2 jmp near ptr M02_L06 M02_L15: mov ecx,r12d call qword ptr [7FFE487BDF30]; System.Number.IsWhite(Int32) test eax,eax je short M02_L19 test sil,2 je near ptr M02_L09 mov r12d,[rsp+44] jmp short M02_L17 M02_L16: cmp r15d,r14d jae near ptr M02_L27 mov ecx,r15d movzx ecx,word ptr [rbp+rcx*2] call qword ptr [7FFE487BDF30]; System.Number.IsWhite(Int32) test eax,eax je short M02_L18 M02_L17: inc r15d cmp r15d,r14d jl short M02_L16 M02_L18: cmp r15d,r14d jae near ptr M02_L04 mov [rsp+44],r12d M02_L19: mov [rsp+30],rbp mov [rsp+38],r14d lea rcx,[rsp+30] mov edx,r15d call qword ptr [7FFE487BDED0] test eax,eax mov r12d,[rsp+44] jne near ptr M02_L04 jmp near ptr M02_L09 M02_L20: inc r15d cmp r15d,r14d jae near ptr M02_L09 mov ecx,r15d movzx r12d,word ptr [rbp+rcx*2] mov ecx,r12d call qword ptr [7FFE487BDF30]; System.Number.IsWhite(Int32) test eax,eax jne short M02_L20 jmp near ptr M02_L00 M02_L21: inc r15d cmp r15d,r14d jae near ptr M02_L09 jmp near ptr M02_L26 M02_L22: cmp byte ptr [rbx+0BE],0 je short M02_L23 cmp r12d,2D jne short M02_L23 mov r13d,0FFFFFFFF inc r15d cmp r15d,r14d jae near ptr M02_L09 jmp near ptr M02_L26 M02_L23: cmp r15d,r14d jbe short M02_L24 call qword ptr [7FFE489DD4E0] int 3 M02_L24: mov r8d,r15d lea rbp,[rbp+r8*2] sub r14d,r15d xor r15d,r15d mov rax,[rbx+20] mov [rsp+28],rax mov rbx,[rbx+28] test rax,rax je short M02_L25 xor r8d,r8d cmp dword ptr [rax+8],0 sete r8b test r8d,r8d jne short M02_L25 lea rdx,[rax+0C] mov r8d,[rax+8] cmp r8d,r14d jg short M02_L25 mov r8d,r8d add r8,r8 mov rcx,rbp call qword ptr [7FFE48741450] test eax,eax je short M02_L25 mov r15,[rsp+28] mov r15d,[r15+8] cmp r15d,r14d jae near ptr M02_L09 jmp short M02_L26 M02_L25: test rbx,rbx je near ptr M02_L01 xor r8d,r8d cmp dword ptr [rbx+8],0 sete r8b test r8d,r8d jne near ptr M02_L01 lea rdx,[rbx+0C] mov r8d,[rbx+8] cmp r8d,r14d jg near ptr M02_L01 mov r8d,r8d add r8,r8 mov rcx,rbp call qword ptr [7FFE48741450] test eax,eax je near ptr M02_L01 mov r13d,0FFFFFFFF mov r15d,[rbx+8] cmp r15d,r14d jae near ptr M02_L09 M02_L26: cmp r15d,r14d jae short M02_L27 mov ecx,r15d movzx r12d,word ptr [rbp+rcx*2] jmp near ptr M02_L01 M02_L27: call CORINFO_HELP_RNGCHKFAIL int 3 ; Total bytes of code 936 ``` #### System.Tests.Perf_Int32.Parse(value: "4") ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 10.159945717987135 < 11.229330777691725. IsChangePoint: Marked as a change because one of 1/27/2023 8:07:09 AM, 2/14/2023 11:21:41 AM, 2/21/2023 5:46:41 AM falls between 2/12/2023 2:35:10 PM and 2/21/2023 5:46:41 AM. IsImprovementStdDev: Marked as improvement because 10.745562297273597 (T) = (0 -10.386187886647365) / Math.Sqrt((1.628955737469496 / (299)) + (0.15523565387679042 / (37))) is greater than 1.9670919629190173 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (37) - 2, .975) and 0.09222913705829713 = (11.441420198253672 - 10.386187886647365) / 11.441420198253672 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; System.Tests.Perf_Int32.Parse(System.String) push rdi push rsi sub rsp,38 xor eax,eax mov [rsp+20],rax test rdx,rdx je short M00_L00 lea rsi,[rdx+0C] mov edi,[rdx+8] mov [rsp+20],rsi mov [rsp+28],edi call qword ptr [7FFEED00D8B8]; System.Globalization.NumberFormatInfo.get_CurrentInfo() mov r8,rax lea rcx,[rsp+20] lea r9,[rsp+30] mov edx,7 call qword ptr [7FFEECE1D3F0]; System.Number.TryParseInt32IntegerStyle(System.ReadOnlySpan`1, System.Globalization.NumberStyles, System.Globalization.NumberFormatInfo, Int32 ByRef) mov ecx,eax test ecx,ecx jne short M00_L01 mov eax,[rsp+30] add rsp,38 pop rsi pop rdi ret M00_L00: mov ecx,11 call qword ptr [7FFEED02D7F8] int 3 M00_L01: mov [rsp+20],rsi mov [rsp+28],edi lea rdx,[rsp+20] mov r8d,9 call qword ptr [7FFEECE1D750] int 3 ; Total bytes of code 120 ``` ```assembly ; System.Globalization.NumberFormatInfo.get_CurrentInfo() sub rsp,28 mov rcx,7FFEECC54E68 mov edx,250 call CORINFO_HELP_GETSHARED_GCTHREADSTATIC_BASE mov rcx,[rax+8] test rcx,rcx jne short M01_L00 mov rcx,229EE400488 mov rcx,[rcx] test rcx,rcx jne short M01_L00 mov rcx,229EE400468 mov rcx,[rcx] test rcx,rcx je short M01_L03 M01_L00: cmp byte ptr [rcx+61],0 jne short M01_L01 mov rax,[rcx+18] test rax,rax je short M01_L01 add rsp,28 ret M01_L01: mov rdx,26A82E27430 mov rax,[rcx] mov rax,[rax+50] call qword ptr [rax] mov rdx,rax mov rax,rdx test rax,rax je short M01_L02 mov rcx,offset MT_System.Globalization.NumberFormatInfo cmp [rax],rcx jne short M01_L04 M01_L02: add rsp,28 ret M01_L03: call qword ptr [7FFEECE175D0] mov rcx,rax jmp short M01_L00 M01_L04: call qword ptr [7FFEECCED8B8] int 3 ; Total bytes of code 157 ``` ```assembly ; System.Number.TryParseInt32IntegerStyle(System.ReadOnlySpan`1, System.Globalization.NumberStyles, System.Globalization.NumberFormatInfo, Int32 ByRef) push r15 push r14 push r13 push r12 push rdi push rsi push rbp push rbx sub rsp,48 xor eax,eax mov [rsp+30],rax mov esi,edx mov rbx,r8 mov rdi,r9 mov rbp,[rcx] mov r14d,[rcx+8] test r14d,r14d je near ptr M02_L09 xor r15d,r15d movzx r12d,word ptr [rbp] test sil,1 je short M02_L00 cmp r12d,20 je near ptr M02_L20 lea eax,[r12-9] cmp eax,4 jbe near ptr M02_L20 M02_L00: mov r13d,1 test sil,4 je short M02_L01 cmp byte ptr [rbx+0BD],0 je near ptr M02_L22 cmp r12d,2D je near ptr M02_L11 cmp r12d,2B je near ptr M02_L21 M02_L01: xor ebx,ebx xor eax,eax lea ecx,[r12-30] cmp ecx,9 ja near ptr M02_L09 cmp r12d,30 je near ptr M02_L10 M02_L02: lea eax,[r12-30] inc r15d xor ecx,ecx M02_L03: cmp r15d,r14d jae near ptr M02_L05 mov edx,r15d movzx r12d,word ptr [rbp+rdx*2] lea edx,[r12-30] cmp edx,9 ja near ptr M02_L08 inc r15d lea eax,[rax+rax*4] lea eax,[r12+rax*2-30] mov r12d,eax inc ecx cmp ecx,8 mov eax,r12d jl short M02_L03 cmp r15d,r14d jae short M02_L05 mov ecx,r15d movzx r12d,word ptr [rbp+rcx*2] lea ecx,[r12-30] cmp ecx,9 ja short M02_L07 inc r15d xor ebx,ebx cmp eax,0CCCCCCC setg bl lea eax,[rax+rax*4] lea eax,[r12+rax*2-30] mov r12d,eax mov eax,r13d shr eax,1F add eax,7FFFFFFF cmp r12d,eax seta al movzx eax,al or eax,ebx movzx ebx,al cmp r15d,r14d jb near ptr M02_L13 M02_L04: test ebx,ebx mov eax,r12d jne near ptr M02_L14 M02_L05: imul eax,r13d mov [rdi],eax xor eax,eax M02_L06: add rsp,48 pop rbx pop rbp pop rsi pop rdi pop r12 pop r13 pop r14 pop r15 ret M02_L07: mov [rsp+44],eax jmp near ptr M02_L15 M02_L08: mov [rsp+44],eax jmp near ptr M02_L15 M02_L09: xor eax,eax mov [rdi],eax mov eax,1 jmp short M02_L06 M02_L10: inc r15d cmp r15d,r14d jae short M02_L05 mov ecx,r15d movzx r12d,word ptr [rbp+rcx*2] cmp r12d,30 je short M02_L10 lea ecx,[r12-30] cmp ecx,9 mov [rsp+44],eax ja short M02_L15 jmp near ptr M02_L02 M02_L11: mov r13d,0FFFFFFFF inc r15d cmp r15d,r14d jae short M02_L09 jmp near ptr M02_L26 M02_L12: mov ebx,1 inc r15d cmp r15d,r14d jae short M02_L14 M02_L13: cmp r15d,r14d jae near ptr M02_L27 mov ecx,r15d movzx ecx,word ptr [rbp+rcx*2] mov eax,ecx lea ecx,[rax-30] cmp ecx,9 jbe short M02_L12 mov [rsp+44],r12d mov r12d,eax jmp short M02_L15 M02_L14: xor eax,eax mov [rdi],eax mov eax,2 jmp near ptr M02_L06 M02_L15: mov ecx,r12d call qword ptr [7FFEECE1D720]; System.Number.IsWhite(Int32) test eax,eax je short M02_L19 test sil,2 je near ptr M02_L09 mov r12d,[rsp+44] jmp short M02_L17 M02_L16: cmp r15d,r14d jae near ptr M02_L27 mov ecx,r15d movzx ecx,word ptr [rbp+rcx*2] call qword ptr [7FFEECE1D720]; System.Number.IsWhite(Int32) test eax,eax je short M02_L18 M02_L17: inc r15d cmp r15d,r14d jl short M02_L16 M02_L18: cmp r15d,r14d jae near ptr M02_L04 mov [rsp+44],r12d M02_L19: mov [rsp+30],rbp mov [rsp+38],r14d lea rcx,[rsp+30] mov edx,r15d call qword ptr [7FFEECE1D6C0] test eax,eax mov r12d,[rsp+44] jne near ptr M02_L04 jmp near ptr M02_L09 M02_L20: inc r15d cmp r15d,r14d jae near ptr M02_L09 mov ecx,r15d movzx r12d,word ptr [rbp+rcx*2] mov ecx,r12d call qword ptr [7FFEECE1D720]; System.Number.IsWhite(Int32) test eax,eax jne short M02_L20 jmp near ptr M02_L00 M02_L21: inc r15d cmp r15d,r14d jae near ptr M02_L09 jmp near ptr M02_L26 M02_L22: cmp byte ptr [rbx+0BE],0 je short M02_L23 cmp r12d,2D jne short M02_L23 mov r13d,0FFFFFFFF inc r15d cmp r15d,r14d jae near ptr M02_L09 jmp near ptr M02_L26 M02_L23: cmp r15d,r14d jbe short M02_L24 call qword ptr [7FFEED02D4E0] int 3 M02_L24: mov r8d,r15d lea rbp,[rbp+r8*2] sub r14d,r15d xor r15d,r15d mov rax,[rbx+20] mov [rsp+28],rax mov rbx,[rbx+28] test rax,rax je short M02_L25 xor r8d,r8d cmp dword ptr [rax+8],0 sete r8b test r8d,r8d jne short M02_L25 lea rdx,[rax+0C] mov r8d,[rax+8] cmp r8d,r14d jg short M02_L25 mov r8d,r8d add r8,r8 mov rcx,rbp call qword ptr [7FFEECDA1270] test eax,eax je short M02_L25 mov r15,[rsp+28] mov r15d,[r15+8] cmp r15d,r14d jae near ptr M02_L09 jmp short M02_L26 M02_L25: test rbx,rbx je near ptr M02_L01 xor r8d,r8d cmp dword ptr [rbx+8],0 sete r8b test r8d,r8d jne near ptr M02_L01 lea rdx,[rbx+0C] mov r8d,[rbx+8] cmp r8d,r14d jg near ptr M02_L01 mov r8d,r8d add r8,r8 mov rcx,rbp call qword ptr [7FFEECDA1270] test eax,eax je near ptr M02_L01 mov r13d,0FFFFFFFF mov r15d,[rbx+8] cmp r15d,r14d jae near ptr M02_L09 M02_L26: cmp r15d,r14d jae short M02_L27 mov ecx,r15d movzx r12d,word ptr [rbp+rcx*2] jmp near ptr M02_L01 M02_L27: call CORINFO_HELP_RNGCHKFAIL int 3 ; Total bytes of code 936 ``` ### Compare Jit Disasm ```assembly ; System.Tests.Perf_Int32.Parse(System.String) push rdi push rsi sub rsp,38 xor eax,eax mov [rsp+20],rax test rdx,rdx je short M00_L00 lea rsi,[rdx+0C] mov edi,[rdx+8] mov [rsp+20],rsi mov [rsp+28],edi call qword ptr [7FF87664D8B8]; System.Globalization.NumberFormatInfo.get_CurrentInfo() mov r8,rax lea rcx,[rsp+20] lea r9,[rsp+30] mov edx,7 call qword ptr [7FF87645DC00]; System.Number.TryParseInt32IntegerStyle(System.ReadOnlySpan`1, System.Globalization.NumberStyles, System.Globalization.NumberFormatInfo, Int32 ByRef) mov ecx,eax test ecx,ecx jne short M00_L01 mov eax,[rsp+30] add rsp,38 pop rsi pop rdi ret M00_L00: mov ecx,11 call qword ptr [7FF87667D7F8] int 3 M00_L01: mov [rsp+20],rsi mov [rsp+28],edi lea rdx,[rsp+20] mov r8d,9 call qword ptr [7FF87645DF60] int 3 ; Total bytes of code 120 ``` ```assembly ; System.Globalization.NumberFormatInfo.get_CurrentInfo() sub rsp,28 mov rcx,7FF876294EA8 mov edx,251 call CORINFO_HELP_GETSHARED_GCTHREADSTATIC_BASE mov rcx,[rax+8] test rcx,rcx jne short M01_L00 mov rcx,19CC0800478 mov rcx,[rcx] test rcx,rcx jne short M01_L00 mov rcx,19CC0800458 mov rcx,[rcx] test rcx,rcx je short M01_L03 M01_L00: cmp byte ptr [rcx+61],0 jne short M01_L01 mov rax,[rcx+18] test rax,rax je short M01_L01 add rsp,28 ret M01_L01: mov rdx,1DD550A7408 mov rax,[rcx] mov rax,[rax+50] call qword ptr [rax] mov rdx,rax mov rax,rdx test rax,rax je short M01_L02 mov rcx,offset MT_System.Globalization.NumberFormatInfo cmp [rax],rcx jne short M01_L04 M01_L02: add rsp,28 ret M01_L03: call qword ptr [7FF876459030] mov rcx,rax jmp short M01_L00 M01_L04: call qword ptr [7FF87632D8B8] int 3 ; Total bytes of code 157 ``` ```assembly ; System.Number.TryParseInt32IntegerStyle(System.ReadOnlySpan`1, System.Globalization.NumberStyles, System.Globalization.NumberFormatInfo, Int32 ByRef) push r15 push r14 push r13 push r12 push rdi push rsi push rbp push rbx sub rsp,48 xor eax,eax mov [rsp+30],rax mov esi,edx mov rbx,r8 mov rdi,r9 mov rbp,[rcx] mov r14d,[rcx+8] test r14d,r14d je near ptr M02_L09 xor r15d,r15d movzx r12d,word ptr [rbp] test sil,1 je short M02_L00 cmp r12d,20 je near ptr M02_L20 lea eax,[r12-9] cmp eax,4 jbe near ptr M02_L20 M02_L00: mov r13d,1 test sil,4 je short M02_L01 cmp byte ptr [rbx+0BD],0 je near ptr M02_L22 cmp r12d,2D je near ptr M02_L11 cmp r12d,2B je near ptr M02_L21 M02_L01: xor ebx,ebx xor eax,eax lea ecx,[r12-30] cmp ecx,9 ja near ptr M02_L09 cmp r12d,30 je near ptr M02_L10 M02_L02: lea eax,[r12-30] inc r15d xor ecx,ecx M02_L03: cmp r15d,r14d jae near ptr M02_L05 mov edx,r15d movzx r12d,word ptr [rbp+rdx*2] lea edx,[r12-30] cmp edx,9 ja near ptr M02_L08 inc r15d lea eax,[rax+rax*4] lea eax,[r12+rax*2-30] mov r12d,eax inc ecx cmp ecx,8 mov eax,r12d jl short M02_L03 cmp r15d,r14d jae short M02_L05 mov ecx,r15d movzx r12d,word ptr [rbp+rcx*2] lea ecx,[r12-30] cmp ecx,9 ja short M02_L07 inc r15d xor ebx,ebx cmp eax,0CCCCCCC setg bl lea eax,[rax+rax*4] lea eax,[r12+rax*2-30] mov r12d,eax mov eax,r13d shr eax,1F add eax,7FFFFFFF cmp r12d,eax seta al movzx eax,al or eax,ebx movzx ebx,al cmp r15d,r14d jb near ptr M02_L13 M02_L04: test ebx,ebx mov eax,r12d jne near ptr M02_L14 M02_L05: imul eax,r13d mov [rdi],eax xor eax,eax M02_L06: add rsp,48 pop rbx pop rbp pop rsi pop rdi pop r12 pop r13 pop r14 pop r15 ret M02_L07: mov [rsp+44],eax jmp near ptr M02_L15 M02_L08: mov [rsp+44],eax jmp near ptr M02_L15 M02_L09: xor eax,eax mov [rdi],eax mov eax,1 jmp short M02_L06 M02_L10: inc r15d cmp r15d,r14d jae short M02_L05 mov ecx,r15d movzx r12d,word ptr [rbp+rcx*2] cmp r12d,30 je short M02_L10 lea ecx,[r12-30] cmp ecx,9 mov [rsp+44],eax ja short M02_L15 jmp near ptr M02_L02 M02_L11: mov r13d,0FFFFFFFF inc r15d cmp r15d,r14d jae short M02_L09 jmp near ptr M02_L26 M02_L12: mov ebx,1 inc r15d cmp r15d,r14d jae short M02_L14 M02_L13: cmp r15d,r14d jae near ptr M02_L27 mov ecx,r15d movzx ecx,word ptr [rbp+rcx*2] mov eax,ecx lea ecx,[rax-30] cmp ecx,9 jbe short M02_L12 mov [rsp+44],r12d mov r12d,eax jmp short M02_L15 M02_L14: xor eax,eax mov [rdi],eax mov eax,2 jmp near ptr M02_L06 M02_L15: mov ecx,r12d call qword ptr [7FF87645DF30]; System.Number.IsWhite(Int32) test eax,eax je short M02_L19 test sil,2 je near ptr M02_L09 mov r12d,[rsp+44] jmp short M02_L17 M02_L16: cmp r15d,r14d jae near ptr M02_L27 mov ecx,r15d movzx ecx,word ptr [rbp+rcx*2] call qword ptr [7FF87645DF30]; System.Number.IsWhite(Int32) test eax,eax je short M02_L18 M02_L17: inc r15d cmp r15d,r14d jl short M02_L16 M02_L18: cmp r15d,r14d jae near ptr M02_L04 mov [rsp+44],r12d M02_L19: mov [rsp+30],rbp mov [rsp+38],r14d lea rcx,[rsp+30] mov edx,r15d call qword ptr [7FF87645DED0] test eax,eax mov r12d,[rsp+44] jne near ptr M02_L04 jmp near ptr M02_L09 M02_L20: inc r15d cmp r15d,r14d jae near ptr M02_L09 mov ecx,r15d movzx r12d,word ptr [rbp+rcx*2] mov ecx,r12d call qword ptr [7FF87645DF30]; System.Number.IsWhite(Int32) test eax,eax jne short M02_L20 jmp near ptr M02_L00 M02_L21: inc r15d cmp r15d,r14d jae near ptr M02_L09 jmp near ptr M02_L26 M02_L22: cmp byte ptr [rbx+0BE],0 je short M02_L23 cmp r12d,2D jne short M02_L23 mov r13d,0FFFFFFFF inc r15d cmp r15d,r14d jae near ptr M02_L09 jmp near ptr M02_L26 M02_L23: cmp r15d,r14d jbe short M02_L24 call qword ptr [7FF87667D4E0] int 3 M02_L24: mov r8d,r15d lea rbp,[rbp+r8*2] sub r14d,r15d xor r15d,r15d mov rax,[rbx+20] mov [rsp+28],rax mov rbx,[rbx+28] test rax,rax je short M02_L25 xor r8d,r8d cmp dword ptr [rax+8],0 sete r8b test r8d,r8d jne short M02_L25 lea rdx,[rax+0C] mov r8d,[rax+8] cmp r8d,r14d jg short M02_L25 mov r8d,r8d add r8,r8 mov rcx,rbp call qword ptr [7FF8763E1450] test eax,eax je short M02_L25 mov r15,[rsp+28] mov r15d,[r15+8] cmp r15d,r14d jae near ptr M02_L09 jmp short M02_L26 M02_L25: test rbx,rbx je near ptr M02_L01 xor r8d,r8d cmp dword ptr [rbx+8],0 sete r8b test r8d,r8d jne near ptr M02_L01 lea rdx,[rbx+0C] mov r8d,[rbx+8] cmp r8d,r14d jg near ptr M02_L01 mov r8d,r8d add r8,r8 mov rcx,rbp call qword ptr [7FF8763E1450] test eax,eax je near ptr M02_L01 mov r13d,0FFFFFFFF mov r15d,[rbx+8] cmp r15d,r14d jae near ptr M02_L09 M02_L26: cmp r15d,r14d jae short M02_L27 mov ecx,r15d movzx r12d,word ptr [rbp+rcx*2] jmp near ptr M02_L01 M02_L27: call CORINFO_HELP_RNGCHKFAIL int 3 ; Total bytes of code 936 ``` ### Docs [Profiling workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/profiling-workflow-dotnet-runtime.md) [Benchmarking workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/benchmarking-workflow-dotnet-runtime.md)
performanceautofiler[bot] commented 1 year ago

Run Information

Architecture x64
OS Windows 10.0.18362
Baseline 33b552f0c201d1763375c2016aa303fbe9280e02
Compare cbc8695ae0c8c2c2d1ac1fc4546d81e0967ef716
Diff Diff

Improvements in System.Tests.Perf_UInt32

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[TryParse - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x64_Windows 10.0.18362/System.Tests.Perf_UInt32.TryParse(value%3a%20%220%22).html>) 11.80 ns 10.68 ns 0.90 0.56 False Trace Trace

graph Test Report

Repro

General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md

Payloads

Baseline Compare

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Tests.Perf_UInt32*'
### Payloads [Baseline]() [Compare]() ### Histogram #### System.Tests.Perf_UInt32.TryParse(value: "0") ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsRegressionBase: Marked as not a regression because the compare was not 5% greater than the baseline, or the value was too small. IsImprovementBase: Marked as improvement because the compare was 5% less than the baseline, and the value was not too small. IsImprovementCheck: Marked as improvement because the three check build points were 0.05 less than the baseline. IsImprovementWindowed:Marked as improvement because 10.676178745932674 < 11.208755285609596. IsChangePoint: Marked as a change because one of 1/26/2023 1:49:07 PM, 2/14/2023 11:21:41 AM, 2/21/2023 5:46:41 AM falls between 2/12/2023 2:35:10 PM and 2/21/2023 5:46:41 AM. IsImprovementStdDev: Marked as improvement because 7.419420480701351 (T) = (0 -10.949842415136686) / Math.Sqrt((1.319194496582678 / (299)) + (0.2169632195971677 / (37))) is greater than 1.9670919629190173 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (37) - 2, .975) and 0.06427195886973622 = (11.701949641169668 - 10.949842415136686) / 11.701949641169668 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; System.Tests.Perf_UInt32.TryParse(System.String) sub rsp,38 vxorps xmm4,xmm4,xmm4 vmovdqa xmmword ptr [rsp+20],xmm4 xor eax,eax mov [rsp+30],rax test rdx,rdx jne short M00_L01 xor eax,eax mov [rsp+30],eax M00_L00: add rsp,38 ret M00_L01: lea rax,[rdx+0C] mov edx,[rdx+8] mov [rsp+20],rax mov [rsp+28],edx call qword ptr [7FFC8218D8B8]; System.Globalization.NumberFormatInfo.get_CurrentInfo() mov r8,rax lea rcx,[rsp+20] lea r9,[rsp+30] mov edx,7 call qword ptr [7FFC81F9D4C8]; System.Number.TryParseUInt32IntegerStyle(System.ReadOnlySpan`1, System.Globalization.NumberStyles, System.Globalization.NumberFormatInfo, UInt32 ByRef) test eax,eax sete al movzx eax,al jmp short M00_L00 ; Total bytes of code 93 ``` ```assembly ; System.Globalization.NumberFormatInfo.get_CurrentInfo() sub rsp,28 mov rcx,7FFC81DD4E68 mov edx,250 call CORINFO_HELP_GETSHARED_GCTHREADSTATIC_BASE mov rcx,[rax+8] test rcx,rcx jne short M01_L00 mov rcx,25EA7000488 mov rcx,[rcx] test rcx,rcx jne short M01_L00 mov rcx,25EA7000468 mov rcx,[rcx] test rcx,rcx je short M01_L03 M01_L00: cmp byte ptr [rcx+61],0 jne short M01_L01 mov rax,[rcx+18] test rax,rax je short M01_L01 add rsp,28 ret M01_L01: mov rdx,29F3B8A7430 mov rax,[rcx] mov rax,[rax+50] call qword ptr [rax] mov rdx,rax mov rax,rdx test rax,rax je short M01_L02 mov rcx,offset MT_System.Globalization.NumberFormatInfo cmp [rax],rcx jne short M01_L04 M01_L02: add rsp,28 ret M01_L03: call qword ptr [7FFC81F975D0] mov rcx,rax jmp short M01_L00 M01_L04: call qword ptr [7FFC81E6D8B8] int 3 ; Total bytes of code 157 ``` ```assembly ; System.Number.TryParseUInt32IntegerStyle(System.ReadOnlySpan`1, System.Globalization.NumberStyles, System.Globalization.NumberFormatInfo, UInt32 ByRef) push r15 push r14 push r13 push r12 push rdi push rsi push rbp push rbx sub rsp,38 xor eax,eax mov [rsp+28],rax mov edi,edx mov rsi,r9 mov rbx,[rcx] mov ebp,[rcx+8] test ebp,ebp je near ptr M02_L18 xor r14d,r14d movzx r15d,word ptr [rbx] test dil,1 je short M02_L01 cmp r15d,20 je short M02_L00 lea ecx,[r15-9] cmp ecx,4 ja short M02_L01 M02_L00: inc r14d cmp r14d,ebp jae near ptr M02_L18 mov ecx,r14d movzx r15d,word ptr [rbx+rcx*2] cmp r15d,20 je short M02_L00 lea ecx,[r15-9] cmp ecx,4 jbe short M02_L00 M02_L01: xor r12d,r12d test dil,4 je near ptr M02_L07 cmp byte ptr [r8+0BD],0 je short M02_L03 cmp r15d,2B jne short M02_L02 inc r14d cmp r14d,ebp jae near ptr M02_L18 jmp near ptr M02_L06 M02_L02: cmp r15d,2D jne near ptr M02_L07 mov r12d,1 inc r14d cmp r14d,ebp jae near ptr M02_L18 jmp near ptr M02_L06 M02_L03: cmp byte ptr [r8+0BE],0 je short M02_L04 cmp r15d,2D jne short M02_L04 mov r12d,1 inc r14d cmp r14d,ebp jae near ptr M02_L18 jmp near ptr M02_L06 M02_L04: cmp r14d,ebp ja near ptr M02_L27 mov ecx,r14d lea rbx,[rbx+rcx*2] sub ebp,r14d xor r14d,r14d mov rdx,[r8+20] mov r13,[r8+28] test rdx,rdx je short M02_L05 mov eax,[rdx+8] test eax,eax je short M02_L05 add rdx,0C mov r8d,eax cmp r8d,ebp mov [rsp+24],eax jg short M02_L05 mov r8d,r8d add r8,r8 mov rcx,rbx call qword ptr [7FFC81F21270] test eax,eax je short M02_L05 mov r14d,[rsp+24] cmp r14d,ebp jae near ptr M02_L18 jmp short M02_L06 M02_L05: test r13,r13 je short M02_L07 cmp dword ptr [r13+8],0 je short M02_L07 lea rdx,[r13+0C] mov r8d,[r13+8] cmp r8d,ebp jg short M02_L07 mov r8d,r8d add r8,r8 mov rcx,rbx call qword ptr [7FFC81F21270] test eax,eax je short M02_L07 mov r12d,1 mov r14d,[r13+8] cmp r14d,ebp jae near ptr M02_L18 M02_L06: cmp r14d,ebp jae near ptr M02_L28 mov eax,r14d movzx r15d,word ptr [rbx+rax*2] M02_L07: xor r13d,r13d lea eax,[r15-30] cmp eax,9 ja near ptr M02_L18 cmp r15d,30 jne short M02_L09 M02_L08: inc r14d cmp r14d,ebp jae near ptr M02_L16 mov eax,r14d movzx r15d,word ptr [rbx+rax*2] cmp r15d,30 je short M02_L08 lea eax,[r15-30] cmp eax,9 ja near ptr M02_L20 M02_L09: lea r13d,[r15-30] inc r14d xor eax,eax M02_L10: cmp r14d,ebp jae near ptr M02_L15 mov ecx,r14d movzx r15d,word ptr [rbx+rcx*2] lea ecx,[r15-30] cmp ecx,9 ja near ptr M02_L21 inc r14d lea ecx,[r13+r13*4] lea r13d,[r15+rcx*2-30] inc eax cmp eax,8 jl short M02_L10 cmp r14d,ebp jae near ptr M02_L15 mov eax,r14d movzx r15d,word ptr [rbx+rax*2] lea eax,[r15-30] cmp eax,9 ja near ptr M02_L21 inc r14d cmp r13d,19999999 ja short M02_L12 cmp r13d,19999999 jne short M02_L11 xor eax,eax cmp r15d,35 setg al jmp short M02_L13 nop dword ptr [rax] nop dword ptr [rax] M02_L11: xor eax,eax jmp short M02_L13 M02_L12: mov eax,1 M02_L13: or eax,r12d movzx r12d,al lea eax,[r13+r13*4] lea r13d,[r15+rax*2-30] cmp r14d,ebp jae short M02_L15 mov eax,r14d movzx r15d,word ptr [rbx+rax*2] lea eax,[r15-30] cmp eax,9 ja short M02_L21 M02_L14: mov r12d,1 inc r14d cmp r14d,ebp jae short M02_L19 mov eax,r14d movzx r15d,word ptr [rbx+rax*2] lea eax,[r15-30] cmp eax,9 jbe short M02_L14 jmp short M02_L21 M02_L15: test r12d,r12d jne short M02_L19 M02_L16: mov [rsi],r13d xor eax,eax M02_L17: add rsp,38 pop rbx pop rbp pop rsi pop rdi pop r12 pop r13 pop r14 pop r15 ret M02_L18: xor eax,eax mov [rsi],eax mov eax,1 jmp short M02_L17 M02_L19: xor eax,eax mov [rsi],eax mov eax,2 jmp short M02_L17 M02_L20: xor r12d,r12d M02_L21: cmp r15d,20 je short M02_L22 lea ecx,[r15-9] cmp ecx,4 ja short M02_L26 M02_L22: test dil,2 je short M02_L18 inc r14d cmp r14d,ebp jge short M02_L25 M02_L23: cmp r14d,ebp jae short M02_L28 mov ecx,r14d movzx ecx,word ptr [rbx+rcx*2] cmp ecx,20 je short M02_L24 add ecx,0FFFFFFF7 cmp ecx,4 ja short M02_L25 M02_L24: inc r14d cmp r14d,ebp jl short M02_L23 M02_L25: cmp r14d,ebp jae short M02_L15 M02_L26: mov [rsp+28],rbx mov [rsp+30],ebp lea rcx,[rsp+28] mov edx,r14d call qword ptr [7FFC81F9D6C0] test eax,eax jne near ptr M02_L15 jmp short M02_L18 M02_L27: call qword ptr [7FFC821AD4E0] int 3 M02_L28: call CORINFO_HELP_RNGCHKFAIL int 3 ; Total bytes of code 838 ``` ### Compare Jit Disasm ```assembly ; System.Tests.Perf_UInt32.TryParse(System.String) sub rsp,38 vxorps xmm4,xmm4,xmm4 vmovdqa xmmword ptr [rsp+20],xmm4 xor eax,eax mov [rsp+30],rax test rdx,rdx jne short M00_L01 xor eax,eax mov [rsp+30],eax M00_L00: add rsp,38 ret M00_L01: lea rax,[rdx+0C] mov edx,[rdx+8] mov [rsp+20],rax mov [rsp+28],edx call qword ptr [7FF87668D8B8]; System.Globalization.NumberFormatInfo.get_CurrentInfo() mov r8,rax lea rcx,[rsp+20] lea r9,[rsp+30] mov edx,7 call qword ptr [7FF87649DCD8]; System.Number.TryParseUInt32IntegerStyle(System.ReadOnlySpan`1, System.Globalization.NumberStyles, System.Globalization.NumberFormatInfo, UInt32 ByRef) test eax,eax sete al movzx eax,al jmp short M00_L00 ; Total bytes of code 93 ``` ```assembly ; System.Globalization.NumberFormatInfo.get_CurrentInfo() sub rsp,28 mov rcx,7FF8762D4EA8 mov edx,251 call CORINFO_HELP_GETSHARED_GCTHREADSTATIC_BASE mov rcx,[rax+8] test rcx,rcx jne short M01_L00 mov rcx,24270000478 mov rcx,[rcx] test rcx,rcx jne short M01_L00 mov rcx,24270000458 mov rcx,[rcx] test rcx,rcx je short M01_L03 M01_L00: cmp byte ptr [rcx+61],0 jne short M01_L01 mov rax,[rcx+18] test rax,rax je short M01_L01 add rsp,28 ret M01_L01: mov rdx,28304C17408 mov rax,[rcx] mov rax,[rax+50] call qword ptr [rax] mov rdx,rax mov rax,rdx test rax,rax je short M01_L02 mov rcx,offset MT_System.Globalization.NumberFormatInfo cmp [rax],rcx jne short M01_L04 M01_L02: add rsp,28 ret M01_L03: call qword ptr [7FF876499030] mov rcx,rax jmp short M01_L00 M01_L04: call qword ptr [7FF87636D8B8] int 3 ; Total bytes of code 157 ``` ```assembly ; System.Number.TryParseUInt32IntegerStyle(System.ReadOnlySpan`1, System.Globalization.NumberStyles, System.Globalization.NumberFormatInfo, UInt32 ByRef) push r15 push r14 push r13 push r12 push rdi push rsi push rbp push rbx sub rsp,38 xor eax,eax mov [rsp+28],rax mov edi,edx mov rsi,r9 mov rbx,[rcx] mov ebp,[rcx+8] test ebp,ebp je near ptr M02_L18 xor r14d,r14d movzx r15d,word ptr [rbx] test dil,1 je short M02_L01 cmp r15d,20 je short M02_L00 lea ecx,[r15-9] cmp ecx,4 ja short M02_L01 M02_L00: inc r14d cmp r14d,ebp jae near ptr M02_L18 mov ecx,r14d movzx r15d,word ptr [rbx+rcx*2] cmp r15d,20 je short M02_L00 lea ecx,[r15-9] cmp ecx,4 jbe short M02_L00 M02_L01: xor r12d,r12d test dil,4 je near ptr M02_L07 cmp byte ptr [r8+0BD],0 je short M02_L03 cmp r15d,2B jne short M02_L02 inc r14d cmp r14d,ebp jae near ptr M02_L18 jmp near ptr M02_L06 M02_L02: cmp r15d,2D jne near ptr M02_L07 mov r12d,1 inc r14d cmp r14d,ebp jae near ptr M02_L18 jmp near ptr M02_L06 M02_L03: cmp byte ptr [r8+0BE],0 je short M02_L04 cmp r15d,2D jne short M02_L04 mov r12d,1 inc r14d cmp r14d,ebp jae near ptr M02_L18 jmp near ptr M02_L06 M02_L04: cmp r14d,ebp ja near ptr M02_L27 mov ecx,r14d lea rbx,[rbx+rcx*2] sub ebp,r14d xor r14d,r14d mov rdx,[r8+20] mov r13,[r8+28] test rdx,rdx je short M02_L05 mov eax,[rdx+8] test eax,eax je short M02_L05 add rdx,0C mov r8d,eax cmp r8d,ebp mov [rsp+24],eax jg short M02_L05 mov r8d,r8d add r8,r8 mov rcx,rbx call qword ptr [7FF876421450] test eax,eax je short M02_L05 mov r14d,[rsp+24] cmp r14d,ebp jae near ptr M02_L18 jmp short M02_L06 M02_L05: test r13,r13 je short M02_L07 cmp dword ptr [r13+8],0 je short M02_L07 lea rdx,[r13+0C] mov r8d,[r13+8] cmp r8d,ebp jg short M02_L07 mov r8d,r8d add r8,r8 mov rcx,rbx call qword ptr [7FF876421450] test eax,eax je short M02_L07 mov r12d,1 mov r14d,[r13+8] cmp r14d,ebp jae near ptr M02_L18 M02_L06: cmp r14d,ebp jae near ptr M02_L28 mov eax,r14d movzx r15d,word ptr [rbx+rax*2] M02_L07: xor r13d,r13d lea eax,[r15-30] cmp eax,9 ja near ptr M02_L18 cmp r15d,30 jne short M02_L09 M02_L08: inc r14d cmp r14d,ebp jae near ptr M02_L16 mov eax,r14d movzx r15d,word ptr [rbx+rax*2] cmp r15d,30 je short M02_L08 lea eax,[r15-30] cmp eax,9 ja near ptr M02_L20 M02_L09: lea r13d,[r15-30] inc r14d xor eax,eax M02_L10: cmp r14d,ebp jae near ptr M02_L15 mov ecx,r14d movzx r15d,word ptr [rbx+rcx*2] lea ecx,[r15-30] cmp ecx,9 ja near ptr M02_L21 inc r14d lea ecx,[r13+r13*4] lea r13d,[r15+rcx*2-30] inc eax cmp eax,8 jl short M02_L10 cmp r14d,ebp jae near ptr M02_L15 mov eax,r14d movzx r15d,word ptr [rbx+rax*2] lea eax,[r15-30] cmp eax,9 ja near ptr M02_L21 inc r14d cmp r13d,19999999 ja short M02_L12 cmp r13d,19999999 jne short M02_L11 xor eax,eax cmp r15d,35 setg al jmp short M02_L13 nop dword ptr [rax] nop dword ptr [rax] M02_L11: xor eax,eax jmp short M02_L13 M02_L12: mov eax,1 M02_L13: or eax,r12d movzx r12d,al lea eax,[r13+r13*4] lea r13d,[r15+rax*2-30] cmp r14d,ebp jae short M02_L15 mov eax,r14d movzx r15d,word ptr [rbx+rax*2] lea eax,[r15-30] cmp eax,9 ja short M02_L21 M02_L14: mov r12d,1 inc r14d cmp r14d,ebp jae short M02_L19 mov eax,r14d movzx r15d,word ptr [rbx+rax*2] lea eax,[r15-30] cmp eax,9 jbe short M02_L14 jmp short M02_L21 M02_L15: test r12d,r12d jne short M02_L19 M02_L16: mov [rsi],r13d xor eax,eax M02_L17: add rsp,38 pop rbx pop rbp pop rsi pop rdi pop r12 pop r13 pop r14 pop r15 ret M02_L18: xor eax,eax mov [rsi],eax mov eax,1 jmp short M02_L17 M02_L19: xor eax,eax mov [rsi],eax mov eax,2 jmp short M02_L17 M02_L20: xor r12d,r12d M02_L21: cmp r15d,20 je short M02_L22 lea ecx,[r15-9] cmp ecx,4 ja short M02_L26 M02_L22: test dil,2 je short M02_L18 inc r14d cmp r14d,ebp jge short M02_L25 M02_L23: cmp r14d,ebp jae short M02_L28 mov ecx,r14d movzx ecx,word ptr [rbx+rcx*2] cmp ecx,20 je short M02_L24 add ecx,0FFFFFFF7 cmp ecx,4 ja short M02_L25 M02_L24: inc r14d cmp r14d,ebp jl short M02_L23 M02_L25: cmp r14d,ebp jae short M02_L15 M02_L26: mov [rsp+28],rbx mov [rsp+30],ebp lea rcx,[rsp+28] mov edx,r14d call qword ptr [7FF87649DED0] test eax,eax jne near ptr M02_L15 jmp short M02_L18 M02_L27: call qword ptr [7FF8766AD4E0] int 3 M02_L28: call CORINFO_HELP_RNGCHKFAIL int 3 ; Total bytes of code 838 ``` ### Docs [Profiling workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/profiling-workflow-dotnet-runtime.md) [Benchmarking workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/benchmarking-workflow-dotnet-runtime.md)