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/x86: 8 Improvements on 2/14/2023 5:47:38 PM #13206

Open performanceautofiler[bot] opened 1 year ago

performanceautofiler[bot] commented 1 year ago

Run Information

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

Improvements in System.Buffers.Tests.ReadOnlySequenceTests<Byte>

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[SliceArray - Duration of single invocation](<https://pvscmdupload.blob.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Buffers.Tests.ReadOnlySequenceTests(Byte).SliceArray.html>) 9.44 ns 0.08 ns 0.01 0.19 False

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.Buffers.Tests.ReadOnlySequenceTests&lt;Byte&gt;*'
### Payloads [Baseline]() [Compare]() ### Histogram #### System.Buffers.Tests.ReadOnlySequenceTests<Byte>.SliceArray ```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 0.08119911100033234 < 8.926649094721142. IsChangePoint: Marked as a change because one of 2/1/2023 6:25:50 PM, 2/6/2023 6:07:54 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 52.89365362394 (T) = (0 -0.1368099274082289) / Math.Sqrt((7.332164573256129 / (299)) + (0.02685241491483842 / (38))) is greater than 1.967070609662329 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (38) - 2, .975) and 0.9839767921072179 = (8.53823580918883 - 0.1368099274082289) / 8.53823580918883 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ``` ### 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 x86
OS Windows 10.0.18362
Baseline 33b552f0c201d1763375c2016aa303fbe9280e02
Compare cbc8695ae0c8c2c2d1ac1fc4546d81e0967ef716
Diff Diff

Improvements in System.Tests.Perf_Array

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[ArrayCopy3D - Duration of single invocation](<https://pvscmdupload.blob.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Tests.Perf_Array.ArrayCopy3D.html>) 371.28 ns 258.14 ns 0.70 0.13 False 311.07455098355985 329.4816464801151 1.059172617748239) Trace Trace
[IndexOfChar - Duration of single invocation](<https://pvscmdupload.blob.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Tests.Perf_Array.IndexOfChar.html>) 9.04 ns 7.53 ns 0.83 0.05 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_Array*'
### Payloads [Baseline]() [Compare]() ### Histogram #### System.Tests.Perf_Array.ArrayCopy3D ```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 258.1434341433351 < 348.26731179102654. IsChangePoint: Marked as a change because one of 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 14.987604162878869 (T) = (0 -275.58955921016707) / Math.Sqrt((440.58357163518855 / (299)) + (1050.2777425961751 / (38))) is greater than 1.967070609662329 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (38) - 2, .975) and 0.22686353824399988 = (356.45655436328707 - 275.58955921016707) / 356.45655436328707 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; System.Tests.Perf_Array.ArrayCopy3D() mov edx,[ecx+0C] mov eax,[ecx+10] push 1000 mov ecx,edx mov edx,eax call dword ptr ds:[4F27990]; System.Array.Copy(System.Array, System.Array, Int32) ret ; Total bytes of code 22 ``` ```assembly ; System.Array.Copy(System.Array, System.Array, Int32) push ebp mov ebp,esp push edi push esi push ebx push eax mov esi,ecx mov edi,edx mov ebx,[ebp+8] test esi,esi je near ptr M01_L04 test edi,edi je near ptr M01_L05 mov ecx,[esi] cmp ecx,[edi] jne short M01_L02 cmp dword ptr [ecx+4],0C ja short M01_L02 cmp ebx,[esi+4] ja short M01_L02 cmp ebx,[edi+4] ja short M01_L02 movzx eax,word ptr [ecx] imul ebx,eax lea edx,[esi+8] add edi,8 test dword ptr [ecx],1000000 je short M01_L01 cmp ebx,4000 ja short M01_L03 push ebx mov ecx,edi call System.Buffer.__BulkMoveWithWriteBarrier(Byte ByRef, Byte ByRef, UIntPtr) M01_L00: pop ecx pop ebx pop esi pop edi pop ebp ret 4 M01_L01: push ebx mov ecx,edi call dword ptr ds:[8821828]; System.Buffer.Memmove(Byte ByRef, Byte ByRef, UIntPtr) pop ecx pop ebx pop esi pop edi pop ebp ret 4 M01_L02: mov ecx,esi xor edx,edx call dword ptr ds:[4F27B40]; System.Array.GetLowerBound(Int32) mov [ebp-10],eax push edi mov ecx,edi xor edx,edx call dword ptr ds:[4F27B40]; System.Array.GetLowerBound(Int32) push eax push ebx push 0 mov edx,[ebp-10] mov ecx,esi call dword ptr ds:[4F279C0]; System.Array.Copy(System.Array, Int32, System.Array, Int32, Int32, Boolean) pop ecx pop ebx pop esi pop edi pop ebp ret 4 M01_L03: push ebx mov ecx,edi call dword ptr ds:[8821888] jmp short M01_L00 M01_L04: mov ecx,41 call dword ptr ds:[8905588] int 3 M01_L05: mov ecx,43 call dword ptr ds:[8905588] int 3 ; Total bytes of code 195 ``` ### Compare Jit Disasm ```assembly ; System.Tests.Perf_Array.ArrayCopy3D() mov edx,[ecx+0C] mov eax,[ecx+10] push 1000 mov ecx,edx mov edx,eax call dword ptr ds:[30F7A08]; System.Array.Copy(System.Array, System.Array, Int32) ret ; Total bytes of code 22 ``` ```assembly ; System.Array.Copy(System.Array, System.Array, Int32) push ebp mov ebp,esp push edi push esi push ebx push eax mov esi,ecx mov edi,edx mov ebx,[ebp+8] test esi,esi je near ptr M01_L04 test edi,edi je near ptr M01_L05 mov ecx,[esi] cmp ecx,[edi] jne short M01_L02 cmp dword ptr [ecx+4],0C ja short M01_L02 cmp ebx,[esi+4] ja short M01_L02 cmp ebx,[edi+4] ja short M01_L02 movzx eax,word ptr [ecx] imul ebx,eax lea edx,[esi+8] add edi,8 test dword ptr [ecx],1000000 je short M01_L01 cmp ebx,4000 ja short M01_L03 push ebx mov ecx,edi call System.Buffer.__BulkMoveWithWriteBarrier(Byte ByRef, Byte ByRef, UIntPtr) M01_L00: pop ecx pop ebx pop esi pop edi pop ebp ret 4 M01_L01: push ebx mov ecx,edi call dword ptr ds:[8AE30A8]; System.Buffer.Memmove(Byte ByRef, Byte ByRef, UIntPtr) pop ecx pop ebx pop esi pop edi pop ebp ret 4 M01_L02: mov ecx,esi xor edx,edx call dword ptr ds:[30F7BB8]; System.Array.GetLowerBound(Int32) mov [ebp-10],eax push edi mov ecx,edi xor edx,edx call dword ptr ds:[30F7BB8]; System.Array.GetLowerBound(Int32) push eax push ebx push 0 mov edx,[ebp-10] mov ecx,esi call dword ptr ds:[30F7A38]; System.Array.Copy(System.Array, Int32, System.Array, Int32, Int32, Boolean) pop ecx pop ebx pop esi pop edi pop ebp ret 4 M01_L03: push ebx mov ecx,edi call dword ptr ds:[8AE3108] jmp short M01_L00 M01_L04: mov ecx,40 call dword ptr ds:[8BC9588] int 3 M01_L05: mov ecx,42 call dword ptr ds:[8BC9588] int 3 ; Total bytes of code 195 ``` #### System.Tests.Perf_Array.IndexOfChar ```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 7.5252842802439694 < 8.582317596657127. IsChangePoint: Marked as a change because one of 1/3/2023 6:29:42 AM, 2/9/2023 4:27:10 AM, 2/17/2023 9:53:52 PM, 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 37.79011718492039 (T) = (0 -7.555803911128113) / Math.Sqrt((0.1723641345236154 / (299)) + (0.007817943413591983 / (16))) is greater than 1.9675720194858106 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (16) - 2, .975) and 0.14032221920723828 = (8.78911154846929 - 7.555803911128113) / 8.78911154846929 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; System.Tests.Perf_Array.IndexOfChar() push ebp mov ebp,esp mov ecx,[ecx+1C] test ecx,ecx je short M00_L00 push 0 push dword ptr [ecx+4] mov edx,2E call dword ptr ds:[0B569A20]; System.Array.IndexOf[[System.Char, System.Private.CoreLib]](Char[], Char, Int32, Int32) pop ebp ret M00_L00: mov ecx,2 call dword ptr ds:[8B05588] int 3 ; Total bytes of code 40 ``` ```assembly ; System.Array.IndexOf[[System.Char, System.Private.CoreLib]](Char[], Char, Int32, Int32) push ebp mov ebp,esp push esi sub esp,8 mov [ebp-8],edx mov esi,[ebp+0C] mov eax,[ebp+8] test ecx,ecx je short M01_L02 mov edx,[ecx+4] cmp edx,esi jb short M01_L03 sub edx,esi cmp edx,eax jb short M01_L04 lea ecx,[ecx+esi*2+8] movsx edx,word ptr [ebp-8] mov [ebp-0C],edx movzx edx,word ptr [ebp-0C] dec edx cmp edx,0FE jae short M01_L00 movzx edx,word ptr [ebp-0C] push eax movsx edx,dx call dword ptr ds:[8ADB8D0]; System.PackedSpanHelpers.IndexOf[[System.SpanHelpers+DontNegate`1[[System.Int16, System.Private.CoreLib]], System.Private.CoreLib]](Int16 ByRef, Int16, Int32) jmp short M01_L01 M01_L00: push eax mov edx,[ebp-0C] call dword ptr ds:[0B563B58]; System.SpanHelpers.NonPackedIndexOfValueType[[System.Int16, System.Private.CoreLib],[System.SpanHelpers+DontNegate`1[[System.Int16, System.Private.CoreLib]], System.Private.CoreLib]](Int16 ByRef, Int16, Int32) M01_L01: xor ecx,ecx test eax,eax cmovl esi,ecx add eax,esi lea esp,[ebp-4] pop esi pop ebp ret 8 M01_L02: mov ecx,2 call dword ptr ds:[8B05588] int 3 M01_L03: call dword ptr ds:[8B05390] int 3 M01_L04: call dword ptr ds:[8B053C0] int 3 ; Total bytes of code 126 ``` ### Compare Jit Disasm ```assembly ; System.Tests.Perf_Array.IndexOfChar() push ebp mov ebp,esp mov ecx,[ecx+1C] test ecx,ecx je short M00_L00 push 0 push dword ptr [ecx+4] mov edx,2E call dword ptr ds:[0B3B1A20]; System.Array.IndexOf[[System.Char, System.Private.CoreLib]](Char[], Char, Int32, Int32) pop ebp ret M00_L00: mov ecx,2 call dword ptr ds:[8939588] int 3 ; Total bytes of code 40 ``` ```assembly ; System.Array.IndexOf[[System.Char, System.Private.CoreLib]](Char[], Char, Int32, Int32) push ebp mov ebp,esp push edi push esi mov esi,[ebp+0C] mov eax,[ebp+8] test ecx,ecx je short M01_L02 mov edi,[ecx+4] cmp edi,esi jb short M01_L03 sub edi,esi cmp edi,eax jb short M01_L04 lea ecx,[ecx+esi*2+8] movsx edx,dx movzx edi,dx dec edi cmp edi,0FE jae short M01_L00 movzx edx,dx push eax movsx edx,dx call dword ptr ds:[88EF660]; System.PackedSpanHelpers.IndexOf[[System.SpanHelpers+DontNegate`1[[System.Int16, System.Private.CoreLib]], System.Private.CoreLib]](Int16 ByRef, Int16, Int32) jmp short M01_L01 M01_L00: push eax call dword ptr ds:[0B39BB58]; System.SpanHelpers.NonPackedIndexOfValueType[[System.Int16, System.Private.CoreLib],[System.SpanHelpers+DontNegate`1[[System.Int16, System.Private.CoreLib]], System.Private.CoreLib]](Int16 ByRef, Int16, Int32) M01_L01: xor ecx,ecx test eax,eax cmovl esi,ecx add eax,esi pop esi pop edi pop ebp ret 8 M01_L02: mov ecx,2 call dword ptr ds:[8939588] int 3 M01_L03: call dword ptr ds:[8939390] int 3 M01_L04: call dword ptr ds:[89393C0] int 3 ; Total bytes of code 110 ``` ### 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 x86
OS Windows 10.0.18362
Baseline 33b552f0c201d1763375c2016aa303fbe9280e02
Compare cbc8695ae0c8c2c2d1ac1fc4546d81e0967ef716
Diff Diff

Improvements in System.Tests.Perf_UInt64

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[Parse - Duration of single invocation](<https://pvscmdupload.blob.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Tests.Perf_UInt64.Parse(value%3a%20%2218446744073709551615%22).html>) 99.52 ns 0.35 ns 0.00 0.25 False Trace Trace
[TryParse - Duration of single invocation](<https://pvscmdupload.blob.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Tests.Perf_UInt64.TryParse(value%3a%20%2212345%22).html>) 28.63 ns 24.68 ns 0.86 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_UInt64*'
### Payloads [Baseline]() [Compare]() ### Histogram #### System.Tests.Perf_UInt64.Parse(value: "18446744073709551615") ```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 0.348603404202257 < 94.57423550085278. IsChangePoint: Marked as a change because one of 2/1/2023 6:25:50 PM, 2/7/2023 8:22:47 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 26.771898160799832 (T) = (0 -5.537498168312061) / Math.Sqrt((867.6370332352972 / (299)) + (258.4474836593132 / (38))) is greater than 1.967070609662329 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (38) - 2, .975) and 0.9377327780087471 = (88.93119029928692 - 5.537498168312061) / 88.93119029928692 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; System.Tests.Perf_UInt64.Parse(System.String) push ebp mov ebp,esp push edi push esi sub esp,8 test edx,edx je short M00_L00 lea esi,[edx+8] mov edi,[edx+4] push edi push esi call dword ptr ds:[0A8438B8]; System.Globalization.NumberFormatInfo.get_CurrentInfo() mov edx,eax lea ecx,[ebp-10] push ecx mov ecx,7 call dword ptr ds:[873D138]; System.Number.TryParseUInt64IntegerStyle(System.ReadOnlySpan`1, System.Globalization.NumberStyles, System.Globalization.NumberFormatInfo, UInt64 ByRef) mov ecx,eax test ecx,ecx jne short M00_L01 mov eax,[ebp-10] mov edx,[ebp-0C] lea esp,[ebp-8] pop esi pop edi pop ebp ret M00_L00: mov ecx,11 call dword ptr ds:[87F5588] int 3 M00_L01: push edi push esi mov edx,0C call dword ptr ds:[873D360] int 3 ; Total bytes of code 88 ``` ```assembly ; System.Globalization.NumberFormatInfo.get_CurrentInfo() push ebp mov ebp,esp mov ecx,3284E68 mov edx,250 call CORINFO_HELP_GETSHARED_GCTHREADSTATIC_BASE mov ecx,[eax+4] test ecx,ecx jne short M01_L00 mov ecx,ds:[6F41240] test ecx,ecx jne short M01_L00 mov ecx,ds:[6F41230] test ecx,ecx je short M01_L03 M01_L00: cmp byte ptr [ecx+31],0 jne short M01_L01 mov eax,[ecx+0C] test eax,eax je short M01_L01 pop ebp ret M01_L01: mov edx,81356F8 mov eax,[ecx] mov eax,[eax+30] call dword ptr [eax] mov edx,eax mov eax,edx test eax,eax je short M01_L02 mov ecx,offset MT_System.Globalization.NumberFormatInfo cmp [eax],ecx jne short M01_L04 M01_L02: pop ebp ret M01_L03: call dword ptr ds:[8737330] mov ecx,eax jmp short M01_L00 M01_L04: call dword ptr ds:[80FB8B8] int 3 ; Total bytes of code 108 ``` ```assembly ; System.Number.TryParseUInt64IntegerStyle(System.ReadOnlySpan`1, System.Globalization.NumberStyles, System.Globalization.NumberFormatInfo, UInt64 ByRef) push ebp mov ebp,esp push edi push esi push ebx sub esp,90 mov [ebp-64],edx mov esi,ecx mov ebx,[ebp+10] test ebx,ebx je near ptr M02_L25 xor ecx,ecx mov eax,[ebp+0C] movzx edi,word ptr [eax] mov [ebp-10],esi test esi,1 je short M02_L01 cmp edi,20 je short M02_L00 lea esi,[edi-9] cmp esi,4 ja short M02_L01 M02_L00: inc ecx cmp ecx,ebx jae near ptr M02_L25 movzx edi,word ptr [eax+ecx*2] cmp edi,20 je short M02_L00 lea esi,[edi-9] cmp esi,4 jbe short M02_L00 M02_L01: xor esi,esi xor edx,edx test byte ptr [ebp-10],4 je near ptr M02_L07 mov esi,[ebp-64] cmp byte ptr [esi+71],0 je short M02_L03 cmp edi,2B jne short M02_L02 inc ecx cmp ecx,ebx jae near ptr M02_L25 jmp near ptr M02_L06 M02_L02: cmp edi,2D jne near ptr M02_L07 mov edx,1 inc ecx cmp ecx,ebx jae near ptr M02_L25 jmp near ptr M02_L06 M02_L03: cmp byte ptr [esi+72],0 je short M02_L04 cmp edi,2D jne short M02_L04 mov dword ptr [ebp-1C],1 inc ecx cmp ecx,ebx jae near ptr M02_L25 mov edx,[ebp-1C] jmp near ptr M02_L06 M02_L04: cmp ecx,ebx ja near ptr M02_L35 lea eax,[eax+ecx*2] mov [ebp-94],eax sub ebx,ecx mov ecx,ebx mov [ebp+0C],eax mov [ebp+10],ecx xor ecx,ecx mov [ebp-14],ecx mov ecx,[esi+10] mov [ebp-68],ecx mov esi,[esi+14] mov [ebp-6C],esi test ecx,ecx je near ptr M02_L05 cmp dword ptr [ecx+4],0 je near ptr M02_L05 mov esi,[ebp-94] mov [ebp-78],esi mov [ebp-3C],ebx lea esi,[ecx+8] mov [ebp-70],esi mov esi,[ecx+4] mov [ebp-30],esi mov esi,[ebp-70] mov [ebp-80],esi mov esi,[ebp-30] mov [ebp-44],esi mov esi,[ebp-80] mov [ebp-7C],esi mov esi,[ebp-44] mov [ebp-40],esi mov esi,[ebp-78] mov [ebp-88],esi mov esi,[ebp-7C] mov [ebp-84],esi mov esi,[ebp-40] mov ecx,[ebp-3C] cmp esi,ecx mov [ebp-34],esi jg short M02_L05 mov [ebp-1C],edx mov ecx,[ebp-34] add ecx,ecx push ecx mov ecx,[ebp-88] mov edx,[ebp-84] call dword ptr ds:[810F120] test eax,eax mov edx,[ebp-1C] je short M02_L05 mov ecx,[ebp-68] mov eax,[ecx+4] mov edi,eax mov [ebp-14],edi cmp edi,ebx jae near ptr M02_L25 mov ecx,[ebp-14] jmp near ptr M02_L06 M02_L05: mov esi,[ebp-6C] test esi,esi je near ptr M02_L15 cmp dword ptr [esi+4],0 je near ptr M02_L14 mov ecx,[ebp-94] mov [ebp-74],ecx mov [ebp-38],ebx lea ecx,[esi+8] mov [ebp-6C],esi mov esi,[esi+4] mov [ebp-48],esi mov esi,[ebp-74] mov [ebp-90],esi mov [ebp-8C],ecx mov ecx,[ebp-48] mov esi,[ebp-38] cmp ecx,esi jg near ptr M02_L13 mov [ebp-1C],edx add ecx,ecx push ecx mov ecx,[ebp-90] mov edx,[ebp-8C] call dword ptr ds:[810F120] test eax,eax mov ecx,[ebp-14] mov edx,[ebp-1C] je short M02_L07 mov dword ptr [ebp-1C],1 mov esi,[ebp-6C] mov edx,[esi+4] mov edi,edx cmp edi,ebx mov ecx,edi mov edx,[ebp-1C] jae near ptr M02_L25 M02_L06: cmp ecx,[ebp+10] jae near ptr M02_L36 mov eax,[ebp+0C] movzx edi,word ptr [eax+ecx*2] M02_L07: xor ebx,ebx xor eax,eax lea esi,[edi-30] cmp esi,9 ja near ptr M02_L25 cmp edi,30 jne short M02_L09 M02_L08: inc ecx mov esi,[ebp+10] cmp ecx,esi mov [ebp-1C],edx jae near ptr M02_L23 mov edi,[ebp+0C] movzx edx,word ptr [edi+ecx*2] cmp edx,30 mov [ebp-98],edi je near ptr M02_L12 mov edi,edx lea edx,[edi-30] cmp edx,9 mov edx,[ebp-1C] ja near ptr M02_L27 M02_L09: add edi,0FFFFFFD0 mov eax,edi sar eax,1F mov [ebp-4C],edi mov [ebp-50],eax inc ecx xor edi,edi M02_L10: mov esi,[ebp+10] cmp ecx,esi jae near ptr M02_L22 mov [ebp-1C],edx mov edx,[ebp+0C] mov [ebp-98],edx movzx eax,word ptr [edx+ecx*2] mov [ebp-18],eax lea ebx,[eax-30] cmp ebx,9 ja near ptr M02_L28 inc ecx mov [ebp-14],ecx push dword ptr [ebp-50] push dword ptr [ebp-4C] push 0 push 0A call CORINFO_HELP_LMUL mov ebx,[ebp-18] mov ecx,ebx sar ebx,1F add eax,ecx adc edx,ebx mov ebx,eax sub ebx,30 mov eax,edx sbb eax,0 mov [ebp-50],eax inc edi cmp edi,12 mov [ebp-4C],ebx mov ecx,[ebp-14] mov edx,[ebp-1C] jl short M02_L10 mov edi,[ebp-98] cmp ecx,esi jae near ptr M02_L22 mov [ebp-1C],edx movzx edx,word ptr [edi+ecx*2] lea eax,[edx-30] cmp eax,9 ja short M02_L11 inc ecx mov [ebp-14],ecx mov eax,[ebp-1C] mov [ebp-20],eax mov ebx,[ebp-4C] cmp ebx,9999999A mov eax,[ebp-50] sbb eax,19999999 jae short M02_L17 nop nop nop nop mov eax,[ebp-20] mov [ebp-2C],eax mov eax,ebx xor eax,99999999 mov [ebp-9C],eax mov eax,[ebp-50] xor eax,19999999 or eax,[ebp-9C] jne short M02_L16 mov eax,[ebp-2C] mov [ebp-24],eax mov [ebp-18],edx xor eax,eax cmp edx,35 setg al mov [ebp-28],eax jmp short M02_L18 M02_L11: mov [ebp-18],edx mov [ebp-98],edi jmp near ptr M02_L28 M02_L12: mov edx,[ebp-1C] jmp near ptr M02_L08 M02_L13: mov ecx,[ebp-14] jmp near ptr M02_L07 M02_L14: mov ecx,[ebp-14] jmp near ptr M02_L07 nop M02_L15: mov ecx,[ebp-14] jmp near ptr M02_L07 M02_L16: mov eax,[ebp-2C] mov [ebp-24],eax xor eax,eax mov [ebp-18],edx mov [ebp-28],eax jmp short M02_L18 M02_L17: mov eax,[ebp-20] mov [ebp-24],eax mov dword ptr [ebp-28],1 mov [ebp-18],edx M02_L18: mov eax,[ebp-24] or eax,[ebp-28] movzx eax,al mov [ebp-1C],eax push dword ptr [ebp-50] push ebx push 0 push 0A call CORINFO_HELP_LMUL mov ebx,[ebp-18] mov ecx,ebx sar ebx,1F add eax,ecx adc edx,ebx mov ebx,eax sub ebx,30 mov eax,edx sbb eax,0 mov [ebp-50],eax mov ecx,[ebp-14] cmp ecx,esi jae short M02_L21 movzx eax,word ptr [edi+ecx*2] lea edx,[eax-30] cmp edx,9 mov [ebp-18],eax ja short M02_L20 M02_L19: mov dword ptr [ebp-1C],1 inc ecx cmp ecx,esi jae short M02_L26 movzx eax,word ptr [edi+ecx*2] lea edx,[eax-30] cmp edx,9 jbe short M02_L19 mov [ebp-18],eax mov [ebp-98],edi mov [ebp-4C],ebx jmp short M02_L28 M02_L20: mov [ebp-98],edi mov [ebp-4C],ebx jmp short M02_L28 nop nop nop M02_L21: mov [ebp-4C],ebx mov edx,[ebp-1C] M02_L22: test edx,edx mov eax,[ebp-50] mov ebx,[ebp-4C] jne short M02_L26 M02_L23: mov edi,[ebp+8] mov [edi],ebx mov [edi+4],eax xor eax,eax M02_L24: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret 0C M02_L25: mov edi,[ebp+8] mov eax,edi xor edx,edx mov [eax],edx mov [eax+4],edx mov eax,1 jmp short M02_L24 M02_L26: mov edi,[ebp+8] mov eax,edi xor ecx,ecx mov [eax],ecx mov [eax+4],ecx mov eax,2 jmp short M02_L24 M02_L27: xor edx,edx mov [ebp-18],edi mov [ebp-4C],ebx mov [ebp-50],eax mov [ebp-1C],edx M02_L28: mov eax,[ebp-18] cmp eax,20 je short M02_L29 add eax,0FFFFFFF7 cmp eax,4 ja short M02_L33 M02_L29: test byte ptr [ebp-10],2 je short M02_L25 mov edx,[ebp-98] mov edi,[ebp-50] inc ecx cmp ecx,esi jge short M02_L32 M02_L30: cmp ecx,esi jae short M02_L36 movzx ebx,word ptr [edx+ecx*2] cmp ebx,20 je short M02_L31 add ebx,0FFFFFFF7 cmp ebx,4 ja short M02_L32 M02_L31: inc ecx cmp ecx,esi jl short M02_L30 M02_L32: cmp ecx,esi mov [ebp-50],edi jae short M02_L34 M02_L33: push dword ptr [ebp+10] push dword ptr [ebp+0C] call dword ptr ds:[873D2D0] test eax,eax mov edx,[ebp-1C] jne near ptr M02_L22 jmp near ptr M02_L25 M02_L34: mov edx,[ebp-1C] jmp near ptr M02_L22 M02_L35: call dword ptr ds:[87F5270] int 3 M02_L36: call CORINFO_HELP_RNGCHKFAIL int 3 ; Total bytes of code 1266 ``` ### Compare Jit Disasm ```assembly ; System.Tests.Perf_UInt64.Parse(System.String) push ebp mov ebp,esp push edi push esi sub esp,8 test edx,edx je short M00_L00 lea esi,[edx+8] mov edi,[edx+4] push edi push esi call dword ptr ds:[0A9578B8]; System.Globalization.NumberFormatInfo.get_CurrentInfo() mov edx,eax lea ecx,[ebp-10] push ecx mov ecx,7 call dword ptr ds:[88F1150]; System.Number.TryParseUInt64IntegerStyle(System.ReadOnlySpan`1, System.Globalization.NumberStyles, System.Globalization.NumberFormatInfo, UInt64 ByRef) mov ecx,eax test ecx,ecx jne short M00_L01 mov eax,[ebp-10] mov edx,[ebp-0C] lea esp,[ebp-8] pop esi pop edi pop ebp ret M00_L00: mov ecx,11 call dword ptr ds:[8969588] int 3 M00_L01: push edi push esi mov edx,0C call dword ptr ds:[88F1378] int 3 ; Total bytes of code 88 ``` ```assembly ; System.Globalization.NumberFormatInfo.get_CurrentInfo() push ebp mov ebp,esp mov ecx,4D64EA8 mov edx,251 call CORINFO_HELP_GETSHARED_GCTHREADSTATIC_BASE mov ecx,[eax+4] test ecx,ecx jne short M01_L00 mov ecx,ds:[6FF1238] test ecx,ecx jne short M01_L00 mov ecx,ds:[6FF1228] test ecx,ecx je short M01_L03 M01_L00: cmp byte ptr [ecx+31],0 jne short M01_L01 mov eax,[ecx+0C] test eax,eax je short M01_L01 pop ebp ret M01_L01: mov edx,82A56F8 mov eax,[ecx] mov eax,[eax+30] call dword ptr [eax] mov edx,eax mov eax,edx test eax,eax je short M01_L02 mov ecx,offset MT_System.Globalization.NumberFormatInfo cmp [eax],ecx jne short M01_L04 M01_L02: pop ebp ret M01_L03: call dword ptr ds:[88AB030] mov ecx,eax jmp short M01_L00 M01_L04: call dword ptr ds:[826B8B8] int 3 ; Total bytes of code 108 ``` ```assembly ; System.Number.TryParseUInt64IntegerStyle(System.ReadOnlySpan`1, System.Globalization.NumberStyles, System.Globalization.NumberFormatInfo, UInt64 ByRef) push ebp mov ebp,esp push edi push esi push ebx sub esp,90 mov [ebp-64],edx mov esi,ecx mov ebx,[ebp+10] test ebx,ebx je near ptr M02_L25 xor ecx,ecx mov eax,[ebp+0C] movzx edi,word ptr [eax] mov [ebp-10],esi test esi,1 je short M02_L01 cmp edi,20 je short M02_L00 lea esi,[edi-9] cmp esi,4 ja short M02_L01 M02_L00: inc ecx cmp ecx,ebx jae near ptr M02_L25 movzx edi,word ptr [eax+ecx*2] cmp edi,20 je short M02_L00 lea esi,[edi-9] cmp esi,4 jbe short M02_L00 M02_L01: xor esi,esi xor edx,edx test byte ptr [ebp-10],4 je near ptr M02_L07 mov esi,[ebp-64] cmp byte ptr [esi+71],0 je short M02_L03 cmp edi,2B jne short M02_L02 inc ecx cmp ecx,ebx jae near ptr M02_L25 jmp near ptr M02_L06 M02_L02: cmp edi,2D jne near ptr M02_L07 mov edx,1 inc ecx cmp ecx,ebx jae near ptr M02_L25 jmp near ptr M02_L06 M02_L03: cmp byte ptr [esi+72],0 je short M02_L04 cmp edi,2D jne short M02_L04 mov dword ptr [ebp-1C],1 inc ecx cmp ecx,ebx jae near ptr M02_L25 mov edx,[ebp-1C] jmp near ptr M02_L06 M02_L04: cmp ecx,ebx ja near ptr M02_L35 lea eax,[eax+ecx*2] mov [ebp-94],eax sub ebx,ecx mov ecx,ebx mov [ebp+0C],eax mov [ebp+10],ecx xor ecx,ecx mov [ebp-14],ecx mov ecx,[esi+10] mov [ebp-68],ecx mov esi,[esi+14] mov [ebp-6C],esi test ecx,ecx je near ptr M02_L05 cmp dword ptr [ecx+4],0 je near ptr M02_L05 mov esi,[ebp-94] mov [ebp-78],esi mov [ebp-3C],ebx lea esi,[ecx+8] mov [ebp-70],esi mov esi,[ecx+4] mov [ebp-30],esi mov esi,[ebp-70] mov [ebp-80],esi mov esi,[ebp-30] mov [ebp-44],esi mov esi,[ebp-80] mov [ebp-7C],esi mov esi,[ebp-44] mov [ebp-40],esi mov esi,[ebp-78] mov [ebp-88],esi mov esi,[ebp-7C] mov [ebp-84],esi mov esi,[ebp-40] mov ecx,[ebp-3C] cmp esi,ecx mov [ebp-34],esi jg short M02_L05 mov [ebp-1C],edx mov ecx,[ebp-34] add ecx,ecx push ecx mov ecx,[ebp-88] mov edx,[ebp-84] call dword ptr ds:[828F450] test eax,eax mov edx,[ebp-1C] je short M02_L05 mov ecx,[ebp-68] mov eax,[ecx+4] mov edi,eax mov [ebp-14],edi cmp edi,ebx jae near ptr M02_L25 mov ecx,[ebp-14] jmp near ptr M02_L06 M02_L05: mov esi,[ebp-6C] test esi,esi je near ptr M02_L15 cmp dword ptr [esi+4],0 je near ptr M02_L14 mov ecx,[ebp-94] mov [ebp-74],ecx mov [ebp-38],ebx lea ecx,[esi+8] mov [ebp-6C],esi mov esi,[esi+4] mov [ebp-48],esi mov esi,[ebp-74] mov [ebp-90],esi mov [ebp-8C],ecx mov ecx,[ebp-48] mov esi,[ebp-38] cmp ecx,esi jg near ptr M02_L13 mov [ebp-1C],edx add ecx,ecx push ecx mov ecx,[ebp-90] mov edx,[ebp-8C] call dword ptr ds:[828F450] test eax,eax mov ecx,[ebp-14] mov edx,[ebp-1C] je short M02_L07 mov dword ptr [ebp-1C],1 mov esi,[ebp-6C] mov edx,[esi+4] mov edi,edx cmp edi,ebx mov ecx,edi mov edx,[ebp-1C] jae near ptr M02_L25 M02_L06: cmp ecx,[ebp+10] jae near ptr M02_L36 mov eax,[ebp+0C] movzx edi,word ptr [eax+ecx*2] M02_L07: xor ebx,ebx xor eax,eax lea esi,[edi-30] cmp esi,9 ja near ptr M02_L25 cmp edi,30 jne short M02_L09 M02_L08: inc ecx mov esi,[ebp+10] cmp ecx,esi mov [ebp-1C],edx jae near ptr M02_L23 mov edi,[ebp+0C] movzx edx,word ptr [edi+ecx*2] cmp edx,30 mov [ebp-98],edi je near ptr M02_L12 mov edi,edx lea edx,[edi-30] cmp edx,9 mov edx,[ebp-1C] ja near ptr M02_L27 M02_L09: add edi,0FFFFFFD0 mov eax,edi sar eax,1F mov [ebp-4C],edi mov [ebp-50],eax inc ecx xor edi,edi M02_L10: mov esi,[ebp+10] cmp ecx,esi jae near ptr M02_L22 mov [ebp-1C],edx mov edx,[ebp+0C] mov [ebp-98],edx movzx eax,word ptr [edx+ecx*2] mov [ebp-18],eax lea ebx,[eax-30] cmp ebx,9 ja near ptr M02_L28 inc ecx mov [ebp-14],ecx push dword ptr [ebp-50] push dword ptr [ebp-4C] push 0 push 0A call CORINFO_HELP_LMUL mov ebx,[ebp-18] mov ecx,ebx sar ebx,1F add eax,ecx adc edx,ebx mov ebx,eax sub ebx,30 mov eax,edx sbb eax,0 mov [ebp-50],eax inc edi cmp edi,12 mov [ebp-4C],ebx mov ecx,[ebp-14] mov edx,[ebp-1C] jl short M02_L10 mov edi,[ebp-98] cmp ecx,esi jae near ptr M02_L22 mov [ebp-1C],edx movzx edx,word ptr [edi+ecx*2] lea eax,[edx-30] cmp eax,9 ja short M02_L11 inc ecx mov [ebp-14],ecx mov eax,[ebp-1C] mov [ebp-20],eax mov ebx,[ebp-4C] cmp ebx,9999999A mov eax,[ebp-50] sbb eax,19999999 jae short M02_L17 nop nop nop nop mov eax,[ebp-20] mov [ebp-2C],eax mov eax,ebx xor eax,99999999 mov [ebp-9C],eax mov eax,[ebp-50] xor eax,19999999 or eax,[ebp-9C] jne short M02_L16 mov eax,[ebp-2C] mov [ebp-24],eax mov [ebp-18],edx xor eax,eax cmp edx,35 setg al mov [ebp-28],eax jmp short M02_L18 M02_L11: mov [ebp-18],edx mov [ebp-98],edi jmp near ptr M02_L28 M02_L12: mov edx,[ebp-1C] jmp near ptr M02_L08 M02_L13: mov ecx,[ebp-14] jmp near ptr M02_L07 M02_L14: mov ecx,[ebp-14] jmp near ptr M02_L07 nop M02_L15: mov ecx,[ebp-14] jmp near ptr M02_L07 M02_L16: mov eax,[ebp-2C] mov [ebp-24],eax xor eax,eax mov [ebp-18],edx mov [ebp-28],eax jmp short M02_L18 M02_L17: mov eax,[ebp-20] mov [ebp-24],eax mov dword ptr [ebp-28],1 mov [ebp-18],edx M02_L18: mov eax,[ebp-24] or eax,[ebp-28] movzx eax,al mov [ebp-1C],eax push dword ptr [ebp-50] push ebx push 0 push 0A call CORINFO_HELP_LMUL mov ebx,[ebp-18] mov ecx,ebx sar ebx,1F add eax,ecx adc edx,ebx mov ebx,eax sub ebx,30 mov eax,edx sbb eax,0 mov [ebp-50],eax mov ecx,[ebp-14] cmp ecx,esi jae short M02_L21 movzx eax,word ptr [edi+ecx*2] lea edx,[eax-30] cmp edx,9 mov [ebp-18],eax ja short M02_L20 M02_L19: mov dword ptr [ebp-1C],1 inc ecx cmp ecx,esi jae short M02_L26 movzx eax,word ptr [edi+ecx*2] lea edx,[eax-30] cmp edx,9 jbe short M02_L19 mov [ebp-18],eax mov [ebp-98],edi mov [ebp-4C],ebx jmp short M02_L28 M02_L20: mov [ebp-98],edi mov [ebp-4C],ebx jmp short M02_L28 nop nop nop M02_L21: mov [ebp-4C],ebx mov edx,[ebp-1C] M02_L22: test edx,edx mov eax,[ebp-50] mov ebx,[ebp-4C] jne short M02_L26 M02_L23: mov edi,[ebp+8] mov [edi],ebx mov [edi+4],eax xor eax,eax M02_L24: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret 0C M02_L25: mov edi,[ebp+8] mov eax,edi xor edx,edx mov [eax],edx mov [eax+4],edx mov eax,1 jmp short M02_L24 M02_L26: mov edi,[ebp+8] mov eax,edi xor ecx,ecx mov [eax],ecx mov [eax+4],ecx mov eax,2 jmp short M02_L24 M02_L27: xor edx,edx mov [ebp-18],edi mov [ebp-4C],ebx mov [ebp-50],eax mov [ebp-1C],edx M02_L28: mov eax,[ebp-18] cmp eax,20 je short M02_L29 add eax,0FFFFFFF7 cmp eax,4 ja short M02_L33 M02_L29: test byte ptr [ebp-10],2 je short M02_L25 mov edx,[ebp-98] mov edi,[ebp-50] inc ecx cmp ecx,esi jge short M02_L32 M02_L30: cmp ecx,esi jae short M02_L36 movzx ebx,word ptr [edx+ecx*2] cmp ebx,20 je short M02_L31 add ebx,0FFFFFFF7 cmp ebx,4 ja short M02_L32 M02_L31: inc ecx cmp ecx,esi jl short M02_L30 M02_L32: cmp ecx,esi mov [ebp-50],edi jae short M02_L34 M02_L33: push dword ptr [ebp+10] push dword ptr [ebp+0C] call dword ptr ds:[88F12E8] test eax,eax mov edx,[ebp-1C] jne near ptr M02_L22 jmp near ptr M02_L25 M02_L34: mov edx,[ebp-1C] jmp near ptr M02_L22 M02_L35: call dword ptr ds:[8969270] int 3 M02_L36: call CORINFO_HELP_RNGCHKFAIL int 3 ; Total bytes of code 1266 ``` #### System.Tests.Perf_UInt64.TryParse(value: "12345") ```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 24.680304272759045 < 27.180219142786328. IsChangePoint: Marked as a change because one of 12/8/2022 9:11:55 AM, 1/26/2023 2:33:00 AM, 2/16/2023 9:09:51 PM, 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 3.6357869664326623 (T) = (0 -26.25772638260189) / Math.Sqrt((7.338440532559096 / (299)) + (4.337881096173602 / (22))) is greater than 1.9674283869023508 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (22) - 2, .975) and 0.06120861328964842 = (27.969713777000464 - 26.25772638260189) / 27.969713777000464 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; System.Tests.Perf_UInt64.TryParse(System.String) push ebp mov ebp,esp sub esp,8 xor eax,eax mov [ebp-8],eax mov [ebp-4],eax test edx,edx jne short M00_L00 xor edx,edx xor eax,eax mov [ebp-8],edx mov [ebp-4],eax jmp short M00_L01 M00_L00: lea eax,[edx+8] mov edx,[edx+4] push edx push eax call dword ptr ds:[0A1F38B8]; System.Globalization.NumberFormatInfo.get_CurrentInfo() mov edx,eax lea ecx,[ebp-8] push ecx mov ecx,7 call dword ptr ds:[815D138]; System.Number.TryParseUInt64IntegerStyle(System.ReadOnlySpan`1, System.Globalization.NumberStyles, System.Globalization.NumberFormatInfo, UInt64 ByRef) test eax,eax sete al movzx eax,al M00_L01: mov esp,ebp pop ebp ret ; Total bytes of code 73 ``` ```assembly ; System.Globalization.NumberFormatInfo.get_CurrentInfo() push ebp mov ebp,esp mov ecx,2CE4E68 mov edx,250 call CORINFO_HELP_GETSHARED_GCTHREADSTATIC_BASE mov ecx,[eax+4] test ecx,ecx jne short M01_L00 mov ecx,ds:[6A21240] test ecx,ecx jne short M01_L00 mov ecx,ds:[6A21230] test ecx,ecx je short M01_L03 M01_L00: cmp byte ptr [ecx+31],0 jne short M01_L01 mov eax,[ecx+0C] test eax,eax je short M01_L01 pop ebp ret M01_L01: mov edx,7BA56F8 mov eax,[ecx] mov eax,[eax+30] call dword ptr [eax] mov edx,eax mov eax,edx test eax,eax je short M01_L02 mov ecx,offset MT_System.Globalization.NumberFormatInfo cmp [eax],ecx jne short M01_L04 M01_L02: pop ebp ret M01_L03: call dword ptr ds:[8157330] mov ecx,eax jmp short M01_L00 M01_L04: call dword ptr ds:[480B8B8] int 3 ; Total bytes of code 108 ``` ```assembly ; System.Number.TryParseUInt64IntegerStyle(System.ReadOnlySpan`1, System.Globalization.NumberStyles, System.Globalization.NumberFormatInfo, UInt64 ByRef) push ebp mov ebp,esp push edi push esi push ebx sub esp,90 mov [ebp-64],edx mov esi,ecx mov ebx,[ebp+10] test ebx,ebx je near ptr M02_L25 xor ecx,ecx mov eax,[ebp+0C] movzx edi,word ptr [eax] mov [ebp-10],esi test esi,1 je short M02_L01 cmp edi,20 je short M02_L00 lea esi,[edi-9] cmp esi,4 ja short M02_L01 M02_L00: inc ecx cmp ecx,ebx jae near ptr M02_L25 movzx edi,word ptr [eax+ecx*2] cmp edi,20 je short M02_L00 lea esi,[edi-9] cmp esi,4 jbe short M02_L00 M02_L01: xor esi,esi xor edx,edx test byte ptr [ebp-10],4 je near ptr M02_L07 mov esi,[ebp-64] cmp byte ptr [esi+71],0 je short M02_L03 cmp edi,2B jne short M02_L02 inc ecx cmp ecx,ebx jae near ptr M02_L25 jmp near ptr M02_L06 M02_L02: cmp edi,2D jne near ptr M02_L07 mov edx,1 inc ecx cmp ecx,ebx jae near ptr M02_L25 jmp near ptr M02_L06 M02_L03: cmp byte ptr [esi+72],0 je short M02_L04 cmp edi,2D jne short M02_L04 mov dword ptr [ebp-1C],1 inc ecx cmp ecx,ebx jae near ptr M02_L25 mov edx,[ebp-1C] jmp near ptr M02_L06 M02_L04: cmp ecx,ebx ja near ptr M02_L35 lea eax,[eax+ecx*2] mov [ebp-94],eax sub ebx,ecx mov ecx,ebx mov [ebp+0C],eax mov [ebp+10],ecx xor ecx,ecx mov [ebp-14],ecx mov ecx,[esi+10] mov [ebp-68],ecx mov esi,[esi+14] mov [ebp-6C],esi test ecx,ecx je near ptr M02_L05 cmp dword ptr [ecx+4],0 je near ptr M02_L05 mov esi,[ebp-94] mov [ebp-78],esi mov [ebp-3C],ebx lea esi,[ecx+8] mov [ebp-70],esi mov esi,[ecx+4] mov [ebp-30],esi mov esi,[ebp-70] mov [ebp-80],esi mov esi,[ebp-30] mov [ebp-44],esi mov esi,[ebp-80] mov [ebp-7C],esi mov esi,[ebp-44] mov [ebp-40],esi mov esi,[ebp-78] mov [ebp-88],esi mov esi,[ebp-7C] mov [ebp-84],esi mov esi,[ebp-40] mov ecx,[ebp-3C] cmp esi,ecx mov [ebp-34],esi jg short M02_L05 mov [ebp-1C],edx mov ecx,[ebp-34] add ecx,ecx push ecx mov ecx,[ebp-88] mov edx,[ebp-84] call dword ptr ds:[481F120] test eax,eax mov edx,[ebp-1C] je short M02_L05 mov ecx,[ebp-68] mov eax,[ecx+4] mov edi,eax mov [ebp-14],edi cmp edi,ebx jae near ptr M02_L25 mov ecx,[ebp-14] jmp near ptr M02_L06 M02_L05: mov esi,[ebp-6C] test esi,esi je near ptr M02_L15 cmp dword ptr [esi+4],0 je near ptr M02_L14 mov ecx,[ebp-94] mov [ebp-74],ecx mov [ebp-38],ebx lea ecx,[esi+8] mov [ebp-6C],esi mov esi,[esi+4] mov [ebp-48],esi mov esi,[ebp-74] mov [ebp-90],esi mov [ebp-8C],ecx mov ecx,[ebp-48] mov esi,[ebp-38] cmp ecx,esi jg near ptr M02_L13 mov [ebp-1C],edx add ecx,ecx push ecx mov ecx,[ebp-90] mov edx,[ebp-8C] call dword ptr ds:[481F120] test eax,eax mov ecx,[ebp-14] mov edx,[ebp-1C] je short M02_L07 mov dword ptr [ebp-1C],1 mov esi,[ebp-6C] mov edx,[esi+4] mov edi,edx cmp edi,ebx mov ecx,edi mov edx,[ebp-1C] jae near ptr M02_L25 M02_L06: cmp ecx,[ebp+10] jae near ptr M02_L36 mov eax,[ebp+0C] movzx edi,word ptr [eax+ecx*2] M02_L07: xor ebx,ebx xor eax,eax lea esi,[edi-30] cmp esi,9 ja near ptr M02_L25 cmp edi,30 jne short M02_L09 M02_L08: inc ecx mov esi,[ebp+10] cmp ecx,esi mov [ebp-1C],edx jae near ptr M02_L23 mov edi,[ebp+0C] movzx edx,word ptr [edi+ecx*2] cmp edx,30 mov [ebp-98],edi je near ptr M02_L12 mov edi,edx lea edx,[edi-30] cmp edx,9 mov edx,[ebp-1C] ja near ptr M02_L27 M02_L09: add edi,0FFFFFFD0 mov eax,edi sar eax,1F mov [ebp-4C],edi mov [ebp-50],eax inc ecx xor edi,edi M02_L10: mov esi,[ebp+10] cmp ecx,esi jae near ptr M02_L22 mov [ebp-1C],edx mov edx,[ebp+0C] mov [ebp-98],edx movzx eax,word ptr [edx+ecx*2] mov [ebp-18],eax lea ebx,[eax-30] cmp ebx,9 ja near ptr M02_L28 inc ecx mov [ebp-14],ecx push dword ptr [ebp-50] push dword ptr [ebp-4C] push 0 push 0A call CORINFO_HELP_LMUL mov ebx,[ebp-18] mov ecx,ebx sar ebx,1F add eax,ecx adc edx,ebx mov ebx,eax sub ebx,30 mov eax,edx sbb eax,0 mov [ebp-50],eax inc edi cmp edi,12 mov [ebp-4C],ebx mov ecx,[ebp-14] mov edx,[ebp-1C] jl short M02_L10 mov edi,[ebp-98] cmp ecx,esi jae near ptr M02_L22 mov [ebp-1C],edx movzx edx,word ptr [edi+ecx*2] lea eax,[edx-30] cmp eax,9 ja short M02_L11 inc ecx mov [ebp-14],ecx mov eax,[ebp-1C] mov [ebp-20],eax mov ebx,[ebp-4C] cmp ebx,9999999A mov eax,[ebp-50] sbb eax,19999999 jae short M02_L17 nop nop nop nop mov eax,[ebp-20] mov [ebp-2C],eax mov eax,ebx xor eax,99999999 mov [ebp-9C],eax mov eax,[ebp-50] xor eax,19999999 or eax,[ebp-9C] jne short M02_L16 mov eax,[ebp-2C] mov [ebp-24],eax mov [ebp-18],edx xor eax,eax cmp edx,35 setg al mov [ebp-28],eax jmp short M02_L18 M02_L11: mov [ebp-18],edx mov [ebp-98],edi jmp near ptr M02_L28 M02_L12: mov edx,[ebp-1C] jmp near ptr M02_L08 M02_L13: mov ecx,[ebp-14] jmp near ptr M02_L07 M02_L14: mov ecx,[ebp-14] jmp near ptr M02_L07 nop M02_L15: mov ecx,[ebp-14] jmp near ptr M02_L07 M02_L16: mov eax,[ebp-2C] mov [ebp-24],eax xor eax,eax mov [ebp-18],edx mov [ebp-28],eax jmp short M02_L18 M02_L17: mov eax,[ebp-20] mov [ebp-24],eax mov dword ptr [ebp-28],1 mov [ebp-18],edx M02_L18: mov eax,[ebp-24] or eax,[ebp-28] movzx eax,al mov [ebp-1C],eax push dword ptr [ebp-50] push ebx push 0 push 0A call CORINFO_HELP_LMUL mov ebx,[ebp-18] mov ecx,ebx sar ebx,1F add eax,ecx adc edx,ebx mov ebx,eax sub ebx,30 mov eax,edx sbb eax,0 mov [ebp-50],eax mov ecx,[ebp-14] cmp ecx,esi jae short M02_L21 movzx eax,word ptr [edi+ecx*2] lea edx,[eax-30] cmp edx,9 mov [ebp-18],eax ja short M02_L20 M02_L19: mov dword ptr [ebp-1C],1 inc ecx cmp ecx,esi jae short M02_L26 movzx eax,word ptr [edi+ecx*2] lea edx,[eax-30] cmp edx,9 jbe short M02_L19 mov [ebp-18],eax mov [ebp-98],edi mov [ebp-4C],ebx jmp short M02_L28 M02_L20: mov [ebp-98],edi mov [ebp-4C],ebx jmp short M02_L28 nop nop nop M02_L21: mov [ebp-4C],ebx mov edx,[ebp-1C] M02_L22: test edx,edx mov eax,[ebp-50] mov ebx,[ebp-4C] jne short M02_L26 M02_L23: mov edi,[ebp+8] mov [edi],ebx mov [edi+4],eax xor eax,eax M02_L24: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret 0C M02_L25: mov edi,[ebp+8] mov eax,edi xor edx,edx mov [eax],edx mov [eax+4],edx mov eax,1 jmp short M02_L24 M02_L26: mov edi,[ebp+8] mov eax,edi xor ecx,ecx mov [eax],ecx mov [eax+4],ecx mov eax,2 jmp short M02_L24 M02_L27: xor edx,edx mov [ebp-18],edi mov [ebp-4C],ebx mov [ebp-50],eax mov [ebp-1C],edx M02_L28: mov eax,[ebp-18] cmp eax,20 je short M02_L29 add eax,0FFFFFFF7 cmp eax,4 ja short M02_L33 M02_L29: test byte ptr [ebp-10],2 je short M02_L25 mov edx,[ebp-98] mov edi,[ebp-50] inc ecx cmp ecx,esi jge short M02_L32 M02_L30: cmp ecx,esi jae short M02_L36 movzx ebx,word ptr [edx+ecx*2] cmp ebx,20 je short M02_L31 add ebx,0FFFFFFF7 cmp ebx,4 ja short M02_L32 M02_L31: inc ecx cmp ecx,esi jl short M02_L30 M02_L32: cmp ecx,esi mov [ebp-50],edi jae short M02_L34 M02_L33: push dword ptr [ebp+10] push dword ptr [ebp+0C] call dword ptr ds:[815D2D0] test eax,eax mov edx,[ebp-1C] jne near ptr M02_L22 jmp near ptr M02_L25 M02_L34: mov edx,[ebp-1C] jmp near ptr M02_L22 M02_L35: call dword ptr ds:[8215270] int 3 M02_L36: call CORINFO_HELP_RNGCHKFAIL int 3 ; Total bytes of code 1266 ``` ### Compare Jit Disasm ```assembly ; System.Tests.Perf_UInt64.TryParse(System.String) push ebp mov ebp,esp sub esp,8 xor eax,eax mov [ebp-8],eax mov [ebp-4],eax test edx,edx jne short M00_L00 xor edx,edx xor eax,eax mov [ebp-8],edx mov [ebp-4],eax jmp short M00_L01 M00_L00: lea eax,[edx+8] mov edx,[edx+4] push edx push eax call dword ptr ds:[0A8378B8]; System.Globalization.NumberFormatInfo.get_CurrentInfo() mov edx,eax lea ecx,[ebp-8] push ecx mov ecx,7 call dword ptr ds:[8761150]; System.Number.TryParseUInt64IntegerStyle(System.ReadOnlySpan`1, System.Globalization.NumberStyles, System.Globalization.NumberFormatInfo, UInt64 ByRef) test eax,eax sete al movzx eax,al M00_L01: mov esp,ebp pop ebp ret ; Total bytes of code 73 ``` ```assembly ; System.Globalization.NumberFormatInfo.get_CurrentInfo() push ebp mov ebp,esp mov ecx,4C14EA8 mov edx,251 call CORINFO_HELP_GETSHARED_GCTHREADSTATIC_BASE mov ecx,[eax+4] test ecx,ecx jne short M01_L00 mov ecx,ds:[6E51238] test ecx,ecx jne short M01_L00 mov ecx,ds:[6E51228] test ecx,ecx je short M01_L03 M01_L00: cmp byte ptr [ecx+31],0 jne short M01_L01 mov eax,[ecx+0C] test eax,eax je short M01_L01 pop ebp ret M01_L01: mov edx,81156F8 mov eax,[ecx] mov eax,[eax+30] call dword ptr [eax] mov edx,eax mov eax,edx test eax,eax je short M01_L02 mov ecx,offset MT_System.Globalization.NumberFormatInfo cmp [eax],ecx jne short M01_L04 M01_L02: pop ebp ret M01_L03: call dword ptr ds:[871B030] mov ecx,eax jmp short M01_L00 M01_L04: call dword ptr ds:[80DB8B8] int 3 ; Total bytes of code 108 ``` ```assembly ; System.Number.TryParseUInt64IntegerStyle(System.ReadOnlySpan`1, System.Globalization.NumberStyles, System.Globalization.NumberFormatInfo, UInt64 ByRef) push ebp mov ebp,esp push edi push esi push ebx sub esp,90 mov [ebp-64],edx mov esi,ecx mov ebx,[ebp+10] test ebx,ebx je near ptr M02_L25 xor ecx,ecx mov eax,[ebp+0C] movzx edi,word ptr [eax] mov [ebp-10],esi test esi,1 je short M02_L01 cmp edi,20 je short M02_L00 lea esi,[edi-9] cmp esi,4 ja short M02_L01 M02_L00: inc ecx cmp ecx,ebx jae near ptr M02_L25 movzx edi,word ptr [eax+ecx*2] cmp edi,20 je short M02_L00 lea esi,[edi-9] cmp esi,4 jbe short M02_L00 M02_L01: xor esi,esi xor edx,edx test byte ptr [ebp-10],4 je near ptr M02_L07 mov esi,[ebp-64] cmp byte ptr [esi+71],0 je short M02_L03 cmp edi,2B jne short M02_L02 inc ecx cmp ecx,ebx jae near ptr M02_L25 jmp near ptr M02_L06 M02_L02: cmp edi,2D jne near ptr M02_L07 mov edx,1 inc ecx cmp ecx,ebx jae near ptr M02_L25 jmp near ptr M02_L06 M02_L03: cmp byte ptr [esi+72],0 je short M02_L04 cmp edi,2D jne short M02_L04 mov dword ptr [ebp-1C],1 inc ecx cmp ecx,ebx jae near ptr M02_L25 mov edx,[ebp-1C] jmp near ptr M02_L06 M02_L04: cmp ecx,ebx ja near ptr M02_L35 lea eax,[eax+ecx*2] mov [ebp-94],eax sub ebx,ecx mov ecx,ebx mov [ebp+0C],eax mov [ebp+10],ecx xor ecx,ecx mov [ebp-14],ecx mov ecx,[esi+10] mov [ebp-68],ecx mov esi,[esi+14] mov [ebp-6C],esi test ecx,ecx je near ptr M02_L05 cmp dword ptr [ecx+4],0 je near ptr M02_L05 mov esi,[ebp-94] mov [ebp-78],esi mov [ebp-3C],ebx lea esi,[ecx+8] mov [ebp-70],esi mov esi,[ecx+4] mov [ebp-30],esi mov esi,[ebp-70] mov [ebp-80],esi mov esi,[ebp-30] mov [ebp-44],esi mov esi,[ebp-80] mov [ebp-7C],esi mov esi,[ebp-44] mov [ebp-40],esi mov esi,[ebp-78] mov [ebp-88],esi mov esi,[ebp-7C] mov [ebp-84],esi mov esi,[ebp-40] mov ecx,[ebp-3C] cmp esi,ecx mov [ebp-34],esi jg short M02_L05 mov [ebp-1C],edx mov ecx,[ebp-34] add ecx,ecx push ecx mov ecx,[ebp-88] mov edx,[ebp-84] call dword ptr ds:[80FF450] test eax,eax mov edx,[ebp-1C] je short M02_L05 mov ecx,[ebp-68] mov eax,[ecx+4] mov edi,eax mov [ebp-14],edi cmp edi,ebx jae near ptr M02_L25 mov ecx,[ebp-14] jmp near ptr M02_L06 M02_L05: mov esi,[ebp-6C] test esi,esi je near ptr M02_L15 cmp dword ptr [esi+4],0 je near ptr M02_L14 mov ecx,[ebp-94] mov [ebp-74],ecx mov [ebp-38],ebx lea ecx,[esi+8] mov [ebp-6C],esi mov esi,[esi+4] mov [ebp-48],esi mov esi,[ebp-74] mov [ebp-90],esi mov [ebp-8C],ecx mov ecx,[ebp-48] mov esi,[ebp-38] cmp ecx,esi jg near ptr M02_L13 mov [ebp-1C],edx add ecx,ecx push ecx mov ecx,[ebp-90] mov edx,[ebp-8C] call dword ptr ds:[80FF450] test eax,eax mov ecx,[ebp-14] mov edx,[ebp-1C] je short M02_L07 mov dword ptr [ebp-1C],1 mov esi,[ebp-6C] mov edx,[esi+4] mov edi,edx cmp edi,ebx mov ecx,edi mov edx,[ebp-1C] jae near ptr M02_L25 M02_L06: cmp ecx,[ebp+10] jae near ptr M02_L36 mov eax,[ebp+0C] movzx edi,word ptr [eax+ecx*2] M02_L07: xor ebx,ebx xor eax,eax lea esi,[edi-30] cmp esi,9 ja near ptr M02_L25 cmp edi,30 jne short M02_L09 M02_L08: inc ecx mov esi,[ebp+10] cmp ecx,esi mov [ebp-1C],edx jae near ptr M02_L23 mov edi,[ebp+0C] movzx edx,word ptr [edi+ecx*2] cmp edx,30 mov [ebp-98],edi je near ptr M02_L12 mov edi,edx lea edx,[edi-30] cmp edx,9 mov edx,[ebp-1C] ja near ptr M02_L27 M02_L09: add edi,0FFFFFFD0 mov eax,edi sar eax,1F mov [ebp-4C],edi mov [ebp-50],eax inc ecx xor edi,edi M02_L10: mov esi,[ebp+10] cmp ecx,esi jae near ptr M02_L22 mov [ebp-1C],edx mov edx,[ebp+0C] mov [ebp-98],edx movzx eax,word ptr [edx+ecx*2] mov [ebp-18],eax lea ebx,[eax-30] cmp ebx,9 ja near ptr M02_L28 inc ecx mov [ebp-14],ecx push dword ptr [ebp-50] push dword ptr [ebp-4C] push 0 push 0A call CORINFO_HELP_LMUL mov ebx,[ebp-18] mov ecx,ebx sar ebx,1F add eax,ecx adc edx,ebx mov ebx,eax sub ebx,30 mov eax,edx sbb eax,0 mov [ebp-50],eax inc edi cmp edi,12 mov [ebp-4C],ebx mov ecx,[ebp-14] mov edx,[ebp-1C] jl short M02_L10 mov edi,[ebp-98] cmp ecx,esi jae near ptr M02_L22 mov [ebp-1C],edx movzx edx,word ptr [edi+ecx*2] lea eax,[edx-30] cmp eax,9 ja short M02_L11 inc ecx mov [ebp-14],ecx mov eax,[ebp-1C] mov [ebp-20],eax mov ebx,[ebp-4C] cmp ebx,9999999A mov eax,[ebp-50] sbb eax,19999999 jae short M02_L17 nop nop nop nop mov eax,[ebp-20] mov [ebp-2C],eax mov eax,ebx xor eax,99999999 mov [ebp-9C],eax mov eax,[ebp-50] xor eax,19999999 or eax,[ebp-9C] jne short M02_L16 mov eax,[ebp-2C] mov [ebp-24],eax mov [ebp-18],edx xor eax,eax cmp edx,35 setg al mov [ebp-28],eax jmp short M02_L18 M02_L11: mov [ebp-18],edx mov [ebp-98],edi jmp near ptr M02_L28 M02_L12: mov edx,[ebp-1C] jmp near ptr M02_L08 M02_L13: mov ecx,[ebp-14] jmp near ptr M02_L07 M02_L14: mov ecx,[ebp-14] jmp near ptr M02_L07 nop M02_L15: mov ecx,[ebp-14] jmp near ptr M02_L07 M02_L16: mov eax,[ebp-2C] mov [ebp-24],eax xor eax,eax mov [ebp-18],edx mov [ebp-28],eax jmp short M02_L18 M02_L17: mov eax,[ebp-20] mov [ebp-24],eax mov dword ptr [ebp-28],1 mov [ebp-18],edx M02_L18: mov eax,[ebp-24] or eax,[ebp-28] movzx eax,al mov [ebp-1C],eax push dword ptr [ebp-50] push ebx push 0 push 0A call CORINFO_HELP_LMUL mov ebx,[ebp-18] mov ecx,ebx sar ebx,1F add eax,ecx adc edx,ebx mov ebx,eax sub ebx,30 mov eax,edx sbb eax,0 mov [ebp-50],eax mov ecx,[ebp-14] cmp ecx,esi jae short M02_L21 movzx eax,word ptr [edi+ecx*2] lea edx,[eax-30] cmp edx,9 mov [ebp-18],eax ja short M02_L20 M02_L19: mov dword ptr [ebp-1C],1 inc ecx cmp ecx,esi jae short M02_L26 movzx eax,word ptr [edi+ecx*2] lea edx,[eax-30] cmp edx,9 jbe short M02_L19 mov [ebp-18],eax mov [ebp-98],edi mov [ebp-4C],ebx jmp short M02_L28 M02_L20: mov [ebp-98],edi mov [ebp-4C],ebx jmp short M02_L28 nop nop nop M02_L21: mov [ebp-4C],ebx mov edx,[ebp-1C] M02_L22: test edx,edx mov eax,[ebp-50] mov ebx,[ebp-4C] jne short M02_L26 M02_L23: mov edi,[ebp+8] mov [edi],ebx mov [edi+4],eax xor eax,eax M02_L24: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret 0C M02_L25: mov edi,[ebp+8] mov eax,edi xor edx,edx mov [eax],edx mov [eax+4],edx mov eax,1 jmp short M02_L24 M02_L26: mov edi,[ebp+8] mov eax,edi xor ecx,ecx mov [eax],ecx mov [eax+4],ecx mov eax,2 jmp short M02_L24 M02_L27: xor edx,edx mov [ebp-18],edi mov [ebp-4C],ebx mov [ebp-50],eax mov [ebp-1C],edx M02_L28: mov eax,[ebp-18] cmp eax,20 je short M02_L29 add eax,0FFFFFFF7 cmp eax,4 ja short M02_L33 M02_L29: test byte ptr [ebp-10],2 je short M02_L25 mov edx,[ebp-98] mov edi,[ebp-50] inc ecx cmp ecx,esi jge short M02_L32 M02_L30: cmp ecx,esi jae short M02_L36 movzx ebx,word ptr [edx+ecx*2] cmp ebx,20 je short M02_L31 add ebx,0FFFFFFF7 cmp ebx,4 ja short M02_L32 M02_L31: inc ecx cmp ecx,esi jl short M02_L30 M02_L32: cmp ecx,esi mov [ebp-50],edi jae short M02_L34 M02_L33: push dword ptr [ebp+10] push dword ptr [ebp+0C] call dword ptr ds:[87612E8] test eax,eax mov edx,[ebp-1C] jne near ptr M02_L22 jmp near ptr M02_L25 M02_L34: mov edx,[ebp-1C] jmp near ptr M02_L22 M02_L35: call dword ptr ds:[87D9270] int 3 M02_L36: call CORINFO_HELP_RNGCHKFAIL int 3 ; Total bytes of code 1266 ``` ### 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 x86
OS Windows 10.0.18362
Baseline 33b552f0c201d1763375c2016aa303fbe9280e02
Compare cbc8695ae0c8c2c2d1ac1fc4546d81e0967ef716
Diff Diff

Improvements in System.Tests.Perf_Int64

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[ParseSpan - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Tests.Perf_Int64.ParseSpan(value%3a%20%22-9223372036854775808%22).html>) 89.86 ns 0.84 ns 0.01 0.28 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_Int64*'
### Payloads [Baseline]() [Compare]() ### Histogram #### System.Tests.Perf_Int64.ParseSpan(value: "-9223372036854775808") ```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 0.8428777068469145 < 85.51485976354668. IsChangePoint: Marked as a change because one of 2/1/2023 6:25:50 PM, 2/7/2023 8:22:47 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 13.435392301194518 (T) = (0 -12.589994502468524) / Math.Sqrt((623.9122509853173 / (299)) + (798.4727018842098 / (38))) is greater than 1.967070609662329 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (38) - 2, .975) and 0.8368379976228894 = (77.1625398012076 - 12.589994502468524) / 77.1625398012076 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; System.Tests.Perf_Int64.ParseSpan(System.String) push ebp mov ebp,esp push edi push esi sub esp,8 test edx,edx je short M00_L01 lea esi,[edx+8] mov edi,[edx+4] M00_L00: push edi push esi call dword ptr ds:[0B0F38B8]; System.Globalization.NumberFormatInfo.get_CurrentInfo() mov edx,eax lea ecx,[ebp-10] push ecx mov ecx,7 call dword ptr ds:[8FED018]; System.Number.TryParseInt64IntegerStyle(System.ReadOnlySpan`1, System.Globalization.NumberStyles, System.Globalization.NumberFormatInfo, Int64 ByRef) mov ecx,eax test ecx,ecx jne short M00_L02 mov eax,[ebp-10] mov edx,[ebp-0C] lea esp,[ebp-8] pop esi pop edi pop ebp ret M00_L01: xor esi,esi xor edi,edi jmp short M00_L00 M00_L02: push edi push esi mov edx,0B call dword ptr ds:[8FED360] int 3 ; Total bytes of code 82 ``` ```assembly ; System.Globalization.NumberFormatInfo.get_CurrentInfo() push ebp mov ebp,esp mov ecx,54A4E68 mov edx,250 call CORINFO_HELP_GETSHARED_GCTHREADSTATIC_BASE mov ecx,[eax+4] test ecx,ecx jne short M01_L00 mov ecx,ds:[7771240] test ecx,ecx jne short M01_L00 mov ecx,ds:[7771230] test ecx,ecx je short M01_L03 M01_L00: cmp byte ptr [ecx+31],0 jne short M01_L01 mov eax,[ecx+0C] test eax,eax je short M01_L01 pop ebp ret M01_L01: mov edx,89E56F8 mov eax,[ecx] mov eax,[eax+30] call dword ptr [eax] mov edx,eax mov eax,edx test eax,eax je short M01_L02 mov ecx,offset MT_System.Globalization.NumberFormatInfo cmp [eax],ecx jne short M01_L04 M01_L02: pop ebp ret M01_L03: call dword ptr ds:[8FE7330] mov ecx,eax jmp short M01_L00 M01_L04: call dword ptr ds:[89AB8B8] int 3 ; Total bytes of code 108 ``` ```assembly ; System.Number.TryParseInt64IntegerStyle(System.ReadOnlySpan`1, System.Globalization.NumberStyles, System.Globalization.NumberFormatInfo, Int64 ByRef) push ebp mov ebp,esp push edi push esi push ebx sub esp,50 mov esi,ecx mov edi,[ebp+10] test edi,edi je near ptr M02_L07 xor ebx,ebx mov eax,[ebp+0C] movzx eax,word ptr [eax] test esi,1 je short M02_L00 cmp eax,20 je near ptr M02_L17 lea ecx,[eax-9] cmp ecx,4 jbe near ptr M02_L17 M02_L00: mov dword ptr [ebp-1C],1 mov [ebp-10],esi test esi,4 je short M02_L01 cmp byte ptr [edx+71],0 je near ptr M02_L20 cmp eax,2D je near ptr M02_L18 cmp eax,2B je near ptr M02_L19 M02_L01: xor edx,edx mov [ebp-20],edx xor edi,edi xor edx,edx lea ecx,[eax-30] cmp ecx,9 ja near ptr M02_L07 cmp eax,30 je short M02_L04 M02_L02: add eax,0FFFFFFD0 mov edx,eax sar edx,1F mov edi,eax inc ebx xor eax,eax mov [ebp-24],eax M02_L03: cmp ebx,[ebp+10] jae short M02_L05 mov ecx,[ebp+0C] movzx ecx,word ptr [ecx+ebx*2] mov [ebp-18],ecx lea esi,[ecx-30] cmp esi,9 ja near ptr M02_L09 inc ebx push edx push edi push 0 push 0A call CORINFO_HELP_LMUL mov esi,[ebp-18] mov ecx,esi sar esi,1F add eax,ecx adc edx,esi mov edi,eax sub edi,30 sbb edx,0 mov esi,edx mov eax,[ebp-24] inc eax cmp eax,11 jge near ptr M02_L26 mov [ebp-24],eax mov edx,esi jmp short M02_L03 M02_L04: inc ebx cmp ebx,[ebp+10] jb near ptr M02_L27 M02_L05: push edx push edi mov edi,[ebp-1C] mov eax,edi sar eax,1F push eax push edi call CORINFO_HELP_LMUL mov ebx,[ebp+8] mov [ebx],eax mov [ebx+4],edx xor eax,eax M02_L06: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret 0C M02_L07: mov ebx,[ebp+8] mov eax,ebx xor edx,edx mov [eax],edx mov [eax+4],edx mov eax,1 jmp short M02_L06 M02_L08: mov ebx,[ebp+8] mov eax,ebx xor edx,edx mov [eax],edx mov [eax+4],edx mov eax,2 jmp short M02_L06 M02_L09: mov ecx,[ebp-18] cmp ecx,20 je short M02_L10 add ecx,0FFFFFFF7 cmp ecx,4 setbe cl movzx ecx,cl test ecx,ecx je short M02_L11 M02_L10: test byte ptr [ebp-10],2 mov [ebp-30],edx je short M02_L07 mov esi,[ebp-1C] jmp short M02_L13 M02_L11: mov [ebp-30],edx jmp short M02_L15 M02_L12: cmp ebx,[ebp+10] jae near ptr M02_L31 mov ecx,[ebp+0C] movzx ecx,word ptr [ecx+ebx*2] cmp ecx,20 je short M02_L13 add ecx,0FFFFFFF7 cmp ecx,4 setbe cl movzx ecx,cl test ecx,ecx je short M02_L14 M02_L13: inc ebx cmp ebx,[ebp+10] jl short M02_L12 M02_L14: cmp ebx,[ebp+10] mov [ebp-1C],esi jae short M02_L16 M02_L15: push dword ptr [ebp+10] push dword ptr [ebp+0C] mov ecx,ebx call dword ptr ds:[8FED2D0] test eax,eax mov eax,[ebp-30] jne near ptr M02_L30 jmp near ptr M02_L07 M02_L16: mov eax,[ebp-30] jmp near ptr M02_L30 M02_L17: inc ebx cmp ebx,edi jae near ptr M02_L07 mov eax,[ebp+0C] movzx eax,word ptr [eax+ebx*2] cmp eax,20 je short M02_L17 lea ecx,[eax-9] cmp ecx,4 setbe cl movzx ecx,cl test ecx,ecx jne short M02_L17 jmp near ptr M02_L00 M02_L18: mov ecx,0FFFFFFFF inc ebx cmp ebx,edi jae near ptr M02_L07 mov esi,[ebp-10] jmp near ptr M02_L24 M02_L19: inc ebx cmp ebx,edi jae near ptr M02_L07 mov ecx,[ebp-1C] mov esi,[ebp-10] jmp near ptr M02_L24 M02_L20: cmp byte ptr [edx+72],0 je short M02_L21 mov [ebp-18],eax cmp eax,2D mov eax,[ebp-18] jne short M02_L21 mov ecx,0FFFFFFFF inc ebx cmp ebx,edi mov [ebp-1C],ecx jae near ptr M02_L07 mov esi,[ebp-10] mov ecx,[ebp-1C] jmp near ptr M02_L24 M02_L21: cmp ebx,edi jbe short M02_L22 call dword ptr ds:[90A5270] int 3 M02_L22: mov ecx,[ebp+0C] lea ecx,[ecx+ebx*2] sub edi,ebx mov [ebp+0C],ecx mov [ebp+10],edi xor ebx,ebx mov edi,[edx+10] mov [ebp-4C],edi mov edx,[edx+14] mov [ebp-50],edx test edi,edi je short M02_L23 xor ecx,ecx cmp dword ptr [edi+4],0 sete cl test ecx,ecx jne short M02_L23 mov ecx,[ebp+0C] mov edx,[ebp+10] mov [ebp-2C],edx lea edx,[edi+8] mov edi,[edi+4] cmp edi,[ebp-2C] jg short M02_L23 mov [ebp-18],eax add edi,edi push edi call dword ptr ds:[89BF120] test eax,eax mov eax,[ebp-18] je short M02_L23 mov edi,[ebp-4C] mov ebx,[edi+4] cmp ebx,[ebp+10] mov [ebp-14],ebx jae near ptr M02_L07 mov esi,[ebp-10] mov ecx,[ebp-1C] mov ebx,[ebp-14] jmp near ptr M02_L24 M02_L23: mov edx,[ebp-50] test edx,edx je near ptr M02_L01 mov [ebp-50],edx cmp dword ptr [edx+4],0 sete dl movzx edx,dl test edx,edx jne near ptr M02_L01 mov [ebp-14],ebx mov edx,[ebp+0C] mov edi,[ebp+10] mov ebx,[ebp-50] add ebx,8 mov ecx,[ebp-50] mov ecx,[ecx+4] cmp ecx,edi mov [ebp-28],ecx mov [ebp-54],ebx jg short M02_L25 mov [ebp-18],eax mov edi,[ebp-50] mov ebx,[ebp-28] add ebx,ebx push ebx mov ecx,edx mov edx,[ebp-54] call dword ptr ds:[89BF120] test eax,eax mov eax,[ebp-18] mov ebx,[ebp-14] je near ptr M02_L01 mov dword ptr [ebp-1C],0FFFFFFFF mov eax,[edi+4] mov edi,eax cmp edi,[ebp+10] mov ebx,edi mov ecx,[ebp-1C] mov esi,[ebp-10] jae near ptr M02_L07 M02_L24: cmp ebx,[ebp+10] jae near ptr M02_L31 mov eax,[ebp+0C] movzx eax,word ptr [eax+ebx*2] mov edi,eax mov [ebp-10],esi mov [ebp-1C],ecx mov eax,edi jmp near ptr M02_L01 M02_L25: mov ebx,[ebp-14] jmp near ptr M02_L01 M02_L26: cmp ebx,[ebp+10] mov edx,esi jae near ptr M02_L05 mov eax,[ebp+0C] movzx eax,word ptr [eax+ebx*2] mov [ebp-18],eax lea ecx,[eax-30] cmp ecx,9 ja near ptr M02_L09 inc ebx cmp edi,0CCCCCCCD mov ecx,edx sbb ecx,0CCCCCCC setge cl movzx ecx,cl mov [ebp-20],ecx push edx push edi push 0 push 0A call CORINFO_HELP_LMUL mov edi,[ebp-18] mov ecx,edi sar edi,1F add eax,ecx adc edx,edi mov edi,eax sub edi,30 sbb edx,0 mov eax,edx mov edx,[ebp-1C] mov ecx,edx shr ecx,1F mov [ebp-58],ecx xor ecx,ecx mov [ebp-5C],ecx mov ecx,[ebp-58] add ecx,0FFFFFFFF mov [ebp-58],ecx mov ecx,[ebp-5C] adc ecx,7FFFFFFF mov [ebp-5C],ecx mov ecx,[ebp-58] cmp ecx,edi mov ecx,[ebp-5C] sbb ecx,eax setb cl movzx ecx,cl or ecx,[ebp-20] movzx ecx,cl mov [ebp-20],ecx cmp ebx,[ebp+10] jae short M02_L30 jmp short M02_L29 M02_L27: mov eax,[ebp+0C] movzx eax,word ptr [eax+ebx*2] cmp eax,30 je near ptr M02_L04 lea ecx,[eax-30] cmp ecx,9 mov [ebp-18],eax ja near ptr M02_L09 mov eax,[ebp-18] jmp near ptr M02_L02 M02_L28: mov edx,1 inc ebx cmp ebx,[ebp+10] mov [ebp-20],edx jae near ptr M02_L08 M02_L29: cmp ebx,[ebp+10] jae short M02_L31 mov ecx,[ebp+0C] movzx ecx,word ptr [ecx+ebx*2] lea edx,[ecx-30] cmp edx,9 jbe short M02_L28 mov [ebp-18],ecx mov edx,eax jmp near ptr M02_L09 M02_L30: cmp dword ptr [ebp-20],0 jne near ptr M02_L08 mov edx,eax jmp near ptr M02_L05 M02_L31: call CORINFO_HELP_RNGCHKFAIL int 3 ; Total bytes of code 1138 ``` ### Compare Jit Disasm ```assembly ; System.Tests.Perf_Int64.ParseSpan(System.String) push ebp mov ebp,esp push edi push esi sub esp,8 test edx,edx je short M00_L01 lea esi,[edx+8] mov edi,[edx+4] M00_L00: push edi push esi call dword ptr ds:[0A9A78B8]; System.Globalization.NumberFormatInfo.get_CurrentInfo() mov edx,eax lea ecx,[ebp-10] push ecx mov ecx,7 call dword ptr ds:[8941030]; System.Number.TryParseInt64IntegerStyle(System.ReadOnlySpan`1, System.Globalization.NumberStyles, System.Globalization.NumberFormatInfo, Int64 ByRef) mov ecx,eax test ecx,ecx jne short M00_L02 mov eax,[ebp-10] mov edx,[ebp-0C] lea esp,[ebp-8] pop esi pop edi pop ebp ret M00_L01: xor esi,esi xor edi,edi jmp short M00_L00 M00_L02: push edi push esi mov edx,0B call dword ptr ds:[8941378] int 3 ; Total bytes of code 82 ``` ```assembly ; System.Globalization.NumberFormatInfo.get_CurrentInfo() push ebp mov ebp,esp mov ecx,4DC4EA8 mov edx,251 call CORINFO_HELP_GETSHARED_GCTHREADSTATIC_BASE mov ecx,[eax+4] test ecx,ecx jne short M01_L00 mov ecx,ds:[70C1238] test ecx,ecx jne short M01_L00 mov ecx,ds:[70C1228] test ecx,ecx je short M01_L03 M01_L00: cmp byte ptr [ecx+31],0 jne short M01_L01 mov eax,[ecx+0C] test eax,eax je short M01_L01 pop ebp ret M01_L01: mov edx,82F56F8 mov eax,[ecx] mov eax,[eax+30] call dword ptr [eax] mov edx,eax mov eax,edx test eax,eax je short M01_L02 mov ecx,offset MT_System.Globalization.NumberFormatInfo cmp [eax],ecx jne short M01_L04 M01_L02: pop ebp ret M01_L03: call dword ptr ds:[88FB030] mov ecx,eax jmp short M01_L00 M01_L04: call dword ptr ds:[82BB8B8] int 3 ; Total bytes of code 108 ``` ```assembly ; System.Number.TryParseInt64IntegerStyle(System.ReadOnlySpan`1, System.Globalization.NumberStyles, System.Globalization.NumberFormatInfo, Int64 ByRef) push ebp mov ebp,esp push edi push esi push ebx sub esp,50 mov esi,ecx mov edi,[ebp+10] test edi,edi je near ptr M02_L07 xor ebx,ebx mov eax,[ebp+0C] movzx eax,word ptr [eax] test esi,1 je short M02_L00 cmp eax,20 je near ptr M02_L17 lea ecx,[eax-9] cmp ecx,4 jbe near ptr M02_L17 M02_L00: mov dword ptr [ebp-1C],1 mov [ebp-10],esi test esi,4 je short M02_L01 cmp byte ptr [edx+71],0 je near ptr M02_L20 cmp eax,2D je near ptr M02_L18 cmp eax,2B je near ptr M02_L19 M02_L01: xor edx,edx mov [ebp-20],edx xor edi,edi xor edx,edx lea ecx,[eax-30] cmp ecx,9 ja near ptr M02_L07 cmp eax,30 je short M02_L04 M02_L02: add eax,0FFFFFFD0 mov edx,eax sar edx,1F mov edi,eax inc ebx xor eax,eax mov [ebp-24],eax M02_L03: cmp ebx,[ebp+10] jae short M02_L05 mov ecx,[ebp+0C] movzx ecx,word ptr [ecx+ebx*2] mov [ebp-18],ecx lea esi,[ecx-30] cmp esi,9 ja near ptr M02_L09 inc ebx push edx push edi push 0 push 0A call CORINFO_HELP_LMUL mov esi,[ebp-18] mov ecx,esi sar esi,1F add eax,ecx adc edx,esi mov edi,eax sub edi,30 sbb edx,0 mov esi,edx mov eax,[ebp-24] inc eax cmp eax,11 jge near ptr M02_L26 mov [ebp-24],eax mov edx,esi jmp short M02_L03 M02_L04: inc ebx cmp ebx,[ebp+10] jb near ptr M02_L27 M02_L05: push edx push edi mov edi,[ebp-1C] mov eax,edi sar eax,1F push eax push edi call CORINFO_HELP_LMUL mov ebx,[ebp+8] mov [ebx],eax mov [ebx+4],edx xor eax,eax M02_L06: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret 0C M02_L07: mov ebx,[ebp+8] mov eax,ebx xor edx,edx mov [eax],edx mov [eax+4],edx mov eax,1 jmp short M02_L06 M02_L08: mov ebx,[ebp+8] mov eax,ebx xor edx,edx mov [eax],edx mov [eax+4],edx mov eax,2 jmp short M02_L06 M02_L09: mov ecx,[ebp-18] cmp ecx,20 je short M02_L10 add ecx,0FFFFFFF7 cmp ecx,4 setbe cl movzx ecx,cl test ecx,ecx je short M02_L11 M02_L10: test byte ptr [ebp-10],2 mov [ebp-30],edx je short M02_L07 mov esi,[ebp-1C] jmp short M02_L13 M02_L11: mov [ebp-30],edx jmp short M02_L15 M02_L12: cmp ebx,[ebp+10] jae near ptr M02_L31 mov ecx,[ebp+0C] movzx ecx,word ptr [ecx+ebx*2] cmp ecx,20 je short M02_L13 add ecx,0FFFFFFF7 cmp ecx,4 setbe cl movzx ecx,cl test ecx,ecx je short M02_L14 M02_L13: inc ebx cmp ebx,[ebp+10] jl short M02_L12 M02_L14: cmp ebx,[ebp+10] mov [ebp-1C],esi jae short M02_L16 M02_L15: push dword ptr [ebp+10] push dword ptr [ebp+0C] mov ecx,ebx call dword ptr ds:[89412E8] test eax,eax mov eax,[ebp-30] jne near ptr M02_L30 jmp near ptr M02_L07 M02_L16: mov eax,[ebp-30] jmp near ptr M02_L30 M02_L17: inc ebx cmp ebx,edi jae near ptr M02_L07 mov eax,[ebp+0C] movzx eax,word ptr [eax+ebx*2] cmp eax,20 je short M02_L17 lea ecx,[eax-9] cmp ecx,4 setbe cl movzx ecx,cl test ecx,ecx jne short M02_L17 jmp near ptr M02_L00 M02_L18: mov ecx,0FFFFFFFF inc ebx cmp ebx,edi jae near ptr M02_L07 mov esi,[ebp-10] jmp near ptr M02_L24 M02_L19: inc ebx cmp ebx,edi jae near ptr M02_L07 mov ecx,[ebp-1C] mov esi,[ebp-10] jmp near ptr M02_L24 M02_L20: cmp byte ptr [edx+72],0 je short M02_L21 mov [ebp-18],eax cmp eax,2D mov eax,[ebp-18] jne short M02_L21 mov ecx,0FFFFFFFF inc ebx cmp ebx,edi mov [ebp-1C],ecx jae near ptr M02_L07 mov esi,[ebp-10] mov ecx,[ebp-1C] jmp near ptr M02_L24 M02_L21: cmp ebx,edi jbe short M02_L22 call dword ptr ds:[89B9270] int 3 M02_L22: mov ecx,[ebp+0C] lea ecx,[ecx+ebx*2] sub edi,ebx mov [ebp+0C],ecx mov [ebp+10],edi xor ebx,ebx mov edi,[edx+10] mov [ebp-4C],edi mov edx,[edx+14] mov [ebp-50],edx test edi,edi je short M02_L23 xor ecx,ecx cmp dword ptr [edi+4],0 sete cl test ecx,ecx jne short M02_L23 mov ecx,[ebp+0C] mov edx,[ebp+10] mov [ebp-2C],edx lea edx,[edi+8] mov edi,[edi+4] cmp edi,[ebp-2C] jg short M02_L23 mov [ebp-18],eax add edi,edi push edi call dword ptr ds:[82DF450] test eax,eax mov eax,[ebp-18] je short M02_L23 mov edi,[ebp-4C] mov ebx,[edi+4] cmp ebx,[ebp+10] mov [ebp-14],ebx jae near ptr M02_L07 mov esi,[ebp-10] mov ecx,[ebp-1C] mov ebx,[ebp-14] jmp near ptr M02_L24 M02_L23: mov edx,[ebp-50] test edx,edx je near ptr M02_L01 mov [ebp-50],edx cmp dword ptr [edx+4],0 sete dl movzx edx,dl test edx,edx jne near ptr M02_L01 mov [ebp-14],ebx mov edx,[ebp+0C] mov edi,[ebp+10] mov ebx,[ebp-50] add ebx,8 mov ecx,[ebp-50] mov ecx,[ecx+4] cmp ecx,edi mov [ebp-28],ecx mov [ebp-54],ebx jg short M02_L25 mov [ebp-18],eax mov edi,[ebp-50] mov ebx,[ebp-28] add ebx,ebx push ebx mov ecx,edx mov edx,[ebp-54] call dword ptr ds:[82DF450] test eax,eax mov eax,[ebp-18] mov ebx,[ebp-14] je near ptr M02_L01 mov dword ptr [ebp-1C],0FFFFFFFF mov eax,[edi+4] mov edi,eax cmp edi,[ebp+10] mov ebx,edi mov ecx,[ebp-1C] mov esi,[ebp-10] jae near ptr M02_L07 M02_L24: cmp ebx,[ebp+10] jae near ptr M02_L31 mov eax,[ebp+0C] movzx eax,word ptr [eax+ebx*2] mov edi,eax mov [ebp-10],esi mov [ebp-1C],ecx mov eax,edi jmp near ptr M02_L01 M02_L25: mov ebx,[ebp-14] jmp near ptr M02_L01 M02_L26: cmp ebx,[ebp+10] mov edx,esi jae near ptr M02_L05 mov eax,[ebp+0C] movzx eax,word ptr [eax+ebx*2] mov [ebp-18],eax lea ecx,[eax-30] cmp ecx,9 ja near ptr M02_L09 inc ebx cmp edi,0CCCCCCCD mov ecx,edx sbb ecx,0CCCCCCC setge cl movzx ecx,cl mov [ebp-20],ecx push edx push edi push 0 push 0A call CORINFO_HELP_LMUL mov edi,[ebp-18] mov ecx,edi sar edi,1F add eax,ecx adc edx,edi mov edi,eax sub edi,30 sbb edx,0 mov eax,edx mov edx,[ebp-1C] mov ecx,edx shr ecx,1F mov [ebp-58],ecx xor ecx,ecx mov [ebp-5C],ecx mov ecx,[ebp-58] add ecx,0FFFFFFFF mov [ebp-58],ecx mov ecx,[ebp-5C] adc ecx,7FFFFFFF mov [ebp-5C],ecx mov ecx,[ebp-58] cmp ecx,edi mov ecx,[ebp-5C] sbb ecx,eax setb cl movzx ecx,cl or ecx,[ebp-20] movzx ecx,cl mov [ebp-20],ecx cmp ebx,[ebp+10] jae short M02_L30 jmp short M02_L29 M02_L27: mov eax,[ebp+0C] movzx eax,word ptr [eax+ebx*2] cmp eax,30 je near ptr M02_L04 lea ecx,[eax-30] cmp ecx,9 mov [ebp-18],eax ja near ptr M02_L09 mov eax,[ebp-18] jmp near ptr M02_L02 M02_L28: mov edx,1 inc ebx cmp ebx,[ebp+10] mov [ebp-20],edx jae near ptr M02_L08 M02_L29: cmp ebx,[ebp+10] jae short M02_L31 mov ecx,[ebp+0C] movzx ecx,word ptr [ecx+ebx*2] lea edx,[ecx-30] cmp edx,9 jbe short M02_L28 mov [ebp-18],ecx mov edx,eax jmp near ptr M02_L09 M02_L30: cmp dword ptr [ebp-20],0 jne near ptr M02_L08 mov edx,eax jmp near ptr M02_L05 M02_L31: call CORINFO_HELP_RNGCHKFAIL int 3 ; Total bytes of code 1138 ``` ### 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 x86
OS Windows 10.0.18362
Baseline 33b552f0c201d1763375c2016aa303fbe9280e02
Compare cbc8695ae0c8c2c2d1ac1fc4546d81e0967ef716
Diff Diff

Improvements in System.Net.Http.Tests.SocketsHttpHandlerPerfTest

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[Get - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Net.Http.Tests.SocketsHttpHandlerPerfTest.Get(ssl%3a%20True%2c%20chunkedResponse%3a%20True%2c%20responseLength%3a%201).html>) 69.33 μs 54.83 μs 0.79 0.33 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.Net.Http.Tests.SocketsHttpHandlerPerfTest*'
### Payloads [Baseline]() [Compare]() ### Histogram #### System.Net.Http.Tests.SocketsHttpHandlerPerfTest.Get(ssl: True, chunkedResponse: True, responseLength: 1) ```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 54.83439497716895 < 66.69910823246173. IsChangePoint: Marked as a change because one of 1/5/2023 11:35:29 PM, 1/11/2023 4:46:06 PM, 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 8.604366201231835 (T) = (0 -54004.12439623977) / Math.Sqrt((43257314.46217578 / (299)) + (2315618.0492496043 / (38))) is greater than 1.967070609662329 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (38) - 2, .975) and 0.06737832663368368 = (57905.714544795876 - 54004.12439623977) / 57905.714544795876 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; System.Net.Http.Tests.SocketsHttpHandlerPerfTest.Get() push ebp mov ebp,esp sub esp,20 vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-20],xmm4 vmovdqu xmmword ptr [ebp-10],xmm4 mov [ebp-20],ecx mov dword ptr [ebp-14],0FFFFFFFF lea ecx,[ebp-20] call dword ptr ds:[0C88B270]; System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.Net.Http.Tests.SocketsHttpHandlerPerfTest+d__10, MicroBenchmarks]](d__10 ByRef) mov eax,[ebp-10] test eax,eax je short M00_L01 M00_L00: mov esp,ebp pop ebp ret M00_L01: lea ecx,[ebp-10] call dword ptr ds:[0C0657E0] jmp short M00_L00 ; Total bytes of code 61 ``` ```assembly ; System.Threading.Tasks.Task.GetAwaiter() mov eax,ecx ret ; Total bytes of code 3 ``` ```assembly ; System.Runtime.CompilerServices.TaskAwaiter.GetResult() mov ecx,[ecx] mov eax,[ecx+1C] and eax,11000000 cmp eax,1000000 jne short M02_L01 M02_L00: ret M02_L01: call dword ptr ds:[0C065A68]; System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task) jmp short M02_L00 ; Total bytes of code 26 ``` ```assembly ; System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.Net.Http.Tests.SocketsHttpHandlerPerfTest+d__10, MicroBenchmarks]](d__10 ByRef) push ebp mov ebp,esp push edi push esi push ebx sub esp,20 xor eax,eax mov [ebp-18],eax mov esi,ecx mov ebx,esi cmp [ebx],bl mov ecx,3B24E68 mov edx,2FE call CORINFO_HELP_GETSHARED_GCTHREADSTATIC_BASE mov eax,[eax+0C] test eax,eax je short M03_L04 M03_L00: mov edi,eax mov [ebp-24],edi mov ecx,[eax+4] mov [ebp-28],ecx mov eax,[eax+8] mov [ebp-2C],eax mov ecx,esi call dword ptr ds:[0C889DE0]; System.Net.Http.Tests.SocketsHttpHandlerPerfTest+d__10.MoveNext() mov eax,[ebp-2C] cmp eax,[edi+8] je short M03_L01 lea edx,[edi+8] call CORINFO_HELP_ASSIGN_REF_EAX M03_L01: mov ecx,[edi+4] mov edx,[ebp-28] cmp edx,ecx je short M03_L09 lea edx,[edi+4] mov eax,[ebp-28] call CORINFO_HELP_ASSIGN_REF_EAX test ecx,ecx je short M03_L02 cmp dword ptr [ecx+8],0 jne short M03_L03 M03_L02: test eax,eax je short M03_L09 cmp dword ptr [eax+8],0 je short M03_L09 M03_L03: mov edx,eax call dword ptr ds:[0C04F1C8] jmp short M03_L09 M03_L04: call dword ptr ds:[57571F8] jmp short M03_L00 mov eax,[ebp-2C] mov edi,[ebp-24] cmp eax,[edi+8] je short M03_L05 lea edx,[edi+8] call CORINFO_HELP_ASSIGN_REF_EAX M03_L05: mov ecx,[edi+4] mov edx,[ebp-28] cmp edx,ecx je short M03_L08 lea edx,[edi+4] mov eax,[ebp-28] call CORINFO_HELP_ASSIGN_REF_EAX test ecx,ecx je short M03_L06 cmp dword ptr [ecx+8],0 jne short M03_L07 M03_L06: test eax,eax je short M03_L08 cmp dword ptr [eax+8],0 je short M03_L08 M03_L07: mov edx,eax call dword ptr ds:[0C04F1C8] M03_L08: pop eax jmp eax M03_L09: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret ; Total bytes of code 221 ``` ```assembly ; System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task) push ebp mov ebp,esp push esi mov esi,ecx test dword ptr [esi+1C],1600000 jne short M04_L00 push 0 mov ecx,esi mov edx,0FFFFFFFF call dword ptr ds:[0AFC9AE0]; System.Threading.Tasks.Task.InternalWaitCore(Int32, System.Threading.CancellationToken) M04_L00: mov ecx,esi call dword ptr ds:[0AFC9270]; System.Threading.Tasks.Task.NotifyDebuggerOfWaitCompletionIfNecessary() mov ecx,[esi+1C] and ecx,1600000 cmp ecx,1000000 je short M04_L01 mov ecx,esi call dword ptr ds:[0C065A80]; System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task) M04_L01: pop esi pop ebp ret ; Total bytes of code 66 ``` ### Compare Jit Disasm ```assembly ; System.Net.Http.Tests.SocketsHttpHandlerPerfTest.Get() push ebp mov ebp,esp sub esp,20 vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-20],xmm4 vmovdqu xmmword ptr [ebp-10],xmm4 mov [ebp-20],ecx mov dword ptr [ebp-14],0FFFFFFFF lea ecx,[ebp-20] call dword ptr ds:[0BDBF468]; System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.Net.Http.Tests.SocketsHttpHandlerPerfTest+d__10, MicroBenchmarks]](d__10 ByRef) mov eax,[ebp-10] test eax,eax je short M00_L01 M00_L00: mov esp,ebp pop ebp ret M00_L01: lea ecx,[ebp-10] call dword ptr ds:[0B7497E0] jmp short M00_L00 ; Total bytes of code 61 ``` ```assembly ; System.Threading.Tasks.Task.GetAwaiter() mov eax,ecx ret ; Total bytes of code 3 ``` ```assembly ; System.Runtime.CompilerServices.TaskAwaiter.GetResult() mov ecx,[ecx] mov eax,[ecx+1C] and eax,11000000 cmp eax,1000000 jne short M02_L01 M02_L00: ret M02_L01: call dword ptr ds:[0B749A68]; System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task) jmp short M02_L00 ; Total bytes of code 26 ``` ```assembly ; System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.Net.Http.Tests.SocketsHttpHandlerPerfTest+d__10, MicroBenchmarks]](d__10 ByRef) push ebp mov ebp,esp push edi push esi push ebx sub esp,20 xor eax,eax mov [ebp-18],eax mov esi,ecx mov ebx,esi cmp [ebx],bl mov ecx,3154EA8 mov edx,2FF call CORINFO_HELP_GETSHARED_GCTHREADSTATIC_BASE mov eax,[eax+0C] test eax,eax je short M03_L04 M03_L00: mov edi,eax mov [ebp-24],edi mov ecx,[eax+4] mov [ebp-28],ecx mov eax,[eax+8] mov [ebp-2C],eax mov ecx,esi call dword ptr ds:[0BDBF1B0]; System.Net.Http.Tests.SocketsHttpHandlerPerfTest+d__10.MoveNext() mov eax,[ebp-2C] cmp eax,[edi+8] je short M03_L01 lea edx,[edi+8] call CORINFO_HELP_ASSIGN_REF_EAX M03_L01: mov ecx,[edi+4] mov edx,[ebp-28] cmp edx,ecx je short M03_L09 lea edx,[edi+4] mov eax,[ebp-28] call CORINFO_HELP_ASSIGN_REF_EAX test ecx,ecx je short M03_L02 cmp dword ptr [ecx+8],0 jne short M03_L03 M03_L02: test eax,eax je short M03_L09 cmp dword ptr [eax+8],0 je short M03_L09 M03_L03: mov edx,eax call dword ptr ds:[0B7431C8] jmp short M03_L09 M03_L04: call dword ptr ds:[7F971F8] jmp short M03_L00 mov eax,[ebp-2C] mov edi,[ebp-24] cmp eax,[edi+8] je short M03_L05 lea edx,[edi+8] call CORINFO_HELP_ASSIGN_REF_EAX M03_L05: mov ecx,[edi+4] mov edx,[ebp-28] cmp edx,ecx je short M03_L08 lea edx,[edi+4] mov eax,[ebp-28] call CORINFO_HELP_ASSIGN_REF_EAX test ecx,ecx je short M03_L06 cmp dword ptr [ecx+8],0 jne short M03_L07 M03_L06: test eax,eax je short M03_L08 cmp dword ptr [eax+8],0 je short M03_L08 M03_L07: mov edx,eax call dword ptr ds:[0B7431C8] M03_L08: pop eax jmp eax M03_L09: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret ; Total bytes of code 221 ``` ```assembly ; System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task) push ebp mov ebp,esp push esi mov esi,ecx test dword ptr [esi+1C],1600000 jne short M04_L00 push 0 mov ecx,esi mov edx,0FFFFFFFF call dword ptr ds:[0A6EDAE0]; System.Threading.Tasks.Task.InternalWaitCore(Int32, System.Threading.CancellationToken) M04_L00: mov ecx,esi call dword ptr ds:[0A6ED270]; System.Threading.Tasks.Task.NotifyDebuggerOfWaitCompletionIfNecessary() mov ecx,[esi+1C] and ecx,1600000 cmp ecx,1000000 je short M04_L01 mov ecx,esi call dword ptr ds:[0B749A80]; System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task) M04_L01: pop esi pop ebp ret ; Total bytes of code 66 ``` ### 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 x86
OS Windows 10.0.18362
Baseline 33b552f0c201d1763375c2016aa303fbe9280e02
Compare cbc8695ae0c8c2c2d1ac1fc4546d81e0967ef716
Diff Diff

Improvements in System.Collections.CopyTo<Int32>

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[Array - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Collections.CopyTo(Int32).Array(Size%3a%202048).html>) 188.15 ns 166.79 ns 0.89 0.23 False

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.Collections.CopyTo&lt;Int32&gt;*'
### Payloads [Baseline]() [Compare]() ### Histogram #### System.Collections.CopyTo<Int32>.Array(Size: 2048) ```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 166.79083515693895 < 178.9188530243108. IsChangePoint: Marked as a change because one of 1/5/2023 6:34:45 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 8.193591573489277 (T) = (0 -171.1898847071872) / Math.Sqrt((62.30202311491823 / (299)) + (100.91854229188051 / (38))) is greater than 1.967070609662329 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (38) - 2, .975) and 0.07493169379212557 = (185.0564802170605 - 171.1898847071872) / 185.0564802170605 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ``` ### 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)