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: 10 Improvements on 12/3/2022 11:06:27 AM #10404

Open performanceautofiler[bot] opened 1 year ago

performanceautofiler[bot] commented 1 year ago

Run Information

Architecture x86
OS Windows 10.0.18362
Baseline 02c144afac6efe0f716e64ea0a701e2eec995866
Compare 4ce23f46ed20683a1b6649e9a43e09459007c9d8
Diff Diff

Improvements in PerfLabTests.CastingPerf2.CastingPerf

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[FooObjCastIfIsa - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/PerfLabTests.CastingPerf2.CastingPerf.FooObjCastIfIsa.html>) 320.80 μs 280.66 μs 0.87 0.05 False 3123044.2176870746 2020312.5 0.6469048656301903 Trace Trace

graph Test Report

Repro

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'PerfLabTests.CastingPerf2.CastingPerf*'
### Payloads [Baseline]() [Compare]() ### Histogram #### PerfLabTests.CastingPerf2.CastingPerf.FooObjCastIfIsa ```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 280.6622842261905 < 298.2578802884616. IsChangePoint: Marked as a change because one of 9/26/2022 8:26:31 AM, 11/7/2022 4:10:19 PM, 11/18/2022 7:31:41 AM, 12/3/2022 7:24:45 AM, 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 15.935424415629985 (T) = (0 -226208.1691579543) / Math.Sqrt((1145310114.3740754 / (299)) + (484218798.8620391 / (8))) is greater than 1.967772354556772 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (8) - 2, .975) and 0.3610794987518304 = (354047.44207775936 - 226208.1691579543) / 354047.44207775936 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; PerfLabTests.CastingPerf2.CastingPerf.FooObjCastIfIsa() push ebp mov ebp,esp push edi push esi push ebx xor esi,esi mov edi,ds:[0A39F914] test edi,edi jle short M00_L03 M00_L00: mov ebx,ds:[69D427C] mov edx,ebx mov ecx,offset MT_PerfLabTests.CastingPerf2.Foo call dword ptr ds:[7CEB828]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfClass(Void*, System.Object) test eax,eax je short M00_L02 mov edx,ebx mov eax,edx test eax,eax je short M00_L01 mov ecx,offset MT_PerfLabTests.CastingPerf2.Foo cmp [eax],ecx je short M00_L01 call dword ptr ds:[7CEB8B8] M00_L01: mov edx,69D42A4 call CORINFO_HELP_ASSIGN_REF_EAX M00_L02: inc esi cmp esi,edi jl short M00_L00 M00_L03: pop ebx pop esi pop edi pop ebp ret ; Total bytes of code 84 ``` ```assembly ; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfClass(Void*, System.Object) push ebp mov ebp,esp mov eax,edx test eax,eax je short M01_L00 cmp [eax],ecx jne short M01_L01 M01_L00: pop ebp ret M01_L01: mov edx,[eax] mov edx,[edx+10] M01_L02: cmp edx,ecx je short M01_L04 test edx,edx je short M01_L03 mov edx,[edx+10] cmp edx,ecx je short M01_L04 test edx,edx je short M01_L03 mov edx,[edx+10] cmp edx,ecx je short M01_L04 test edx,edx je short M01_L03 mov edx,[edx+10] cmp edx,ecx je short M01_L04 test edx,edx jne short M01_L05 M01_L03: xor eax,eax M01_L04: pop ebp ret M01_L05: mov edx,[edx+10] jmp short M01_L02 ; Total bytes of code 70 ``` ### Compare Jit Disasm ```assembly ; PerfLabTests.CastingPerf2.CastingPerf.FooObjCastIfIsa() push ebp mov ebp,esp push edi push esi push ebx sub esp,8 xor esi,esi mov edi,ds:[0AB5298C] test edi,edi jle short M00_L03 mov ebx,ds:[6D5427C] mov [ebp-14],ebx mov edx,ebx mov ecx,offset MT_PerfLabTests.CastingPerf2.Foo call dword ptr ds:[7FDB828]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfClass(Void*, System.Object) mov [ebp-10],eax M00_L00: test eax,eax je short M00_L02 mov edx,ebx mov ecx,edx test ecx,ecx je short M00_L01 mov ebx,offset MT_PerfLabTests.CastingPerf2.Foo cmp [ecx],ebx je short M00_L01 mov ecx,ebx call dword ptr ds:[7FDB8B8] mov ecx,eax M00_L01: mov edx,6D542A4 call CORINFO_HELP_ASSIGN_REF_ECX mov ebx,[ebp-14] M00_L02: inc esi cmp esi,edi mov eax,[ebp-10] jl short M00_L00 M00_L03: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret ; Total bytes of code 106 ``` ```assembly ; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfClass(Void*, System.Object) push ebp mov ebp,esp mov eax,edx test eax,eax je short M01_L00 cmp [eax],ecx jne short M01_L01 M01_L00: pop ebp ret M01_L01: mov edx,[eax] mov edx,[edx+10] M01_L02: cmp edx,ecx je short M01_L04 test edx,edx je short M01_L03 mov edx,[edx+10] cmp edx,ecx je short M01_L04 test edx,edx je short M01_L03 mov edx,[edx+10] cmp edx,ecx je short M01_L04 test edx,edx je short M01_L03 mov edx,[edx+10] cmp edx,ecx je short M01_L04 test edx,edx jne short M01_L05 M01_L03: xor eax,eax M01_L04: pop ebp ret M01_L05: mov edx,[edx+10] jmp short M01_L02 ; Total bytes of code 70 ``` ### 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 02c144afac6efe0f716e64ea0a701e2eec995866
Compare 4ce23f46ed20683a1b6649e9a43e09459007c9d8
Diff Diff

Improvements in PerfLabTests.LowLevelPerf

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[TypeReflectionObjectGetType - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/PerfLabTests.LowLevelPerf.TypeReflectionObjectGetType.html>) 134.12 μs 31.20 μs 0.23 0.06 False Trace Trace
[TypeReflectionArrayGetType - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/PerfLabTests.LowLevelPerf.TypeReflectionArrayGetType.html>) 155.92 μs 31.20 μs 0.20 0.07 False 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 'PerfLabTests.LowLevelPerf*'
### Payloads [Baseline]() [Compare]() ### Histogram #### PerfLabTests.LowLevelPerf.TypeReflectionObjectGetType ```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 31.198670159680642 < 126.91523872798014. IsChangePoint: Marked as a change because one of 12/3/2022 7:24:45 AM, 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 141.05910952451234 (T) = (0 -31215.729678164826) / Math.Sqrt((203690448.12551194 / (299)) + (2075.317815367907 / (8))) is greater than 1.967772354556772 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (8) - 2, .975) and 0.7886031738576011 = (147664.13596549278 - 31215.729678164826) / 147664.13596549278 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; PerfLabTests.LowLevelPerf.TypeReflectionObjectGetType() push ebp mov ebp,esp push edi push esi xor eax,eax xor esi,esi mov edi,ds:[0AC6F8B0] test edi,edi jle short M00_L01 nop nop nop nop nop nop nop nop nop nop nop nop nop M00_L00: mov ecx,ds:[72A41A0] call System.Object.GetType() inc esi cmp esi,edi jl short M00_L00 M00_L01: pop esi pop edi pop ebp ret ; Total bytes of code 52 ``` ### Compare Jit Disasm ```assembly ; PerfLabTests.LowLevelPerf.TypeReflectionObjectGetType() push ebp mov ebp,esp push edi push esi xor eax,eax xor esi,esi mov edi,ds:[0A692928] test edi,edi jle short M00_L01 mov ecx,ds:[67D41A0] call System.Object.GetType() nop nop M00_L00: mov edx,eax inc esi cmp esi,edi jl short M00_L00 mov eax,edx M00_L01: pop esi pop edi pop ebp ret ; Total bytes of code 45 ``` #### PerfLabTests.LowLevelPerf.TypeReflectionArrayGetType ```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 31.198350620188194 < 148.13035760186594. IsChangePoint: Marked as a change because one of 12/3/2022 7:24:45 AM, 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 140.23691833355403 (T) = (0 -31214.874010863376) / Math.Sqrt((209563835.01651832 / (299)) + (2191.246263144517 / (8))) is greater than 1.967772354556772 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (8) - 2, .975) and 0.7900001513370632 = (148642.36431410603 - 31214.874010863376) / 148642.36431410603 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; PerfLabTests.LowLevelPerf.TypeReflectionArrayGetType() push ebp mov ebp,esp push edi push esi xor eax,eax xor esi,esi mov edi,ds:[0A19F8B0] test edi,edi jle short M00_L01 nop nop nop nop nop nop nop nop nop nop nop nop nop M00_L00: mov ecx,ds:[69141B8] call System.Object.GetType() inc esi cmp esi,edi jl short M00_L00 M00_L01: pop esi pop edi pop ebp ret ; Total bytes of code 52 ``` ### Compare Jit Disasm ```assembly ; PerfLabTests.LowLevelPerf.TypeReflectionArrayGetType() push ebp mov ebp,esp push edi push esi xor eax,eax xor esi,esi mov edi,ds:[0B2E2928] test edi,edi jle short M00_L01 mov ecx,ds:[74741B8] call System.Object.GetType() nop nop M00_L00: mov edx,eax inc esi cmp esi,edi jl short M00_L00 mov eax,edx M00_L01: pop esi pop edi pop ebp ret ; Total bytes of code 45 ``` ### 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 02c144afac6efe0f716e64ea0a701e2eec995866
Compare 4ce23f46ed20683a1b6649e9a43e09459007c9d8
Diff Diff

Improvements in PerfLabTests.CastingPerf

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[CheckArrayIsInterfaceYes - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/PerfLabTests.CastingPerf.CheckArrayIsInterfaceYes.html>) 753.22 μs 31.20 μs 0.04 0.46 False 6137638.888888889 402361.673414305 0.06555642661589456 Trace Trace
[CheckObjIsInterfaceNo - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/PerfLabTests.CastingPerf.CheckObjIsInterfaceNo.html>) 266.15 μs 31.35 μs 0.12 0.01 False Trace Trace
[CheckArrayIsInterfaceNo - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/PerfLabTests.CastingPerf.CheckArrayIsInterfaceNo.html>) 500.99 μs 31.33 μs 0.06 0.54 False 6437231.182795699 402370.10796221317 0.06250670459647267 Trace Trace
[CheckObjIsInterfaceYes - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/PerfLabTests.CastingPerf.CheckObjIsInterfaceYes.html>) 280.63 μs 31.20 μs 0.11 0.05 False 2918346.7741935486 402327.93522267207 0.13786159300203477 Trace Trace
[CheckIsInstAnyIsInterfaceNo - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/PerfLabTests.CastingPerf.CheckIsInstAnyIsInterfaceNo.html>) 266.17 μs 31.20 μs 0.12 0.03 False 3619774.0112994355 402302.63157894736 0.11114026188461631 Trace Trace
[FooObjCastIfIsa - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/PerfLabTests.CastingPerf.FooObjCastIfIsa.html>) 374.27 μs 280.66 μs 0.75 0.07 False Trace Trace
[CheckIsInstAnyIsInterfaceYes - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/PerfLabTests.CastingPerf.CheckIsInstAnyIsInterfaceYes.html>) 281.83 μs 31.20 μs 0.11 0.06 False 2918481.182795699 402344.8043184886 0.13786102397722866 Trace Trace

graph graph graph graph graph graph graph Test Report

Repro

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'PerfLabTests.CastingPerf*'
### Payloads [Baseline]() [Compare]() ### Histogram #### PerfLabTests.CastingPerf.CheckArrayIsInterfaceYes ```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 31.19933436698032 < 444.38722877275904. IsChangePoint: Marked as a change because one of 12/3/2022 7:24:45 AM, 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 46.52452762608674 (T) = (0 -31236.788118654305) / Math.Sqrt((38041189602.58949 / (299)) + (3812.1653067627813 / (8))) is greater than 1.967772354556772 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (8) - 2, .975) and 0.9438200516848091 = (556013.1159858679 - 31236.788118654305) / 556013.1159858679 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; PerfLabTests.CastingPerf.CheckArrayIsInterfaceYes() push ebp mov ebp,esp push edi push esi xor eax,eax xor esi,esi mov edi,ds:[0A72F8A0] test edi,edi jle short M00_L01 M00_L00: mov edx,ds:[6EB4178] mov ecx,offset MT_PerfLabTests.IMyInterface1[] call dword ptr ds:[807B7F8]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfAny(Void*, System.Object) test eax,eax setne al movzx eax,al inc esi cmp esi,edi jl short M00_L00 M00_L01: pop esi pop edi pop ebp ret ; Total bytes of code 53 ``` ```assembly ; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfAny(Void*, System.Object) push ebp mov ebp,esp push edi push esi push ebx sub esp,10 mov eax,ecx test edx,edx je near ptr M01_L05 mov esi,[edx] mov [ebp-14],esi cmp esi,eax je near ptr M01_L05 mov edi,ds:[6EB1680] add edi,8 mov [ebp-1C],edi mov ecx,esi rol ecx,10 mov [ebp-10],eax xor ecx,eax imul ebx,ecx,9E3779B9 mov ecx,[edi] shr ebx,cl xor ecx,ecx M01_L00: mov [ebp-18],ebx lea esi,[ebx+1] lea esi,[esi+esi*2] lea esi,[edi+esi*4] mov edi,[esi] mov eax,[esi+4] and edi,0FFFFFFFE mov ebx,[ebp-14] cmp eax,ebx jne short M01_L01 mov eax,[esi+8] mov ebx,[ebp-10] xor eax,ebx cmp eax,1 jbe short M01_L03 mov [ebp-10],ebx M01_L01: test edi,edi je short M01_L02 inc ecx mov eax,ecx add eax,[ebp-18] mov edi,[ebp-1C] and eax,[edi+4] cmp ecx,8 mov ebx,eax jl short M01_L00 mov eax,[ebp-10] jmp short M01_L07 M01_L02: mov eax,[ebp-10] jmp short M01_L07 M01_L03: mov ecx,eax mov eax,ebx cmp edi,[esi] jne short M01_L07 M01_L04: cmp ecx,1 je short M01_L05 test ecx,ecx jne short M01_L06 xor edx,edx M01_L05: mov eax,edx lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret M01_L06: mov ecx,eax call System.Runtime.CompilerServices.CastHelpers.IsInstanceOfAny_NoCacheLookup(Void*, System.Object) lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret M01_L07: mov ecx,2 jmp short M01_L04 ; Total bytes of code 193 ``` ### Compare Jit Disasm ```assembly ; PerfLabTests.CastingPerf.CheckArrayIsInterfaceYes() push ebp mov ebp,esp push edi push esi xor eax,eax xor esi,esi mov edi,ds:[0B382918] test edi,edi jle short M00_L01 mov edx,ds:[76F4178] mov ecx,offset MT_PerfLabTests.IMyInterface1[] call dword ptr ds:[567B7F8]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfAny(Void*, System.Object) test eax,eax setne al movzx eax,al M00_L00: mov edx,eax inc esi cmp esi,edi jl short M00_L00 mov eax,edx M00_L01: pop esi pop edi pop ebp ret ; Total bytes of code 57 ``` ```assembly ; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfAny(Void*, System.Object) push ebp mov ebp,esp push edi push esi push ebx sub esp,10 mov eax,ecx test edx,edx je near ptr M01_L05 mov esi,[edx] mov [ebp-14],esi cmp esi,eax je near ptr M01_L05 mov edi,ds:[76F1680] add edi,8 mov [ebp-1C],edi mov ecx,esi rol ecx,10 mov [ebp-10],eax xor ecx,eax imul ebx,ecx,9E3779B9 mov ecx,[edi] shr ebx,cl xor ecx,ecx M01_L00: mov [ebp-18],ebx lea esi,[ebx+1] lea esi,[esi+esi*2] lea esi,[edi+esi*4] mov edi,[esi] mov eax,[esi+4] and edi,0FFFFFFFE mov ebx,[ebp-14] cmp eax,ebx jne short M01_L01 mov eax,[esi+8] mov ebx,[ebp-10] xor eax,ebx cmp eax,1 jbe short M01_L03 mov [ebp-10],ebx M01_L01: test edi,edi je short M01_L02 inc ecx mov eax,ecx add eax,[ebp-18] mov edi,[ebp-1C] and eax,[edi+4] cmp ecx,8 mov ebx,eax jl short M01_L00 mov eax,[ebp-10] jmp short M01_L07 M01_L02: mov eax,[ebp-10] jmp short M01_L07 M01_L03: mov ecx,eax mov eax,ebx cmp edi,[esi] jne short M01_L07 M01_L04: cmp ecx,1 je short M01_L05 test ecx,ecx jne short M01_L06 xor edx,edx M01_L05: mov eax,edx lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret M01_L06: mov ecx,eax call System.Runtime.CompilerServices.CastHelpers.IsInstanceOfAny_NoCacheLookup(Void*, System.Object) lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret M01_L07: mov ecx,2 jmp short M01_L04 ; Total bytes of code 193 ``` #### PerfLabTests.CastingPerf.CheckObjIsInterfaceNo ```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 31.34852621910488 < 251.8162793205205. IsChangePoint: Marked as a change because one of 12/3/2022 7:24:45 AM, 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 210.09115459487288 (T) = (0 -31232.4590032014) / Math.Sqrt((366218794.281737 / (299)) + (4304.468562329317 / (8))) is greater than 1.967772354556772 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (8) - 2, .975) and 0.8816028364950814 = (263793.98018183024 - 31232.4590032014) / 263793.98018183024 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; PerfLabTests.CastingPerf.CheckObjIsInterfaceNo() push ebp mov ebp,esp push edi push esi xor eax,eax xor esi,esi mov edi,ds:[0AB6F8A0] test edi,edi jle short M00_L01 M00_L00: mov edx,ds:[7284170] mov ecx,offset MT_PerfLabTests.IMyInterface1 call dword ptr ds:[84BB810]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfInterface(Void*, System.Object) test eax,eax setne al movzx eax,al inc esi cmp esi,edi jl short M00_L00 M00_L01: pop esi pop edi pop ebp ret ; Total bytes of code 53 ``` ```assembly ; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfInterface(Void*, System.Object) push ebp mov ebp,esp push edi push esi test edx,edx je short M01_L03 mov eax,[edx] movzx esi,word ptr [eax+0E] test esi,esi je short M01_L02 mov edi,[eax+24] cmp esi,4 jl short M01_L01 M01_L00: cmp [edi],ecx je short M01_L03 cmp [edi+4],ecx je short M01_L03 cmp [edi+8],ecx je short M01_L03 cmp [edi+0C],ecx je short M01_L03 add edi,10 add esi,0FFFFFFFC cmp esi,4 jge short M01_L00 test esi,esi je short M01_L02 M01_L01: cmp [edi],ecx je short M01_L03 add edi,4 dec esi test esi,esi jg short M01_L01 M01_L02: test dword ptr [eax],406C0000 jne short M01_L04 xor edx,edx M01_L03: mov eax,edx pop esi pop edi pop ebp ret M01_L04: call dword ptr ds:[84BB840] pop esi pop edi pop ebp ret ; Total bytes of code 99 ``` ### Compare Jit Disasm ```assembly ; PerfLabTests.CastingPerf.CheckObjIsInterfaceNo() push ebp mov ebp,esp push edi push esi xor eax,eax xor esi,esi mov edi,ds:[0B312918] test edi,edi jle short M00_L01 mov edx,ds:[7404170] mov ecx,offset MT_PerfLabTests.IMyInterface1 call dword ptr ds:[872B810]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfInterface(Void*, System.Object) test eax,eax setne al movzx eax,al M00_L00: mov edx,eax inc esi cmp esi,edi jl short M00_L00 mov eax,edx M00_L01: pop esi pop edi pop ebp ret ; Total bytes of code 57 ``` ```assembly ; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfInterface(Void*, System.Object) push ebp mov ebp,esp push edi push esi test edx,edx je short M01_L03 mov eax,[edx] movzx esi,word ptr [eax+0E] test esi,esi je short M01_L02 mov edi,[eax+24] cmp esi,4 jl short M01_L01 M01_L00: cmp [edi],ecx je short M01_L03 cmp [edi+4],ecx je short M01_L03 cmp [edi+8],ecx je short M01_L03 cmp [edi+0C],ecx je short M01_L03 add edi,10 add esi,0FFFFFFFC cmp esi,4 jge short M01_L00 test esi,esi je short M01_L02 M01_L01: cmp [edi],ecx je short M01_L03 add edi,4 dec esi test esi,esi jg short M01_L01 M01_L02: test dword ptr [eax],406C0000 jne short M01_L04 xor edx,edx M01_L03: mov eax,edx pop esi pop edi pop ebp ret M01_L04: call dword ptr ds:[872B840] pop esi pop edi pop ebp ret ; Total bytes of code 99 ``` #### PerfLabTests.CastingPerf.CheckArrayIsInterfaceNo ```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 31.32863322799445 < 534.6833202734374. IsChangePoint: Marked as a change because one of 9/19/2022 7:15:31 PM, 9/20/2022 8:04:40 PM, 12/3/2022 7:24:45 AM, 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 50.971549227068216 (T) = (0 -31236.90034624779) / Math.Sqrt((35920561918.05306 / (299)) + (3384.1415326607853 / (8))) is greater than 1.967772354556772 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (8) - 2, .975) and 0.9470488094224077 = (589918.7535825971 - 31236.90034624779) / 589918.7535825971 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; PerfLabTests.CastingPerf.CheckArrayIsInterfaceNo() push ebp mov ebp,esp push edi push esi xor eax,eax xor esi,esi mov edi,ds:[0A22F8A0] test edi,edi jle short M00_L01 M00_L00: mov edx,ds:[6A6417C] mov ecx,offset MT_PerfLabTests.IMyInterface1[] call dword ptr ds:[477B7F8]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfAny(Void*, System.Object) test eax,eax setne al movzx eax,al inc esi cmp esi,edi jl short M00_L00 M00_L01: pop esi pop edi pop ebp ret ; Total bytes of code 53 ``` ```assembly ; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfAny(Void*, System.Object) push ebp mov ebp,esp push edi push esi push ebx sub esp,10 mov eax,ecx test edx,edx je near ptr M01_L05 mov esi,[edx] mov [ebp-14],esi cmp esi,eax je near ptr M01_L05 mov edi,ds:[6A61680] add edi,8 mov [ebp-1C],edi mov ecx,esi rol ecx,10 mov [ebp-10],eax xor ecx,eax imul ebx,ecx,9E3779B9 mov ecx,[edi] shr ebx,cl xor ecx,ecx M01_L00: mov [ebp-18],ebx lea esi,[ebx+1] lea esi,[esi+esi*2] lea esi,[edi+esi*4] mov edi,[esi] mov eax,[esi+4] and edi,0FFFFFFFE mov ebx,[ebp-14] cmp eax,ebx jne short M01_L01 mov eax,[esi+8] mov ebx,[ebp-10] xor eax,ebx cmp eax,1 jbe short M01_L03 mov [ebp-10],ebx M01_L01: test edi,edi je short M01_L02 inc ecx mov eax,ecx add eax,[ebp-18] mov edi,[ebp-1C] and eax,[edi+4] cmp ecx,8 mov ebx,eax jl short M01_L00 mov eax,[ebp-10] jmp short M01_L07 M01_L02: mov eax,[ebp-10] jmp short M01_L07 M01_L03: mov ecx,eax mov eax,ebx cmp edi,[esi] jne short M01_L07 M01_L04: cmp ecx,1 je short M01_L05 test ecx,ecx jne short M01_L06 xor edx,edx M01_L05: mov eax,edx lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret M01_L06: mov ecx,eax call System.Runtime.CompilerServices.CastHelpers.IsInstanceOfAny_NoCacheLookup(Void*, System.Object) lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret M01_L07: mov ecx,2 jmp short M01_L04 ; Total bytes of code 193 ``` ### Compare Jit Disasm ```assembly ; PerfLabTests.CastingPerf.CheckArrayIsInterfaceNo() push ebp mov ebp,esp push edi push esi xor eax,eax xor esi,esi mov edi,ds:[0ADC2918] test edi,edi jle short M00_L01 mov edx,ds:[6FE417C] mov ecx,offset MT_PerfLabTests.IMyInterface1[] call dword ptr ds:[824B7F8]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfAny(Void*, System.Object) test eax,eax setne al movzx eax,al M00_L00: mov edx,eax inc esi cmp esi,edi jl short M00_L00 mov eax,edx M00_L01: pop esi pop edi pop ebp ret ; Total bytes of code 57 ``` ```assembly ; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfAny(Void*, System.Object) push ebp mov ebp,esp push edi push esi push ebx sub esp,10 mov eax,ecx test edx,edx je near ptr M01_L05 mov esi,[edx] mov [ebp-14],esi cmp esi,eax je near ptr M01_L05 mov edi,ds:[6FE1680] add edi,8 mov [ebp-1C],edi mov ecx,esi rol ecx,10 mov [ebp-10],eax xor ecx,eax imul ebx,ecx,9E3779B9 mov ecx,[edi] shr ebx,cl xor ecx,ecx M01_L00: mov [ebp-18],ebx lea esi,[ebx+1] lea esi,[esi+esi*2] lea esi,[edi+esi*4] mov edi,[esi] mov eax,[esi+4] and edi,0FFFFFFFE mov ebx,[ebp-14] cmp eax,ebx jne short M01_L01 mov eax,[esi+8] mov ebx,[ebp-10] xor eax,ebx cmp eax,1 jbe short M01_L03 mov [ebp-10],ebx M01_L01: test edi,edi je short M01_L02 inc ecx mov eax,ecx add eax,[ebp-18] mov edi,[ebp-1C] and eax,[edi+4] cmp ecx,8 mov ebx,eax jl short M01_L00 mov eax,[ebp-10] jmp short M01_L07 M01_L02: mov eax,[ebp-10] jmp short M01_L07 M01_L03: mov ecx,eax mov eax,ebx cmp edi,[esi] jne short M01_L07 M01_L04: cmp ecx,1 je short M01_L05 test ecx,ecx jne short M01_L06 xor edx,edx M01_L05: mov eax,edx lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret M01_L06: mov ecx,eax call System.Runtime.CompilerServices.CastHelpers.IsInstanceOfAny_NoCacheLookup(Void*, System.Object) lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret M01_L07: mov ecx,2 jmp short M01_L04 ; Total bytes of code 193 ``` #### PerfLabTests.CastingPerf.CheckObjIsInterfaceYes ```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 31.197779441117767 < 266.6287565104167. IsChangePoint: Marked as a change because one of 11/13/2022 1:28:42 PM, 11/14/2022 3:36:58 AM, 12/3/2022 7:24:45 AM, 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 163.05355079208826 (T) = (0 -31245.528117603542) / Math.Sqrt((600171771.794607 / (299)) + (4568.332234339962 / (8))) is greater than 1.967772354556772 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (8) - 2, .975) and 0.880873786020061 = (262289.27348320914 - 31245.528117603542) / 262289.27348320914 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; PerfLabTests.CastingPerf.CheckObjIsInterfaceYes() push ebp mov ebp,esp push edi push esi xor eax,eax xor esi,esi mov edi,ds:[0A84F8A0] test edi,edi jle short M00_L01 M00_L00: mov edx,ds:[6FA416C] mov ecx,offset MT_PerfLabTests.IMyInterface1 call dword ptr ds:[4DAB810]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfInterface(Void*, System.Object) test eax,eax setne al movzx eax,al inc esi cmp esi,edi jl short M00_L00 M00_L01: pop esi pop edi pop ebp ret ; Total bytes of code 53 ``` ```assembly ; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfInterface(Void*, System.Object) push ebp mov ebp,esp push edi push esi test edx,edx je short M01_L03 mov eax,[edx] movzx esi,word ptr [eax+0E] test esi,esi je short M01_L02 mov edi,[eax+24] cmp esi,4 jl short M01_L01 M01_L00: cmp [edi],ecx je short M01_L03 cmp [edi+4],ecx je short M01_L03 cmp [edi+8],ecx je short M01_L03 cmp [edi+0C],ecx je short M01_L03 add edi,10 add esi,0FFFFFFFC cmp esi,4 jge short M01_L00 test esi,esi je short M01_L02 M01_L01: cmp [edi],ecx je short M01_L03 add edi,4 dec esi test esi,esi jg short M01_L01 M01_L02: test dword ptr [eax],406C0000 jne short M01_L04 xor edx,edx M01_L03: mov eax,edx pop esi pop edi pop ebp ret M01_L04: call dword ptr ds:[4DAB840] pop esi pop edi pop ebp ret ; Total bytes of code 99 ``` ### Compare Jit Disasm ```assembly ; PerfLabTests.CastingPerf.CheckObjIsInterfaceYes() push ebp mov ebp,esp push edi push esi xor eax,eax xor esi,esi mov edi,ds:[0AFD2918] test edi,edi jle short M00_L01 mov edx,ds:[718416C] mov ecx,offset MT_PerfLabTests.IMyInterface1 call dword ptr ds:[845B810]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfInterface(Void*, System.Object) test eax,eax setne al movzx eax,al M00_L00: mov edx,eax inc esi cmp esi,edi jl short M00_L00 mov eax,edx M00_L01: pop esi pop edi pop ebp ret ; Total bytes of code 57 ``` ```assembly ; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfInterface(Void*, System.Object) push ebp mov ebp,esp push edi push esi test edx,edx je short M01_L03 mov eax,[edx] movzx esi,word ptr [eax+0E] test esi,esi je short M01_L02 mov edi,[eax+24] cmp esi,4 jl short M01_L01 M01_L00: cmp [edi],ecx je short M01_L03 cmp [edi+4],ecx je short M01_L03 cmp [edi+8],ecx je short M01_L03 cmp [edi+0C],ecx je short M01_L03 add edi,10 add esi,0FFFFFFFC cmp esi,4 jge short M01_L00 test esi,esi je short M01_L02 M01_L01: cmp [edi],ecx je short M01_L03 add edi,4 dec esi test esi,esi jg short M01_L01 M01_L02: test dword ptr [eax],406C0000 jne short M01_L04 xor edx,edx M01_L03: mov eax,edx pop esi pop edi pop ebp ret M01_L04: call dword ptr ds:[845B840] pop esi pop edi pop ebp ret ; Total bytes of code 99 ``` #### PerfLabTests.CastingPerf.CheckIsInstAnyIsInterfaceNo ```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 31.196512807717895 < 252.85188522750198. IsChangePoint: Marked as a change because one of 12/3/2022 7:24:45 AM, 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 207.71604018734595 (T) = (0 -31229.14160630887) / Math.Sqrt((375229381.79425406 / (299)) + (3589.512249723489 / (8))) is greater than 1.967772354556772 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (8) - 2, .975) and 0.881691435340809 = (263963.48984767083 - 31229.14160630887) / 263963.48984767083 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; PerfLabTests.CastingPerf.CheckIsInstAnyIsInterfaceNo() push ebp mov ebp,esp push edi push esi xor eax,eax xor esi,esi mov edi,ds:[0A35F8A0] test edi,edi jle short M00_L01 M00_L00: mov edx,ds:[6B94174] mov ecx,offset MT_PerfLabTests.IMyInterface2 call dword ptr ds:[499B810]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfInterface(Void*, System.Object) test eax,eax setne al movzx eax,al inc esi cmp esi,edi jl short M00_L00 M00_L01: pop esi pop edi pop ebp ret ; Total bytes of code 53 ``` ```assembly ; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfInterface(Void*, System.Object) push ebp mov ebp,esp push edi push esi test edx,edx je short M01_L03 mov eax,[edx] movzx esi,word ptr [eax+0E] test esi,esi je short M01_L02 mov edi,[eax+24] cmp esi,4 jl short M01_L01 M01_L00: cmp [edi],ecx je short M01_L03 cmp [edi+4],ecx je short M01_L03 cmp [edi+8],ecx je short M01_L03 cmp [edi+0C],ecx je short M01_L03 add edi,10 add esi,0FFFFFFFC cmp esi,4 jge short M01_L00 test esi,esi je short M01_L02 M01_L01: cmp [edi],ecx je short M01_L03 add edi,4 dec esi test esi,esi jg short M01_L01 M01_L02: test dword ptr [eax],406C0000 jne short M01_L04 xor edx,edx M01_L03: mov eax,edx pop esi pop edi pop ebp ret M01_L04: call dword ptr ds:[499B840] pop esi pop edi pop ebp ret ; Total bytes of code 99 ``` ### Compare Jit Disasm ```assembly ; PerfLabTests.CastingPerf.CheckIsInstAnyIsInterfaceNo() push ebp mov ebp,esp push edi push esi xor eax,eax xor esi,esi mov edi,ds:[0B302918] test edi,edi jle short M00_L01 mov edx,ds:[7504174] mov ecx,offset MT_PerfLabTests.IMyInterface2 call dword ptr ds:[878B810]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfInterface(Void*, System.Object) test eax,eax setne al movzx eax,al M00_L00: mov edx,eax inc esi cmp esi,edi jl short M00_L00 mov eax,edx M00_L01: pop esi pop edi pop ebp ret ; Total bytes of code 57 ``` ```assembly ; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfInterface(Void*, System.Object) push ebp mov ebp,esp push edi push esi test edx,edx je short M01_L03 mov eax,[edx] movzx esi,word ptr [eax+0E] test esi,esi je short M01_L02 mov edi,[eax+24] cmp esi,4 jl short M01_L01 M01_L00: cmp [edi],ecx je short M01_L03 cmp [edi+4],ecx je short M01_L03 cmp [edi+8],ecx je short M01_L03 cmp [edi+0C],ecx je short M01_L03 add edi,10 add esi,0FFFFFFFC cmp esi,4 jge short M01_L00 test esi,esi je short M01_L02 M01_L01: cmp [edi],ecx je short M01_L03 add edi,4 dec esi test esi,esi jg short M01_L01 M01_L02: test dword ptr [eax],406C0000 jne short M01_L04 xor edx,edx M01_L03: mov eax,edx pop esi pop edi pop ebp ret M01_L04: call dword ptr ds:[878B840] pop esi pop edi pop ebp ret ; Total bytes of code 99 ``` #### PerfLabTests.CastingPerf.FooObjCastIfIsa ```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 280.6605082417583 < 355.73104954117065. IsChangePoint: Marked as a change because one of 9/20/2022 10:35:57 PM, 10/26/2022 7:11:30 AM, 11/18/2022 7:31:41 AM, 12/3/2022 7:24:45 AM, 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 23.729656344112264 (T) = (0 -226201.00133030306) / Math.Sqrt((2455635364.5003333 / (299)) + (484321533.4103204 / (8))) is greater than 1.967772354556772 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (8) - 2, .975) and 0.4651968519790569 = (422961.23754575383 - 226201.00133030306) / 422961.23754575383 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; PerfLabTests.CastingPerf.FooObjCastIfIsa() push ebp mov ebp,esp push edi push esi push ebx xor esi,esi mov edi,ds:[0A4CF8A0] test edi,edi jle short M00_L03 M00_L00: mov ebx,ds:[6C74158] mov edx,ebx mov ecx,offset MT_PerfLabTests.Foo[] call dword ptr ds:[7E1B7F8]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfAny(Void*, System.Object) test eax,eax je short M00_L02 mov edx,ebx mov eax,edx test eax,eax je short M00_L01 mov ecx,offset MT_PerfLabTests.Foo[] cmp [eax],ecx je short M00_L01 call dword ptr ds:[7E1B858] M00_L01: mov edx,6C74160 call CORINFO_HELP_ASSIGN_REF_EAX M00_L02: inc esi cmp esi,edi jl short M00_L00 M00_L03: pop ebx pop esi pop edi pop ebp ret ; Total bytes of code 84 ``` ```assembly ; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfAny(Void*, System.Object) push ebp mov ebp,esp push edi push esi push ebx sub esp,10 mov eax,ecx test edx,edx je near ptr M01_L05 mov esi,[edx] mov [ebp-14],esi cmp esi,eax je near ptr M01_L05 mov edi,ds:[6C71680] add edi,8 mov [ebp-1C],edi mov ecx,esi rol ecx,10 mov [ebp-10],eax xor ecx,eax imul ebx,ecx,9E3779B9 mov ecx,[edi] shr ebx,cl xor ecx,ecx M01_L00: mov [ebp-18],ebx lea esi,[ebx+1] lea esi,[esi+esi*2] lea esi,[edi+esi*4] mov edi,[esi] mov eax,[esi+4] and edi,0FFFFFFFE mov ebx,[ebp-14] cmp eax,ebx jne short M01_L01 mov eax,[esi+8] mov ebx,[ebp-10] xor eax,ebx cmp eax,1 jbe short M01_L03 mov [ebp-10],ebx M01_L01: test edi,edi je short M01_L02 inc ecx mov eax,ecx add eax,[ebp-18] mov edi,[ebp-1C] and eax,[edi+4] cmp ecx,8 mov ebx,eax jl short M01_L00 mov eax,[ebp-10] jmp short M01_L07 M01_L02: mov eax,[ebp-10] jmp short M01_L07 M01_L03: mov ecx,eax mov eax,ebx cmp edi,[esi] jne short M01_L07 M01_L04: cmp ecx,1 je short M01_L05 test ecx,ecx jne short M01_L06 xor edx,edx M01_L05: mov eax,edx lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret M01_L06: mov ecx,eax call System.Runtime.CompilerServices.CastHelpers.IsInstanceOfAny_NoCacheLookup(Void*, System.Object) lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret M01_L07: mov ecx,2 jmp short M01_L04 ; Total bytes of code 193 ``` ### Compare Jit Disasm ```assembly ; PerfLabTests.CastingPerf.FooObjCastIfIsa() push ebp mov ebp,esp push edi push esi push ebx sub esp,8 xor esi,esi mov edi,ds:[0B632918] test edi,edi jle short M00_L03 mov ebx,ds:[7804158] mov [ebp-14],ebx mov edx,ebx mov ecx,offset MT_PerfLabTests.Foo[] call dword ptr ds:[8A4B7F8]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfAny(Void*, System.Object) mov [ebp-10],eax M00_L00: test eax,eax je short M00_L02 mov edx,ebx mov ecx,edx test ecx,ecx je short M00_L01 mov ebx,offset MT_PerfLabTests.Foo[] cmp [ecx],ebx je short M00_L01 mov ecx,ebx call dword ptr ds:[8A4B858] mov ecx,eax M00_L01: mov edx,7804160 call CORINFO_HELP_ASSIGN_REF_ECX mov ebx,[ebp-14] M00_L02: inc esi cmp esi,edi mov eax,[ebp-10] jl short M00_L00 M00_L03: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret ; Total bytes of code 106 ``` ```assembly ; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfAny(Void*, System.Object) push ebp mov ebp,esp push edi push esi push ebx sub esp,10 mov eax,ecx test edx,edx je near ptr M01_L05 mov esi,[edx] mov [ebp-14],esi cmp esi,eax je near ptr M01_L05 mov edi,ds:[7801680] add edi,8 mov [ebp-1C],edi mov ecx,esi rol ecx,10 mov [ebp-10],eax xor ecx,eax imul ebx,ecx,9E3779B9 mov ecx,[edi] shr ebx,cl xor ecx,ecx M01_L00: mov [ebp-18],ebx lea esi,[ebx+1] lea esi,[esi+esi*2] lea esi,[edi+esi*4] mov edi,[esi] mov eax,[esi+4] and edi,0FFFFFFFE mov ebx,[ebp-14] cmp eax,ebx jne short M01_L01 mov eax,[esi+8] mov ebx,[ebp-10] xor eax,ebx cmp eax,1 jbe short M01_L03 mov [ebp-10],ebx M01_L01: test edi,edi je short M01_L02 inc ecx mov eax,ecx add eax,[ebp-18] mov edi,[ebp-1C] and eax,[edi+4] cmp ecx,8 mov ebx,eax jl short M01_L00 mov eax,[ebp-10] jmp short M01_L07 M01_L02: mov eax,[ebp-10] jmp short M01_L07 M01_L03: mov ecx,eax mov eax,ebx cmp edi,[esi] jne short M01_L07 M01_L04: cmp ecx,1 je short M01_L05 test ecx,ecx jne short M01_L06 xor edx,edx M01_L05: mov eax,edx lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret M01_L06: mov ecx,eax call System.Runtime.CompilerServices.CastHelpers.IsInstanceOfAny_NoCacheLookup(Void*, System.Object) lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret M01_L07: mov ecx,2 jmp short M01_L04 ; Total bytes of code 193 ``` #### PerfLabTests.CastingPerf.CheckIsInstAnyIsInterfaceYes ```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 31.197351725121184 < 266.62941122581844. IsChangePoint: Marked as a change because one of 12/3/2022 7:24:45 AM, 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 162.96593620986778 (T) = (0 -31215.68846157825) / Math.Sqrt((603189442.6394182 / (299)) + (2914.9812417469248 / (8))) is greater than 1.967772354556772 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (8) - 2, .975) and 0.8811750151871133 = (262703.07133414317 - 31215.68846157825) / 262703.07133414317 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; PerfLabTests.CastingPerf.CheckIsInstAnyIsInterfaceYes() push ebp mov ebp,esp push edi push esi xor eax,eax xor esi,esi mov edi,ds:[0A7CF8A0] test edi,edi jle short M00_L01 M00_L00: mov edx,ds:[6E74174] mov ecx,offset MT_PerfLabTests.IMyInterface1 call dword ptr ds:[811B810]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfInterface(Void*, System.Object) test eax,eax setne al movzx eax,al inc esi cmp esi,edi jl short M00_L00 M00_L01: pop esi pop edi pop ebp ret ; Total bytes of code 53 ``` ```assembly ; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfInterface(Void*, System.Object) push ebp mov ebp,esp push edi push esi test edx,edx je short M01_L03 mov eax,[edx] movzx esi,word ptr [eax+0E] test esi,esi je short M01_L02 mov edi,[eax+24] cmp esi,4 jl short M01_L01 M01_L00: cmp [edi],ecx je short M01_L03 cmp [edi+4],ecx je short M01_L03 cmp [edi+8],ecx je short M01_L03 cmp [edi+0C],ecx je short M01_L03 add edi,10 add esi,0FFFFFFFC cmp esi,4 jge short M01_L00 test esi,esi je short M01_L02 M01_L01: cmp [edi],ecx je short M01_L03 add edi,4 dec esi test esi,esi jg short M01_L01 M01_L02: test dword ptr [eax],406C0000 jne short M01_L04 xor edx,edx M01_L03: mov eax,edx pop esi pop edi pop ebp ret M01_L04: call dword ptr ds:[811B840] pop esi pop edi pop ebp ret ; Total bytes of code 99 ``` ### Compare Jit Disasm ```assembly ; PerfLabTests.CastingPerf.CheckIsInstAnyIsInterfaceYes() push ebp mov ebp,esp push edi push esi xor eax,eax xor esi,esi mov edi,ds:[0B222918] test edi,edi jle short M00_L01 mov edx,ds:[7354174] mov ecx,offset MT_PerfLabTests.IMyInterface1 call dword ptr ds:[86AB810]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfInterface(Void*, System.Object) test eax,eax setne al movzx eax,al M00_L00: mov edx,eax inc esi cmp esi,edi jl short M00_L00 mov eax,edx M00_L01: pop esi pop edi pop ebp ret ; Total bytes of code 57 ``` ```assembly ; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfInterface(Void*, System.Object) push ebp mov ebp,esp push edi push esi test edx,edx je short M01_L03 mov eax,[edx] movzx esi,word ptr [eax+0E] test esi,esi je short M01_L02 mov edi,[eax+24] cmp esi,4 jl short M01_L01 M01_L00: cmp [edi],ecx je short M01_L03 cmp [edi+4],ecx je short M01_L03 cmp [edi+8],ecx je short M01_L03 cmp [edi+0C],ecx je short M01_L03 add edi,10 add esi,0FFFFFFFC cmp esi,4 jge short M01_L00 test esi,esi je short M01_L02 M01_L01: cmp [edi],ecx je short M01_L03 add edi,4 dec esi test esi,esi jg short M01_L01 M01_L02: test dword ptr [eax],406C0000 jne short M01_L04 xor edx,edx M01_L03: mov eax,edx pop esi pop edi pop ebp ret M01_L04: call dword ptr ds:[86AB840] pop esi pop edi pop ebp ret ; Total bytes of code 99 ``` ### 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)