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: 6 Improvements on 12/1/2022 11:48:13 PM #10402

Open performanceautofiler[bot] opened 1 year ago

performanceautofiler[bot] commented 1 year ago

Run Information

Architecture x86
OS Windows 10.0.18362
Baseline 776a87d9f0c9105c2729d1ab781d74bffa2a182b
Compare 9d7ffb5b0f9c56376460a0a45b90cb3ca90302ea
Diff Diff

Improvements in System.Tests.Perf_Version

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[Ctor4 - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Tests.Perf_Version.Ctor4.html>) 4.56 ns 2.34 ns 0.51 0.14 False 53.06795547188266 24.182862549032965 0.45569614156034194 Trace Trace
[Ctor2 - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Tests.Perf_Version.Ctor2.html>) 4.32 ns 2.44 ns 0.57 0.17 False Trace Trace
[Ctor3 - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Tests.Perf_Version.Ctor3.html>) 4.33 ns 2.44 ns 0.56 0.19 False 49.060245458939946 24.466950008543897 0.4987123439694376 Trace Trace

graph graph graph Test Report

Repro

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Tests.Perf_Version*'
### Payloads [Baseline]() [Compare]() ### Histogram #### System.Tests.Perf_Version.Ctor4 ```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 2.343783349755928 < 4.372057103480834. IsChangePoint: Marked as a change because one of 12/1/2022 7:29:59 PM, 12/6/2022 5:44:36 AM falls between 11/27/2022 4:37:47 PM and 12/6/2022 5:44:36 AM. IsImprovementStdDev: Marked as improvement because 122.20325111743873 (T) = (0 -2.440641600587696) / Math.Sqrt((0.07256096749328694 / (299)) + (0.001911794871882172 / (18))) is greater than 1.9675235316906419 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (18) - 2, .975) and 0.4832680633745648 = (4.723225772586319 - 2.440641600587696) / 4.723225772586319 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; System.Tests.Perf_Version.Ctor4() push esi mov ecx,offset MT_System.Version call CORINFO_HELP_NEWSFAST mov esi,eax push 2 push 3 push 4 mov ecx,esi mov edx,1 call dword ptr ds:[0AD67978]; System.Version..ctor(Int32, Int32, Int32, Int32) mov eax,esi pop esi ret ; Total bytes of code 36 ``` ```assembly ; System.Version..ctor(Int32, Int32, Int32, Int32) push ebp mov ebp,esp push edi push esi mov eax,[ebp+10] mov esi,[ebp+0C] mov edi,[ebp+8] test edx,edx jl short M01_L00 test eax,eax jl short M01_L01 test esi,esi jl near ptr M01_L02 test edi,edi jl near ptr M01_L03 mov [ecx+4],edx mov [ecx+8],eax mov [ecx+0C],esi mov [ecx+10],edi pop esi pop edi pop ebp ret 0C M01_L00: mov ecx,offset MT_System.ArgumentOutOfRangeException call CORINFO_HELP_NEWSFAST mov esi,eax mov ecx,14139 mov edx,7D4000 call CORINFO_HELP_STRCNS mov edi,eax call dword ptr ds:[87E93A8] push eax mov edx,edi mov ecx,esi call dword ptr ds:[8893558] mov ecx,esi call CORINFO_HELP_THROW M01_L01: mov ecx,offset MT_System.ArgumentOutOfRangeException call CORINFO_HELP_NEWSFAST mov esi,eax mov ecx,14145 mov edx,7D4000 call CORINFO_HELP_STRCNS mov edi,eax call dword ptr ds:[87E93A8] push eax mov edx,edi mov ecx,esi call dword ptr ds:[8893558] mov ecx,esi call CORINFO_HELP_THROW M01_L02: mov ecx,offset MT_System.ArgumentOutOfRangeException call CORINFO_HELP_NEWSFAST mov esi,eax mov ecx,14151 mov edx,7D4000 call CORINFO_HELP_STRCNS mov edi,eax call dword ptr ds:[87E93A8] push eax mov edx,edi mov ecx,esi call dword ptr ds:[8893558] mov ecx,esi call CORINFO_HELP_THROW M01_L03: mov ecx,offset MT_System.ArgumentOutOfRangeException call CORINFO_HELP_NEWSFAST mov esi,eax mov ecx,1415D mov edx,7D4000 call CORINFO_HELP_STRCNS mov edi,eax call dword ptr ds:[87E93A8] push eax mov edx,edi mov ecx,esi call dword ptr ds:[8893558] mov ecx,esi call CORINFO_HELP_THROW int 3 ; Total bytes of code 269 ``` ### Compare Jit Disasm ```assembly ; System.Tests.Perf_Version.Ctor4() mov ecx,offset MT_System.Version call CORINFO_HELP_NEWSFAST mov dword ptr [eax+4],1 mov dword ptr [eax+8],2 mov dword ptr [eax+0C],3 mov dword ptr [eax+10],4 ret ; Total bytes of code 39 ``` #### System.Tests.Perf_Version.Ctor2 ```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 2.4428930241466977 < 4.116066313587047. IsChangePoint: Marked as a change because one of 12/1/2022 7:29:59 PM, 12/6/2022 5:44:36 AM falls between 11/27/2022 4:37:47 PM and 12/6/2022 5:44:36 AM. IsImprovementStdDev: Marked as improvement because 41.900203429272025 (T) = (0 -2.451372544417188) / Math.Sqrt((0.09197243041840034 / (299)) + (0.044495719300577996 / (18))) is greater than 1.9675235316906419 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (18) - 2, .975) and 0.4740023867910131 = (4.660425224103099 - 2.451372544417188) / 4.660425224103099 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; System.Tests.Perf_Version.Ctor2() push esi mov ecx,offset MT_System.Version call CORINFO_HELP_NEWSFAST mov esi,eax push 2 mov ecx,esi mov edx,1 call dword ptr ds:[0A9179A8]; System.Version..ctor(Int32, Int32) mov eax,esi pop esi ret ; Total bytes of code 32 ``` ```assembly ; System.Version..ctor(Int32, Int32) push ebp mov ebp,esp push edi push esi mov eax,[ebp+8] test edx,edx jl short M01_L00 test eax,eax jl short M01_L01 mov [ecx+4],edx mov [ecx+8],eax mov dword ptr [ecx+0C],0FFFFFFFF mov dword ptr [ecx+10],0FFFFFFFF pop esi pop edi pop ebp ret 4 M01_L00: mov ecx,offset MT_System.ArgumentOutOfRangeException call CORINFO_HELP_NEWSFAST mov esi,eax mov ecx,14139 mov edx,2A34000 call CORINFO_HELP_STRCNS mov edi,eax call dword ptr ds:[83993A8] push eax mov edx,edi mov ecx,esi call dword ptr ds:[8443558] mov ecx,esi call CORINFO_HELP_THROW M01_L01: mov ecx,offset MT_System.ArgumentOutOfRangeException call CORINFO_HELP_NEWSFAST mov esi,eax mov ecx,14145 mov edx,2A34000 call CORINFO_HELP_STRCNS mov edi,eax call dword ptr ds:[83993A8] push eax mov edx,edi mov ecx,esi call dword ptr ds:[8443558] mov ecx,esi call CORINFO_HELP_THROW int 3 ; Total bytes of code 149 ``` ### Compare Jit Disasm ```assembly ; System.Tests.Perf_Version.Ctor2() mov ecx,offset MT_System.Version call CORINFO_HELP_NEWSFAST mov dword ptr [eax+4],1 mov dword ptr [eax+8],2 mov dword ptr [eax+0C],0FFFFFFFF mov dword ptr [eax+10],0FFFFFFFF ret ; Total bytes of code 39 ``` #### System.Tests.Perf_Version.Ctor3 ```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 2.4362619213946735 < 4.113985514874014. IsChangePoint: Marked as a change because one of 12/1/2022 7:29:59 PM, 12/6/2022 5:44:36 AM falls between 11/27/2022 4:37:47 PM and 12/6/2022 5:44:36 AM. IsImprovementStdDev: Marked as improvement because 105.49251935113445 (T) = (0 -2.3980783737180644) / Math.Sqrt((0.06393238380924943 / (299)) + (0.0036769646151550853 / (18))) is greater than 1.9675235316906419 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (18) - 2, .975) and 0.4735430216630219 = (4.555126956989611 - 2.3980783737180644) / 4.555126956989611 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; System.Tests.Perf_Version.Ctor3() push esi mov ecx,offset MT_System.Version call CORINFO_HELP_NEWSFAST mov esi,eax push 2 push 3 mov ecx,esi mov edx,1 call dword ptr ds:[0B077990]; System.Version..ctor(Int32, Int32, Int32) mov eax,esi pop esi ret ; Total bytes of code 34 ``` ```assembly ; System.Version..ctor(Int32, Int32, Int32) push ebp mov ebp,esp push edi push esi mov eax,[ebp+0C] mov esi,[ebp+8] test edx,edx jl short M01_L00 test eax,eax jl short M01_L01 test esi,esi jl near ptr M01_L02 mov [ecx+4],edx mov [ecx+8],eax mov [ecx+0C],esi mov dword ptr [ecx+10],0FFFFFFFF pop esi pop edi pop ebp ret 8 M01_L00: mov ecx,offset MT_System.ArgumentOutOfRangeException call CORINFO_HELP_NEWSFAST mov esi,eax mov ecx,14139 mov edx,2BD4000 call CORINFO_HELP_STRCNS mov edi,eax call dword ptr ds:[8AF93A8] push eax mov edx,edi mov ecx,esi call dword ptr ds:[8BA3558] mov ecx,esi call CORINFO_HELP_THROW M01_L01: mov ecx,offset MT_System.ArgumentOutOfRangeException call CORINFO_HELP_NEWSFAST mov esi,eax mov ecx,14145 mov edx,2BD4000 call CORINFO_HELP_STRCNS mov edi,eax call dword ptr ds:[8AF93A8] push eax mov edx,edi mov ecx,esi call dword ptr ds:[8BA3558] mov ecx,esi call CORINFO_HELP_THROW M01_L02: mov ecx,offset MT_System.ArgumentOutOfRangeException call CORINFO_HELP_NEWSFAST mov esi,eax mov ecx,14151 mov edx,2BD4000 call CORINFO_HELP_STRCNS mov edi,eax call dword ptr ds:[8AF93A8] push eax mov edx,edi mov ecx,esi call dword ptr ds:[8BA3558] mov ecx,esi call CORINFO_HELP_THROW int 3 ; Total bytes of code 209 ``` ### Compare Jit Disasm ```assembly ; System.Tests.Perf_Version.Ctor3() mov ecx,offset MT_System.Version call CORINFO_HELP_NEWSFAST mov dword ptr [eax+4],1 mov dword ptr [eax+8],2 mov dword ptr [eax+0C],3 mov dword ptr [eax+10],0FFFFFFFF ret ; Total bytes of code 39 ``` ### 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 776a87d9f0c9105c2729d1ab781d74bffa2a182b
Compare 9d7ffb5b0f9c56376460a0a45b90cb3ca90302ea
Diff Diff

Improvements in System.Tests.Perf_String

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[PadLeft - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Tests.Perf_String.PadLeft(n%3a%2018).html>) 13.07 ns 10.92 ns 0.84 0.11 False 136.95978095654047 127.09806002328092 0.9279954971862227 Trace Trace

graph Test Report

Repro

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Tests.Perf_String*'
### Payloads [Baseline]() [Compare]() ### Histogram #### System.Tests.Perf_String.PadLeft(n: 18) ```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.923995027288633 < 12.38144129231539. IsChangePoint: Marked as a change because one of 11/16/2022 11:42:33 AM, 12/1/2022 7:29:59 PM, 12/6/2022 5:44:36 AM falls between 11/27/2022 4:37:47 PM and 12/6/2022 5:44:36 AM. IsImprovementStdDev: Marked as improvement because 20.25328787273161 (T) = (0 -11.36991095169332) / Math.Sqrt((0.2396679120744573 / (299)) + (0.05770117576355244 / (18))) is greater than 1.9675235316906419 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (18) - 2, .975) and 0.10133428035095683 = (12.651991394679685 - 11.36991095169332) / 12.651991394679685 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; System.Tests.Perf_String.PadLeft(Int32) push 20 mov ecx,8897644 call dword ptr ds:[8873390]; System.String.PadLeft(Int32, Char) ret ; Total bytes of code 14 ``` ```assembly ; System.String.PadLeft(Int32, Char) push ebp mov ebp,esp push edi push esi push ebx push eax mov esi,ecx test edx,edx jl short M01_L00 mov edi,[esi+4] mov ebx,edx sub ebx,edi test ebx,ebx jle short M01_L01 mov ecx,edx call System.String.FastAllocateString(Int32) mov [ebp-10],eax cmp [eax],al lea ecx,[eax+8] movzx edx,word ptr [ebp+8] push edx mov edx,ebx call dword ptr ds:[0B971E40]; System.SpanHelpers.Fill[[System.Char, System.Private.CoreLib]](Char ByRef, UIntPtr, Char) mov eax,[ebp-10] lea ecx,[eax+ebx*2+8] lea edx,[esi+8] add edi,edi push edi call dword ptr ds:[8E71918]; System.Buffer.Memmove(Byte ByRef, Byte ByRef, UIntPtr) mov eax,[ebp-10] pop ecx pop ebx pop esi pop edi pop ebp ret 4 M01_L00: mov ecx,offset MT_System.ArgumentOutOfRangeException call CORINFO_HELP_NEWSFAST mov esi,eax mov ecx,1699 mov edx,3AD4000 call CORINFO_HELP_STRCNS mov edi,eax call dword ptr ds:[8E69120] push eax mov edx,edi mov ecx,esi call dword ptr ds:[8F13558] mov ecx,esi call CORINFO_HELP_THROW M01_L01: mov eax,esi pop ecx pop ebx pop esi pop edi pop ebp ret 4 ; Total bytes of code 145 ``` ### Compare Jit Disasm ```assembly ; System.Tests.Perf_String.PadLeft(Int32) push ebp mov ebp,esp push edi push esi push ebx mov esi,edx test esi,esi jl short M00_L02 lea edi,[esi-1] test edi,edi jg short M00_L00 mov eax,8107670 jmp short M00_L01 M00_L00: mov ecx,esi call System.String.FastAllocateString(Int32) mov ebx,eax cmp [ebx],bl lea ecx,[ebx+8] push 20 mov edx,edi call dword ptr ds:[0B1F14E0]; System.SpanHelpers.Fill[[System.Char, System.Private.CoreLib]](Char ByRef, UIntPtr, Char) lea ecx,[ebx+edi*2+8] mov edx,8107670 add edx,8 push 2 call dword ptr ds:[86E1750]; System.Buffer.Memmove(Byte ByRef, Byte ByRef, UIntPtr) mov eax,ebx M00_L01: pop ebx pop esi pop edi pop ebp ret M00_L02: mov ecx,1683 mov edx,28D4000 call CORINFO_HELP_STRCNS mov ecx,eax mov edx,esi call dword ptr ds:[8777420] int 3 ; Total bytes of code 103 ``` ```assembly ; System.SpanHelpers.Fill[[System.Char, System.Private.CoreLib]](Char ByRef, UIntPtr, Char) push ebp mov ebp,esp push edi push esi vzeroupper mov eax,[ebp+8] cmp edx,10 jb short M01_L03 movzx eax,ax vmovd xmm0,eax vpbroadcastw ymm0,xmm0 lea eax,[edx+edx] mov esi,eax and esi,0FFFFFFC0 xor edi,edi cmp edx,20 jb short M01_L01 M01_L00: vmovupd [ecx+edi],ymm0 vmovupd [ecx+edi+20],ymm0 add edi,40 cmp edi,esi jb short M01_L00 M01_L01: test al,20 je short M01_L02 vmovupd [ecx+edi],ymm0 M01_L02: vmovupd [ecx+eax-20],ymm0 vzeroupper pop esi pop edi pop ebp ret 4 M01_L03: xor esi,esi cmp edx,8 jb short M01_L05 mov edi,edx and edi,0FFFFFFF8 M01_L04: mov [ecx+esi*2],ax mov [ecx+esi*2+2],ax mov [ecx+esi*2+4],ax mov [ecx+esi*2+6],ax mov [ecx+esi*2+8],ax mov [ecx+esi*2+0A],ax mov [ecx+esi*2+0C],ax mov [ecx+esi*2+0E],ax add esi,8 cmp esi,edi jb short M01_L04 M01_L05: test dl,4 je short M01_L06 mov [ecx+esi*2],ax mov [ecx+esi*2+2],ax mov [ecx+esi*2+4],ax mov [ecx+esi*2+6],ax add esi,4 M01_L06: test dl,2 je short M01_L07 mov [ecx+esi*2],ax mov [ecx+esi*2+2],ax add esi,2 M01_L07: test dl,1 je short M01_L08 mov [ecx+esi*2],ax M01_L08: vzeroupper pop esi pop edi pop ebp ret 4 ; Total bytes of code 205 ``` ```assembly ; System.Buffer.Memmove(Byte ByRef, Byte ByRef, UIntPtr) push ebp mov ebp,esp push edi push esi push ebx vzeroupper mov eax,[ebp+8] mov esi,ecx sub esi,edx cmp esi,eax jb near ptr M02_L08 mov esi,edx sub esi,ecx cmp esi,eax jb near ptr M02_L08 lea esi,[edx+eax] lea edi,[ecx+eax] cmp eax,10 jbe short M02_L02 cmp eax,40 ja near ptr M02_L06 M02_L00: vmovupd xmm0,[edx] vmovupd [ecx],xmm0 cmp eax,20 jbe short M02_L01 vmovupd xmm0,[edx+10] vmovupd [ecx+10],xmm0 cmp eax,30 jbe short M02_L01 vmovupd xmm0,[edx+20] vmovupd [ecx+20],xmm0 M02_L01: vmovupd xmm0,[esi-10] vmovupd [edi-10],xmm0 jmp near ptr M02_L10 nop nop M02_L02: test al,18 je short M02_L04 mov eax,[edx] mov [ecx],eax mov edx,[edx+4] mov [ecx+4],edx mov ecx,[esi-8] mov [edi-8],ecx M02_L03: mov ecx,[esi-4] mov [edi-4],ecx jmp short M02_L10 M02_L04: test al,4 je short M02_L05 mov eax,[edx] mov [ecx],eax jmp short M02_L03 M02_L05: test eax,eax je short M02_L10 movzx edx,byte ptr [edx] mov [ecx],dl test al,2 je short M02_L10 movsx eax,word ptr [esi-2] mov [edi-2],ax jmp short M02_L10 M02_L06: cmp eax,800 ja short M02_L09 mov ebx,eax shr ebx,6 M02_L07: vmovdqu ymm0,ymmword ptr [edx] vmovdqu ymmword ptr [ecx],ymm0 vmovdqu ymm0,ymmword ptr [edx+20] vmovdqu ymmword ptr [ecx+20],ymm0 add ecx,40 add edx,40 dec ebx jne short M02_L07 and eax,3F cmp eax,10 ja near ptr M02_L00 jmp near ptr M02_L01 M02_L08: cmp ecx,edx je short M02_L10 M02_L09: push eax call dword ptr ds:[86E1768] M02_L10: pop ebx pop esi pop edi pop ebp ret 4 ; Total bytes of code 254 ``` ### 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 776a87d9f0c9105c2729d1ab781d74bffa2a182b
Compare 9d7ffb5b0f9c56376460a0a45b90cb3ca90302ea
Diff Diff

Improvements in System.Linq.Tests.Perf_Enumerable

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[SingleWithPredicate_FirstElementMatches - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Linq.Tests.Perf_Enumerable.SingleWithPredicate_FirstElementMatches(input%3a%20IEnumerable).html>) 716.57 ns 617.61 ns 0.86 0.05 False Trace Trace
[WhereAny_LastElementMatches - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Linq.Tests.Perf_Enumerable.WhereAny_LastElementMatches(input%3a%20IEnumerable).html>) 777.37 ns 719.44 ns 0.93 0.03 False 4576.131687242798 4417.872454448017 0.9654163726896298 Trace Trace

graph graph Test Report

Repro

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Linq.Tests.Perf_Enumerable*'
### Payloads [Baseline]() [Compare]() ### Histogram #### System.Linq.Tests.Perf_Enumerable.SingleWithPredicate_FirstElementMatches(input: IEnumerable) ```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 617.6051007856519 < 677.3835042882206. IsChangePoint: Marked as a change because one of 10/6/2022 2:13:23 PM, 10/17/2022 3:19:47 PM, 10/25/2022 12:27:43 PM, 12/1/2022 7:29:59 PM, 12/6/2022 5:44:36 AM falls between 11/27/2022 4:37:47 PM and 12/6/2022 5:44:36 AM. IsImprovementStdDev: Marked as improvement because 16.803055258280562 (T) = (0 -650.8637418419667) / Math.Sqrt((1227.2866430825634 / (299)) + (70.11793006532541 / (18))) is greater than 1.9675235316906419 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (18) - 2, .975) and 0.06805142745951247 = (698.39019128246 - 650.8637418419667) / 698.39019128246 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; System.Linq.Tests.Perf_Enumerable.SingleWithPredicate_FirstElementMatches(System.Linq.Tests.LinqTestData) push ebp mov ebp,esp push esi push eax mov esi,[edx+4] mov edx,ds:[7094910] test edx,edx jne short M00_L00 mov ecx,offset MT_System.Func`2[[System.Int32, System.Private.CoreLib],[System.Boolean, System.Private.CoreLib]] call CORINFO_HELP_NEWSFAST mov ecx,ds:[70948D4] test ecx,ecx je short M00_L01 lea edx,[eax+4] call CORINFO_HELP_ASSIGN_REF_ECX mov dword ptr [eax+0C],0B414420 mov edx,7094910 call CORINFO_HELP_ASSIGN_REF_EAX mov edx,eax M00_L00: lea ecx,[ebp-8] push ecx mov ecx,esi call dword ptr ds:[0B415570]; System.Linq.Enumerable.TryGetSingle[[System.Int32, System.Private.CoreLib]](System.Collections.Generic.IEnumerable`1, System.Func`2, Boolean ByRef) cmp byte ptr [ebp-8],0 je short M00_L02 pop ecx pop esi pop ebp ret M00_L01: call dword ptr ds:[4EBB630] int 3 M00_L02: call dword ptr ds:[0AA13810] int 3 ; Total bytes of code 101 ``` ```assembly ; System.Linq.Enumerable.TryGetSingle[[System.Int32, System.Private.CoreLib]](System.Collections.Generic.IEnumerable`1, System.Func`2, Boolean ByRef) push ebp mov ebp,esp push edi push esi push ebx sub esp,20 xor eax,eax mov [ebp-2C],eax mov [ebp-18],eax mov esi,edx mov edi,[ebp+8] test ecx,ecx je near ptr M01_L11 test esi,esi je near ptr M01_L12 call dword ptr ds:[30202AC] mov ebx,eax mov [ebp-2C],ebx mov ecx,ebx call dword ptr ds:[30202B0] test eax,eax je short M01_L05 M01_L00: mov ecx,ebx call dword ptr ds:[30202B4] mov [ebp-24],eax mov ecx,[esi+4] mov edx,eax call dword ptr [esi+0C] test eax,eax jne short M01_L01 mov ecx,ebx call dword ptr ds:[30202B0] test eax,eax jne short M01_L00 jmp short M01_L05 M01_L01: mov ecx,ebx call dword ptr ds:[30202B8] test eax,eax je short M01_L03 M01_L02: mov ecx,ebx call dword ptr ds:[30202BC] mov edx,eax mov ecx,[esi+4] call dword ptr [esi+0C] test eax,eax jne short M01_L04 mov ecx,ebx call dword ptr ds:[30202B8] test eax,eax jne short M01_L02 M01_L03: mov byte ptr [edi],1 mov edi,[ebp-24] mov [ebp-28],edi mov dword ptr [ebp-1C],0 mov dword ptr [ebp-18],0FC push offset M01_L06 jmp short M01_L07 M01_L04: call dword ptr ds:[0AA137E0] int 3 M01_L05: mov ecx,ebx call dword ptr ds:[30202C0] jmp short M01_L09 M01_L06: mov dword ptr [ebp-18],0 jmp short M01_L10 M01_L07: mov ebx,[ebp-2C] test ebx,ebx je short M01_L08 mov ecx,ebx call dword ptr ds:[30202C0] M01_L08: pop eax jmp eax M01_L09: mov byte ptr [edi],0 xor eax,eax lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret 4 M01_L10: mov eax,[ebp-28] lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret 4 M01_L11: mov ecx,10 call dword ptr ds:[0AA13798] int 3 M01_L12: mov ecx,0C call dword ptr ds:[0AA13798] int 3 ; Total bytes of code 268 ``` ### Compare Jit Disasm ```assembly ; System.Linq.Tests.Perf_Enumerable.SingleWithPredicate_FirstElementMatches(System.Linq.Tests.LinqTestData) push ebp mov ebp,esp push esi push eax mov esi,[edx+4] mov edx,ds:[71B4910] test edx,edx jne short M00_L00 mov ecx,offset MT_System.Func`2[[System.Int32, System.Private.CoreLib],[System.Boolean, System.Private.CoreLib]] call CORINFO_HELP_NEWSFAST mov ecx,ds:[71B48D4] test ecx,ecx je short M00_L01 lea edx,[eax+4] call CORINFO_HELP_ASSIGN_REF_ECX mov dword ptr [eax+0C],0B602A98 mov edx,71B4910 call CORINFO_HELP_ASSIGN_REF_EAX mov edx,eax M00_L00: lea ecx,[ebp-8] push ecx mov ecx,esi call dword ptr ds:[0B603BE8]; System.Linq.Enumerable.TryGetSingle[[System.Int32, System.Private.CoreLib]](System.Collections.Generic.IEnumerable`1, System.Func`2, Boolean ByRef) cmp byte ptr [ebp-8],0 je short M00_L02 pop ecx pop esi pop ebp ret M00_L01: call dword ptr ds:[845B630] int 3 M00_L02: call dword ptr ds:[0AC03810] int 3 ; Total bytes of code 101 ``` ```assembly ; System.Linq.Enumerable.TryGetSingle[[System.Int32, System.Private.CoreLib]](System.Collections.Generic.IEnumerable`1, System.Func`2, Boolean ByRef) push ebp mov ebp,esp push edi push esi push ebx sub esp,20 xor eax,eax mov [ebp-2C],eax mov [ebp-18],eax mov esi,edx mov edi,[ebp+8] test ecx,ecx je near ptr M01_L11 test esi,esi je near ptr M01_L12 call dword ptr ds:[4EC02B0] mov ebx,eax mov [ebp-2C],ebx mov ecx,ebx call dword ptr ds:[4EC02B4] test eax,eax je short M01_L05 M01_L00: mov ecx,ebx call dword ptr ds:[4EC02B8] mov [ebp-24],eax mov ecx,[esi+4] mov edx,eax call dword ptr [esi+0C] test eax,eax jne short M01_L01 mov ecx,ebx call dword ptr ds:[4EC02B4] test eax,eax jne short M01_L00 jmp short M01_L05 M01_L01: mov ecx,ebx call dword ptr ds:[4EC02BC] test eax,eax je short M01_L03 M01_L02: mov ecx,ebx call dword ptr ds:[4EC02C0] mov edx,eax mov ecx,[esi+4] call dword ptr [esi+0C] test eax,eax jne short M01_L04 mov ecx,ebx call dword ptr ds:[4EC02BC] test eax,eax jne short M01_L02 M01_L03: mov byte ptr [edi],1 mov edi,[ebp-24] mov [ebp-28],edi mov dword ptr [ebp-1C],0 mov dword ptr [ebp-18],0FC push offset M01_L06 jmp short M01_L07 M01_L04: call dword ptr ds:[0AC037E0] int 3 M01_L05: mov ecx,ebx call dword ptr ds:[4EC02C4] jmp short M01_L09 M01_L06: mov dword ptr [ebp-18],0 jmp short M01_L10 M01_L07: mov ebx,[ebp-2C] test ebx,ebx je short M01_L08 mov ecx,ebx call dword ptr ds:[4EC02C4] M01_L08: pop eax jmp eax M01_L09: mov byte ptr [edi],0 xor eax,eax lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret 4 M01_L10: mov eax,[ebp-28] lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret 4 M01_L11: mov ecx,10 call dword ptr ds:[0AC03798] int 3 M01_L12: mov ecx,0C call dword ptr ds:[0AC03798] int 3 ; Total bytes of code 268 ``` #### System.Linq.Tests.Perf_Enumerable.WhereAny_LastElementMatches(input: IEnumerable) ```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 719.4418526165329 < 735.3767481090609. IsChangePoint: Marked as a change because one of 9/23/2022 1:16:35 AM, 10/3/2022 4:48:37 PM, 10/10/2022 3:36:43 PM, 11/2/2022 4:14:20 AM, 11/11/2022 5:53:56 PM, 12/1/2022 7:29:59 PM, 12/6/2022 5:44:36 AM falls between 11/27/2022 4:37:47 PM and 12/6/2022 5:44:36 AM. IsImprovementStdDev: Marked as improvement because 25.532368879302116 (T) = (0 -717.8419405010395) / Math.Sqrt((825.993004008417 / (299)) + (4.026667327625396 / (18))) is greater than 1.9675235316906419 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (18) - 2, .975) and 0.05790524752496672 = (761.9636332918257 - 717.8419405010395) / 761.9636332918257 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; System.Linq.Tests.Perf_Enumerable.WhereAny_LastElementMatches(System.Linq.Tests.LinqTestData) push ebp mov ebp,esp push esi push eax mov esi,[edx+4] mov edx,ds:[78348F8] test edx,edx jne short M00_L00 mov ecx,offset MT_System.Func`2[[System.Int32, System.Private.CoreLib],[System.Boolean, System.Private.CoreLib]] call CORINFO_HELP_NEWSFAST mov ecx,ds:[78348D4] test ecx,ecx je short M00_L03 lea edx,[eax+4] call CORINFO_HELP_ASSIGN_REF_ECX mov dword ptr [eax+0C],0BBA4390 mov edx,78348F8 call CORINFO_HELP_ASSIGN_REF_EAX mov edx,eax M00_L00: mov ecx,esi call dword ptr ds:[0BBA5558]; System.Linq.Enumerable.Where[[System.Int32, System.Private.CoreLib]](System.Collections.Generic.IEnumerable`1, System.Func`2) mov esi,eax lea edx,[ebp-8] mov ecx,esi call dword ptr ds:[0BBA57E0]; System.Linq.Enumerable.TryGetNonEnumeratedCount[[System.Int32, System.Private.CoreLib]](System.Collections.Generic.IEnumerable`1, Int32 ByRef) test eax,eax jne short M00_L01 mov ecx,esi call dword ptr ds:[0BBA5810]; System.Linq.Enumerable.g__WithEnumerator|35_0[[System.Int32, System.Private.CoreLib]](System.Collections.Generic.IEnumerable`1) jmp short M00_L02 M00_L01: xor eax,eax cmp dword ptr [ebp-8],0 setne al M00_L02: pop ecx pop esi pop ebp ret M00_L03: call dword ptr ds:[8A4B630] int 3 ; Total bytes of code 120 ``` ```assembly ; System.Linq.Enumerable.Where[[System.Int32, System.Private.CoreLib]](System.Collections.Generic.IEnumerable`1, System.Func`2) push ebp mov ebp,esp push edi push esi push ebx mov esi,ecx mov edi,edx test esi,esi je near ptr M01_L05 test edi,edi je near ptr M01_L06 mov edx,esi mov ecx,offset MT_System.Linq.Enumerable+Iterator`1[[System.Int32, System.Private.CoreLib]] call dword ptr ds:[8A4B828]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfClass(Void*, System.Object) test eax,eax je short M01_L00 mov ecx,eax mov edx,edi mov eax,[eax] mov eax,[eax+2C] call dword ptr [eax+8] jmp near ptr M01_L04 M01_L00: mov edx,esi mov ecx,offset MT_System.Int32[] call dword ptr ds:[8A4B7F8]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfAny(Void*, System.Object) mov ebx,eax test ebx,ebx je short M01_L02 cmp dword ptr [ebx+4],0 je short M01_L01 mov ecx,offset MT_System.Linq.Enumerable+WhereArrayIterator`1[[System.Int32, System.Private.CoreLib]] call CORINFO_HELP_NEWSFAST mov esi,eax call CORINFO_HELP_GETCURRENTMANAGEDTHREADID mov [esi+4],eax lea edx,[esi+10] call CORINFO_HELP_ASSIGN_REF_EBX lea edx,[esi+14] call CORINFO_HELP_ASSIGN_REF_EDI mov eax,esi jmp short M01_L04 M01_L01: mov ecx,0AC5E0E0 mov edx,4 call CORINFO_HELP_CLASSINIT_SHARED_DYNAMICCLASS mov eax,ds:[7834E60] jmp short M01_L04 M01_L02: mov edx,esi mov ecx,offset MT_System.Collections.Generic.List`1[[System.Int32, System.Private.CoreLib]] call dword ptr ds:[8A4B828]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfClass(Void*, System.Object) mov ebx,eax test ebx,ebx je short M01_L03 mov ecx,offset MT_System.Linq.Enumerable+WhereListIterator`1[[System.Int32, System.Private.CoreLib]] call CORINFO_HELP_NEWSFAST mov esi,eax call CORINFO_HELP_GETCURRENTMANAGEDTHREADID mov [esi+4],eax lea edx,[esi+10] call CORINFO_HELP_ASSIGN_REF_EBX lea edx,[esi+14] call CORINFO_HELP_ASSIGN_REF_EDI mov eax,esi jmp short M01_L04 M01_L03: mov ecx,offset MT_System.Linq.Enumerable+WhereEnumerableIterator`1[[System.Int32, System.Private.CoreLib]] call CORINFO_HELP_NEWSFAST mov ebx,eax call CORINFO_HELP_GETCURRENTMANAGEDTHREADID mov [ebx+4],eax lea edx,[ebx+10] call CORINFO_HELP_ASSIGN_REF_ESI lea edx,[ebx+14] call CORINFO_HELP_ASSIGN_REF_EDI mov eax,ebx M01_L04: pop ebx pop esi pop edi pop ebp ret M01_L05: mov ecx,10 call dword ptr ds:[0B1A3798] int 3 M01_L06: mov ecx,0C call dword ptr ds:[0B1A3798] int 3 ; Total bytes of code 273 ``` ```assembly ; System.Linq.Enumerable.TryGetNonEnumeratedCount[[System.Int32, System.Private.CoreLib]](System.Collections.Generic.IEnumerable`1, Int32 ByRef) push ebp mov ebp,esp push edi push esi mov esi,ecx mov edi,edx test esi,esi je near ptr M02_L03 mov edx,esi mov ecx,offset MT_System.Collections.Generic.ICollection`1[[System.Int32, System.Private.CoreLib]] call dword ptr ds:[8A4B810]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfInterface(Void*, System.Object) test eax,eax je short M02_L00 mov ecx,eax call dword ptr ds:[3BB0320] mov [edi],eax mov eax,1 pop esi pop edi pop ebp ret M02_L00: mov edx,esi mov ecx,offset MT_System.Linq.IIListProvider`1[[System.Int32, System.Private.CoreLib]] call dword ptr ds:[8A4B810]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfInterface(Void*, System.Object) test eax,eax je short M02_L01 mov ecx,eax mov edx,1 call dword ptr ds:[3BB031C] test eax,eax jl short M02_L01 mov [edi],eax mov eax,1 pop esi pop edi pop ebp ret M02_L01: mov edx,esi mov ecx,offset MT_System.Collections.ICollection call dword ptr ds:[8A4B810]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfInterface(Void*, System.Object) test eax,eax je short M02_L02 mov ecx,eax call dword ptr ds:[3BB0318] mov [edi],eax mov eax,1 pop esi pop edi pop ebp ret M02_L02: xor eax,eax mov [edi],eax pop esi pop edi pop ebp ret M02_L03: mov ecx,10 call dword ptr ds:[0B1A3798] int 3 ; Total bytes of code 154 ``` ```assembly ; System.Linq.Enumerable.g__WithEnumerator|35_0[[System.Int32, System.Private.CoreLib]](System.Collections.Generic.IEnumerable`1) push ebp mov ebp,esp push ebx sub esp,18 xor eax,eax mov [ebp-10],eax call dword ptr ds:[3BB0324] mov [ebp-1C],eax mov ecx,eax call dword ptr ds:[3BB0328] mov ebx,eax mov ecx,[ebp-1C] call dword ptr ds:[3BB032C] jmp short M03_L01 cmp dword ptr [ebp-1C],0 je short M03_L00 mov ecx,[ebp-1C] call dword ptr ds:[3BB032C] M03_L00: pop eax jmp eax M03_L01: mov eax,ebx lea esp,[ebp-4] pop ebx pop ebp ret ; Total bytes of code 68 ``` ### Compare Jit Disasm ```assembly ; System.Linq.Tests.Perf_Enumerable.WhereAny_LastElementMatches(System.Linq.Tests.LinqTestData) push ebp mov ebp,esp push esi push eax mov esi,[edx+4] mov edx,ds:[70D48F8] test edx,edx jne short M00_L00 mov ecx,offset MT_System.Func`2[[System.Int32, System.Private.CoreLib],[System.Boolean, System.Private.CoreLib]] call CORINFO_HELP_NEWSFAST mov ecx,ds:[70D48D4] test ecx,ecx je short M00_L03 lea edx,[eax+4] call CORINFO_HELP_ASSIGN_REF_ECX mov dword ptr [eax+0C],0B512A08 mov edx,70D48F8 call CORINFO_HELP_ASSIGN_REF_EAX mov edx,eax M00_L00: mov ecx,esi call dword ptr ds:[0B513BD0]; System.Linq.Enumerable.Where[[System.Int32, System.Private.CoreLib]](System.Collections.Generic.IEnumerable`1, System.Func`2) mov esi,eax lea edx,[ebp-8] mov ecx,esi call dword ptr ds:[0B513E58]; System.Linq.Enumerable.TryGetNonEnumeratedCount[[System.Int32, System.Private.CoreLib]](System.Collections.Generic.IEnumerable`1, Int32 ByRef) test eax,eax jne short M00_L01 mov ecx,esi call dword ptr ds:[0B513E88]; System.Linq.Enumerable.g__WithEnumerator|35_0[[System.Int32, System.Private.CoreLib]](System.Collections.Generic.IEnumerable`1) jmp short M00_L02 M00_L01: xor eax,eax cmp dword ptr [ebp-8],0 setne al M00_L02: pop ecx pop esi pop ebp ret M00_L03: call dword ptr ds:[83DB630] int 3 ; Total bytes of code 120 ``` ```assembly ; System.Linq.Enumerable.Where[[System.Int32, System.Private.CoreLib]](System.Collections.Generic.IEnumerable`1, System.Func`2) push ebp mov ebp,esp push edi push esi push ebx mov esi,ecx mov edi,edx test esi,esi je near ptr M01_L05 test edi,edi je near ptr M01_L06 mov edx,esi mov ecx,offset MT_System.Linq.Enumerable+Iterator`1[[System.Int32, System.Private.CoreLib]] call dword ptr ds:[83DB828]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfClass(Void*, System.Object) test eax,eax je short M01_L00 mov ecx,eax mov edx,edi mov eax,[eax] mov eax,[eax+2C] call dword ptr [eax+8] jmp near ptr M01_L04 M01_L00: mov edx,esi mov ecx,offset MT_System.Int32[] call dword ptr ds:[83DB7F8]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfAny(Void*, System.Object) mov ebx,eax test ebx,ebx je short M01_L02 cmp dword ptr [ebx+4],0 je short M01_L01 mov ecx,offset MT_System.Linq.Enumerable+WhereArrayIterator`1[[System.Int32, System.Private.CoreLib]] call CORINFO_HELP_NEWSFAST mov esi,eax call CORINFO_HELP_GETCURRENTMANAGEDTHREADID mov [esi+4],eax lea edx,[esi+10] call CORINFO_HELP_ASSIGN_REF_EBX lea edx,[esi+14] call CORINFO_HELP_ASSIGN_REF_EDI mov eax,esi jmp short M01_L04 M01_L01: mov ecx,0A5CFD08 mov edx,4 call CORINFO_HELP_CLASSINIT_SHARED_DYNAMICCLASS mov eax,ds:[70D4E68] jmp short M01_L04 M01_L02: mov edx,esi mov ecx,offset MT_System.Collections.Generic.List`1[[System.Int32, System.Private.CoreLib]] call dword ptr ds:[83DB828]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfClass(Void*, System.Object) mov ebx,eax test ebx,ebx je short M01_L03 mov ecx,offset MT_System.Linq.Enumerable+WhereListIterator`1[[System.Int32, System.Private.CoreLib]] call CORINFO_HELP_NEWSFAST mov esi,eax call CORINFO_HELP_GETCURRENTMANAGEDTHREADID mov [esi+4],eax lea edx,[esi+10] call CORINFO_HELP_ASSIGN_REF_EBX lea edx,[esi+14] call CORINFO_HELP_ASSIGN_REF_EDI mov eax,esi jmp short M01_L04 M01_L03: mov ecx,offset MT_System.Linq.Enumerable+WhereEnumerableIterator`1[[System.Int32, System.Private.CoreLib]] call CORINFO_HELP_NEWSFAST mov ebx,eax call CORINFO_HELP_GETCURRENTMANAGEDTHREADID mov [ebx+4],eax lea edx,[ebx+10] call CORINFO_HELP_ASSIGN_REF_ESI lea edx,[ebx+14] call CORINFO_HELP_ASSIGN_REF_EDI mov eax,ebx M01_L04: pop ebx pop esi pop edi pop ebp ret M01_L05: mov ecx,10 call dword ptr ds:[0AB13798] int 3 M01_L06: mov ecx,0C call dword ptr ds:[0AB13798] int 3 ; Total bytes of code 273 ``` ```assembly ; System.Linq.Enumerable.TryGetNonEnumeratedCount[[System.Int32, System.Private.CoreLib]](System.Collections.Generic.IEnumerable`1, Int32 ByRef) push ebp mov ebp,esp push edi push esi mov esi,ecx mov edi,edx test esi,esi je near ptr M02_L03 mov edx,esi mov ecx,offset MT_System.Collections.Generic.ICollection`1[[System.Int32, System.Private.CoreLib]] call dword ptr ds:[83DB810]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfInterface(Void*, System.Object) test eax,eax je short M02_L00 mov ecx,eax call dword ptr ds:[3510324] mov [edi],eax mov eax,1 pop esi pop edi pop ebp ret M02_L00: mov edx,esi mov ecx,offset MT_System.Linq.IIListProvider`1[[System.Int32, System.Private.CoreLib]] call dword ptr ds:[83DB810]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfInterface(Void*, System.Object) test eax,eax je short M02_L01 mov ecx,eax mov edx,1 call dword ptr ds:[3510320] test eax,eax jl short M02_L01 mov [edi],eax mov eax,1 pop esi pop edi pop ebp ret M02_L01: mov edx,esi mov ecx,offset MT_System.Collections.ICollection call dword ptr ds:[83DB810]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfInterface(Void*, System.Object) test eax,eax je short M02_L02 mov ecx,eax call dword ptr ds:[351031C] mov [edi],eax mov eax,1 pop esi pop edi pop ebp ret M02_L02: xor eax,eax mov [edi],eax pop esi pop edi pop ebp ret M02_L03: mov ecx,10 call dword ptr ds:[0AB13798] int 3 ; Total bytes of code 154 ``` ```assembly ; System.Linq.Enumerable.g__WithEnumerator|35_0[[System.Int32, System.Private.CoreLib]](System.Collections.Generic.IEnumerable`1) push ebp mov ebp,esp push ebx sub esp,18 xor eax,eax mov [ebp-10],eax call dword ptr ds:[3510328] mov [ebp-1C],eax mov ecx,eax call dword ptr ds:[351032C] mov ebx,eax mov ecx,[ebp-1C] call dword ptr ds:[3510330] jmp short M03_L01 cmp dword ptr [ebp-1C],0 je short M03_L00 mov ecx,[ebp-1C] call dword ptr ds:[3510330] M03_L00: pop eax jmp eax M03_L01: mov eax,ebx lea esp,[ebp-4] pop ebx pop ebp ret ; Total bytes of code 68 ``` ### 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)