dotnet / perf-autofiling-issues

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

[Perf] Windows/x64: 17 Improvements on 12/3/2022 11:06:27 AM #10368

Open performanceautofiler[bot] opened 1 year ago

performanceautofiler[bot] commented 1 year ago

Run Information

Architecture x64
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_x64_Windows 10.0.18362/PerfLabTests.CastingPerf2.CastingPerf.FooObjCastIfIsa.html>) 505.26 μs 367.36 μs 0.73 0.02 False Trace Trace
[FooObjIsNull - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x64_Windows 10.0.18362/PerfLabTests.CastingPerf2.CastingPerf.FooObjIsNull.html>) 493.22 μs 374.21 μs 0.76 0.03 False 3435357.1428571427 3229573.1707317075 0.9400982303824494 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.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 367.36249999999995 < 482.91717924347154. IsChangePoint: Marked as a change because one of 11/16/2022 6:51:59 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 117.38438541720575 (T) = (0 -363297.76932463836) / Math.Sqrt((391049018.84072226 / (299)) + (3669068.032293178 / (9))) is greater than 1.9677467375895035 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (9) - 2, .975) and 0.2973586239195702 = (517045.79561089276 - 363297.76932463836) / 517045.79561089276 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 rdi push rsi push rbx sub rsp,20 xor esi,esi mov edi,[7FF7F8B7A564] test edi,edi jle short M00_L03 M00_L00: mov rdx,233540064F0 mov rbx,[rdx] mov rdx,rbx mov rcx,offset MT_PerfLabTests.CastingPerf2.Foo call qword ptr [7FF7F87FB828]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfClass(Void*, System.Object) test rax,rax je short M00_L02 mov rdx,rbx mov rax,rdx test rax,rax je short M00_L01 mov rcx,offset MT_PerfLabTests.CastingPerf2.Foo cmp [rax],rcx je short M00_L01 call qword ptr [7FF7F87FB8B8] M00_L01: mov rcx,23354006540 mov rdx,rax call CORINFO_HELP_ASSIGN_REF M00_L02: inc esi cmp esi,edi jl short M00_L00 M00_L03: add rsp,20 pop rbx pop rsi pop rdi ret ; Total bytes of code 120 ``` ```assembly ; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfClass(Void*, System.Object) mov rax,rdx test rax,rax je short M01_L00 cmp [rax],rcx jne short M01_L01 M01_L00: ret M01_L01: mov rdx,[rax] mov rdx,[rdx+10] M01_L02: cmp rdx,rcx je short M01_L04 test rdx,rdx je short M01_L03 mov rdx,[rdx+10] cmp rdx,rcx je short M01_L04 test rdx,rdx je short M01_L03 mov rdx,[rdx+10] cmp rdx,rcx je short M01_L04 test rdx,rdx je short M01_L03 mov rdx,[rdx+10] cmp rdx,rcx je short M01_L04 test rdx,rdx jne short M01_L05 M01_L03: xor eax,eax M01_L04: ret M01_L05: mov rdx,[rdx+10] jmp short M01_L02 ; Total bytes of code 82 ``` ### Compare Jit Disasm ```assembly ; PerfLabTests.CastingPerf2.CastingPerf.FooObjCastIfIsa() push rdi push rsi push rbp push rbx sub rsp,28 xor esi,esi mov edi,[7FFF8C63F5BC] test edi,edi jle short M00_L03 mov rdx,1AD7D8064F0 mov rbx,[rdx] mov rdx,rbx mov rcx,offset MT_PerfLabTests.CastingPerf2.Foo call qword ptr [7FFF8C2CD828]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfClass(Void*, System.Object) mov rbp,rax M00_L00: test rbp,rbp je short M00_L02 mov rdx,rbx mov rax,rdx test rax,rax je short M00_L01 mov rcx,offset MT_PerfLabTests.CastingPerf2.Foo cmp [rax],rcx je short M00_L01 call qword ptr [7FFF8C2CD8B8] M00_L01: mov rcx,1AD7D806540 mov rdx,rax call CORINFO_HELP_ASSIGN_REF M00_L02: inc esi cmp esi,edi jl short M00_L00 M00_L03: add rsp,28 pop rbx pop rbp pop rsi pop rdi ret ; Total bytes of code 125 ``` ```assembly ; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfClass(Void*, System.Object) mov rax,rdx test rax,rax je short M01_L00 cmp [rax],rcx jne short M01_L01 M01_L00: ret M01_L01: mov rdx,[rax] mov rdx,[rdx+10] M01_L02: cmp rdx,rcx je short M01_L04 test rdx,rdx je short M01_L03 mov rdx,[rdx+10] cmp rdx,rcx je short M01_L04 test rdx,rdx je short M01_L03 mov rdx,[rdx+10] cmp rdx,rcx je short M01_L04 test rdx,rdx je short M01_L03 mov rdx,[rdx+10] cmp rdx,rcx je short M01_L04 test rdx,rdx jne short M01_L05 M01_L03: xor eax,eax M01_L04: ret M01_L05: mov rdx,[rdx+10] jmp short M01_L02 ; Total bytes of code 82 ``` #### PerfLabTests.CastingPerf2.CastingPerf.FooObjIsNull ```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 374.21206597222226 < 471.2412395600818. IsChangePoint: Marked as a change because one of 9/23/2022 1:16:35 AM, 9/29/2022 7:42:19 AM, 10/11/2022 8:42:28 PM, 10/17/2022 3:19:47 PM, 11/2/2022 9:35:40 AM, 11/7/2022 4:10:19 PM, 11/18/2022 8:48:12 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 49.18979156033144 (T) = (0 -374905.9621874929) / Math.Sqrt((886125530.2194716 / (299)) + (678284.4759626735 / (9))) is greater than 1.9677467375895035 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (9) - 2, .975) and 0.18614964742831797 = (460657.12326944293 - 374905.9621874929) / 460657.12326944293 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; PerfLabTests.CastingPerf2.CastingPerf.FooObjIsNull() push rdi push rsi xor esi,esi mov edi,[7FFEB14BA560] test edi,edi jle short M00_L01 M00_L00: mov rdx,1B41E8064E0 mov rdx,[rdx] mov rcx,1B41E8064F0 call CORINFO_HELP_ASSIGN_REF inc esi cmp esi,edi jl short M00_L00 M00_L01: pop rsi pop rdi ret ; Total bytes of code 51 ``` ### Compare Jit Disasm ```assembly ; PerfLabTests.CastingPerf2.CastingPerf.FooObjIsNull() push rdi push rsi push rbp push rbx xor esi,esi mov edi,[7FFA2306F5B8] test edi,edi jle short M00_L01 mov rdx,268508064E0 mov rbx,[rdx] mov rbp,268508064F0 M00_L00: mov rcx,rbp mov rdx,rbx call CORINFO_HELP_ASSIGN_REF inc esi cmp esi,edi jl short M00_L00 M00_L01: pop rbx pop rbp pop rsi pop rdi ret ; Total bytes of code 61 ``` ### Docs [Profiling workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/profiling-workflow-dotnet-runtime.md) [Benchmarking workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/benchmarking-workflow-dotnet-runtime.md)

Run Information

Architecture x64
OS Windows 10.0.18362
Baseline 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
[TypeReflectionArrayGetType - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x64_Windows 10.0.18362/PerfLabTests.LowLevelPerf.TypeReflectionArrayGetType.html>) 187.11 μs 31.20 μs 0.17 0.18 False 1821262.2549019607 402966.5314401623 0.22125673024605352 Trace Trace
[GenericClassWithIntGenericInstanceField - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x64_Windows 10.0.18362/PerfLabTests.LowLevelPerf.GenericClassWithIntGenericInstanceField.html>) 62.37 μs 31.20 μs 0.50 0.01 False 605762.7688172044 402907.36984448956 0.665124023107586 Trace Trace
[ObjectStringIsString - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x64_Windows 10.0.18362/PerfLabTests.LowLevelPerf.ObjectStringIsString.html>) 123.27 μs 93.95 μs 0.76 0.28 False 1309136.9047619046 1208737.3737373739 0.9233086083973848 Trace Trace
[TypeReflectionObjectGetType - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x64_Windows 10.0.18362/PerfLabTests.LowLevelPerf.TypeReflectionObjectGetType.html>) 187.10 μs 31.20 μs 0.17 0.17 False 1821568.6274509805 402932.7248140636 0.2212009576481942 Trace Trace

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.LowLevelPerf*'
### Payloads [Baseline]() [Compare]() ### Histogram #### 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.19692115768463 < 177.76131339905754. 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 123.79546430245746 (T) = (0 -31216.11183291192) / Math.Sqrt((549055083.619704 / (299)) + (2004.9164372679886 / (9))) is greater than 1.9677467375895035 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (9) - 2, .975) and 0.8431208588118903 = (198981.91433545313 - 31216.11183291192) / 198981.91433545313 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; PerfLabTests.LowLevelPerf.TypeReflectionArrayGetType() push rdi push rsi sub rsp,28 xor eax,eax xor esi,esi mov edi,[7FFE57B3A500] test edi,edi jle short M00_L01 nop dword ptr [rax] nop dword ptr [rax+rax] M00_L00: mov rcx,224A6406368 mov rcx,[rcx] call System.Object.GetType() inc esi cmp esi,edi jl short M00_L00 M00_L01: add rsp,28 pop rsi pop rdi ret ; Total bytes of code 63 ``` ### Compare Jit Disasm ```assembly ; PerfLabTests.LowLevelPerf.TypeReflectionArrayGetType() push rdi push rsi sub rsp,28 xor eax,eax xor esi,esi mov edi,[7FF9E63DF558] test edi,edi jle short M00_L01 mov rcx,15979806368 mov rcx,[rcx] call System.Object.GetType() M00_L00: mov rdx,rax inc esi cmp esi,edi jl short M00_L00 mov rax,rdx M00_L01: add rsp,28 pop rsi pop rdi ret ; Total bytes of code 57 ``` #### PerfLabTests.LowLevelPerf.GenericClassWithIntGenericInstanceField ```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.195333499667328 < 59.25322689895181. 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 208.29079666461317 (T) = (0 -31222.801097645173) / Math.Sqrt((6510495.140497611 / (299)) + (3256.7648363752105 / (9))) is greater than 1.9677467375895035 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (9) - 2, .975) and 0.4981284179531659 = (62212.72973916164 - 31222.801097645173) / 62212.72973916164 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; PerfLabTests.LowLevelPerf.GenericClassWithIntGenericInstanceField() xor eax,eax mov edx,[7FF85A4DA500] test edx,edx jle short M00_L01 nop dword ptr [rax] M00_L00: mov rcx,1F737C06350 mov rcx,[rcx] mov dword ptr [rcx+0C],1 inc eax cmp eax,edx jl short M00_L00 M00_L01: ret ; Total bytes of code 43 ``` ### Compare Jit Disasm ```assembly ; PerfLabTests.LowLevelPerf.GenericClassWithIntGenericInstanceField() xor eax,eax mov edx,[7FFD173DF558] test edx,edx jle short M00_L01 mov rcx,22743406350 mov rcx,[rcx] nop dword ptr [rax] M00_L00: mov dword ptr [rcx+0C],1 inc eax cmp eax,edx jl short M00_L00 M00_L01: ret ; Total bytes of code 46 ``` #### PerfLabTests.LowLevelPerf.ObjectStringIsString ```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 93.94604630025663 < 117.18106086884048. 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 66.19349691005026 (T) = (0 -93667.31141955346) / Math.Sqrt((51511700.0927369 / (299)) + (31380.052169063456 / (9))) is greater than 1.9677467375895035 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (9) - 2, .975) and 0.2285589362295664 = (121418.62265116224 - 93667.31141955346) / 121418.62265116224 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; PerfLabTests.LowLevelPerf.ObjectStringIsString() xor eax,eax xor edx,edx mov ecx,[7FF9D3A6A500] test ecx,ecx jle short M00_L02 M00_L00: mov rax,1438B006360 mov rax,[rax] test rax,rax je short M00_L01 mov r8,offset MT_System.String cmp [rax],r8 je short M00_L01 xor eax,eax M00_L01: test rax,rax setne al movzx eax,al inc edx cmp edx,ecx jl short M00_L00 M00_L02: ret ; Total bytes of code 65 ``` ### Compare Jit Disasm ```assembly ; PerfLabTests.LowLevelPerf.ObjectStringIsString() xor eax,eax xor edx,edx mov ecx,[7FF8B8B5F558] test ecx,ecx jle short M00_L02 mov rax,1CA68006360 mov rax,[rax] nop dword ptr [rax+rax] M00_L00: mov r8,rax test r8,r8 je short M00_L01 mov r9,offset MT_System.String cmp [r8],r9 je short M00_L01 xor r8d,r8d M00_L01: test r8,r8 setne r8b movzx r8d,r8b inc edx cmp edx,ecx jl short M00_L00 mov eax,r8d M00_L02: ret ; Total bytes of code 79 ``` #### 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.198915502328678 < 177.7554701450893. 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 125.11155792510878 (T) = (0 -31245.89682416829) / Math.Sqrt((543416205.1634753 / (299)) + (4348.153751696707 / (9))) is greater than 1.9677467375895035 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (9) - 2, .975) and 0.8437193657478655 = (199934.54066585065 - 31245.89682416829) / 199934.54066585065 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; PerfLabTests.LowLevelPerf.TypeReflectionObjectGetType() push rdi push rsi sub rsp,28 xor eax,eax xor esi,esi mov edi,[7FFE10F2A500] test edi,edi jle short M00_L01 nop dword ptr [rax] nop dword ptr [rax+rax] M00_L00: mov rcx,21A07806338 mov rcx,[rcx] call System.Object.GetType() inc esi cmp esi,edi jl short M00_L00 M00_L01: add rsp,28 pop rsi pop rdi ret ; Total bytes of code 63 ``` ### Compare Jit Disasm ```assembly ; PerfLabTests.LowLevelPerf.TypeReflectionObjectGetType() push rdi push rsi sub rsp,28 xor eax,eax xor esi,esi mov edi,[7FFAB808F558] test edi,edi jle short M00_L01 mov rcx,18776006338 mov rcx,[rcx] call System.Object.GetType() M00_L00: mov rdx,rax inc esi cmp esi,edi jl short M00_L00 mov rax,rdx M00_L01: add rsp,28 pop rsi pop rdi ret ; Total bytes of code 57 ``` ### Docs [Profiling workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/profiling-workflow-dotnet-runtime.md) [Benchmarking workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/benchmarking-workflow-dotnet-runtime.md)

Run Information

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

Improvements in System.Memory.ReadOnlySequence

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[Slice_Repeat_StartPosition_And_EndPosition - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x64_Windows 10.0.18362/System.Memory.ReadOnlySequence.Slice_Repeat_StartPosition_And_EndPosition(Segment%3a%20Multiple).html>) 63.70 ns 55.06 ns 0.86 0.04 False 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.Memory.ReadOnlySequence*'
### Payloads [Baseline]() [Compare]() ### Histogram #### System.Memory.ReadOnlySequence.Slice_Repeat_StartPosition_And_EndPosition(Segment: Multiple) ```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 55.05801846468162 < 60.33911297904334. IsChangePoint: Marked as a change because one of 9/20/2022 10:35:57 PM, 10/11/2022 8:42:28 PM, 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 19.25057724117515 (T) = (0 -55.2964280094336) / Math.Sqrt((16.994469512408237 / (299)) + (0.1511841123402313 / (9))) is greater than 1.9677467375895035 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (9) - 2, .975) and 0.08631532203025942 = (60.520253149374696 - 55.2964280094336) / 60.520253149374696 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; System.Memory.ReadOnlySequence.Slice_Repeat_StartPosition_And_EndPosition() push r15 push r14 push r12 push rdi push rsi push rbp push rbx sub rsp,40 vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [rsp+28],xmm4 xor eax,eax mov [rsp+38],rax mov rsi,rdx cmp [rcx],cl lea rdi,[rcx+10] lea rbx,[rcx+28] mov rdx,rbx mov rbp,[rdx] mov r14d,[rdx+8] add rcx,38 mov r15,[rcx] mov r12d,[rcx+8] mov [rsp+20],r15 mov rcx,rdi mov edx,r14d mov r8,rbp mov r9d,r12d call qword ptr [7FF8436ADE88]; System.Buffers.ReadOnlySequence`1[[System.Byte, System.Private.CoreLib]].BoundsCheck(UInt32, System.Object, UInt32, System.Object) mov ecx,[rdi+10] and ecx,80000000 or ecx,r14d mov edx,[rdi+14] and edx,80000000 or edx,r12d mov [rsp+28],rbp mov [rsp+30],r15 mov [rsp+38],ecx mov [rsp+3C],edx mov rcx,rbx mov rdi,[rcx] mov ebp,[rcx+8] mov r14,[rsp+30] mov r15d,[rsp+3C] and r15d,7FFFFFFF mov [rsp+20],r14 lea rcx,[rsp+28] mov edx,ebp mov r8,rdi mov r9d,r15d call qword ptr [7FF8436ADE88]; System.Buffers.ReadOnlySequence`1[[System.Byte, System.Private.CoreLib]].BoundsCheck(UInt32, System.Object, UInt32, System.Object) mov ecx,[rsp+38] and ecx,80000000 or ecx,ebp mov edx,[rsp+3C] and edx,80000000 or edx,r15d mov [rsp+28],rdi mov [rsp+30],r14 mov [rsp+38],ecx mov [rsp+3C],edx mov rcx,rbx mov rdi,[rcx] mov ebp,[rcx+8] mov r14,[rsp+30] mov r15d,[rsp+3C] and r15d,7FFFFFFF mov [rsp+20],r14 lea rcx,[rsp+28] mov edx,ebp mov r8,rdi mov r9d,r15d call qword ptr [7FF8436ADE88]; System.Buffers.ReadOnlySequence`1[[System.Byte, System.Private.CoreLib]].BoundsCheck(UInt32, System.Object, UInt32, System.Object) mov ecx,[rsp+38] and ecx,80000000 or ecx,ebp mov edx,[rsp+3C] and edx,80000000 or edx,r15d mov [rsp+28],rdi mov [rsp+30],r14 mov [rsp+38],ecx mov [rsp+3C],edx mov rcx,rbx mov rdi,[rcx] mov ebp,[rcx+8] mov r14,[rsp+30] mov r15d,[rsp+3C] and r15d,7FFFFFFF mov [rsp+20],r14 lea rcx,[rsp+28] mov edx,ebp mov r8,rdi mov r9d,r15d call qword ptr [7FF8436ADE88]; System.Buffers.ReadOnlySequence`1[[System.Byte, System.Private.CoreLib]].BoundsCheck(UInt32, System.Object, UInt32, System.Object) mov ecx,[rsp+38] and ecx,80000000 or ecx,ebp mov edx,[rsp+3C] and edx,80000000 or edx,r15d mov [rsp+28],rdi mov [rsp+30],r14 mov [rsp+38],ecx mov [rsp+3C],edx mov rdi,[rbx] mov ebx,[rbx+8] mov rbp,[rsp+30] mov r14d,[rsp+3C] and r14d,7FFFFFFF mov [rsp+20],rbp lea rcx,[rsp+28] mov edx,ebx mov r8,rdi mov r9d,r14d call qword ptr [7FF8436ADE88]; System.Buffers.ReadOnlySequence`1[[System.Byte, System.Private.CoreLib]].BoundsCheck(UInt32, System.Object, UInt32, System.Object) mov edx,[rsp+38] and edx,80000000 or edx,ebx mov ecx,[rsp+3C] and ecx,80000000 or ecx,r14d mov [rsp+28],rdi mov [rsp+30],rbp mov [rsp+38],edx mov [rsp+3C],ecx mov rdx,[rsp+28] mov rcx,rsi call CORINFO_HELP_CHECKED_ASSIGN_REF lea rcx,[rsi+8] mov rdx,[rsp+30] call CORINFO_HELP_CHECKED_ASSIGN_REF mov eax,[rsp+38] mov [rsi+10],eax mov eax,[rsp+3C] mov [rsi+14],eax mov rax,rsi add rsp,40 pop rbx pop rbp pop rsi pop rdi pop r12 pop r14 pop r15 ret ; Total bytes of code 558 ``` ```assembly ; System.Buffers.ReadOnlySequence`1[[System.Byte, System.Private.CoreLib]].BoundsCheck(UInt32, System.Object, UInt32, System.Object) push r15 push r14 push r12 push rdi push rsi push rbp push rbx sub rsp,20 mov rsi,[rsp+80] mov rdi,[rcx] mov rbx,[rcx+8] mov ebp,[rcx+10] and ebp,7FFFFFFF mov r14d,[rcx+14] and r14d,7FFFFFFF cmp rdi,rbx jne short M01_L01 cmp r8,rsi jne near ptr M01_L08 cmp r8,rdi jne near ptr M01_L08 cmp edx,r9d ja near ptr M01_L08 cmp edx,ebp jb near ptr M01_L08 cmp r9d,r14d ja near ptr M01_L08 M01_L00: add rsp,20 pop rbx pop rbp pop rsi pop rdi pop r12 pop r14 pop r15 ret M01_L01: mov r15d,edx mov r12d,r9d test r8,r8 je short M01_L03 mov rax,r8 mov rcx,offset MT_System.Buffers.ReadOnlySequenceSegment`1[[System.Byte, System.Private.CoreLib]] cmp [rax],rcx je short M01_L02 mov rdx,r8 call qword ptr [7FF84334B8B8]; System.Runtime.CompilerServices.CastHelpers.ChkCastClassSpecial(Void*, System.Object) M01_L02: add r15,[rax+10] M01_L03: test rsi,rsi je short M01_L05 mov rax,rsi mov rcx,offset MT_System.Buffers.ReadOnlySequenceSegment`1[[System.Byte, System.Private.CoreLib]] cmp [rax],rcx je short M01_L04 mov rdx,rsi call qword ptr [7FF84334B8B8]; System.Runtime.CompilerServices.CastHelpers.ChkCastClassSpecial(Void*, System.Object) M01_L04: add r12,[rax+10] M01_L05: cmp r15,r12 ja short M01_L08 mov rax,rdi test rax,rax je short M01_L06 mov rcx,offset MT_System.Buffers.ReadOnlySequenceSegment`1[[System.Byte, System.Private.CoreLib]] cmp [rax],rcx je short M01_L06 mov rdx,rdi call qword ptr [7FF84334B8B8]; System.Runtime.CompilerServices.CastHelpers.ChkCastClassSpecial(Void*, System.Object) M01_L06: mov ecx,ebp add rcx,[rax+10] cmp rcx,r15 ja short M01_L08 mov rax,rbx test rax,rax je short M01_L07 mov rcx,offset MT_System.Buffers.ReadOnlySequenceSegment`1[[System.Byte, System.Private.CoreLib]] cmp [rax],rcx je short M01_L07 mov rdx,rbx call qword ptr [7FF84334B8B8]; System.Runtime.CompilerServices.CastHelpers.ChkCastClassSpecial(Void*, System.Object) M01_L07: mov edx,r14d add rdx,[rax+10] cmp rdx,r12 jae near ptr M01_L00 M01_L08: call qword ptr [7FF84383D378] int 3 ; Total bytes of code 294 ``` ### Compare Jit Disasm ```assembly ; System.Memory.ReadOnlySequence.Slice_Repeat_StartPosition_And_EndPosition() push r15 push r14 push r12 push rdi push rsi push rbp push rbx sub rsp,40 vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [rsp+28],xmm4 xor eax,eax mov [rsp+38],rax mov rsi,rdx cmp [rcx],cl lea rdi,[rcx+10] lea rbx,[rcx+28] mov rdx,rbx mov rbp,[rdx] mov r14d,[rdx+8] add rcx,38 mov r15,[rcx] mov r12d,[rcx+8] mov [rsp+20],r15 mov rcx,rdi mov edx,r14d mov r8,rbp mov r9d,r12d call qword ptr [7FF8C19D1E88]; System.Buffers.ReadOnlySequence`1[[System.Byte, System.Private.CoreLib]].BoundsCheck(UInt32, System.Object, UInt32, System.Object) mov ecx,[rdi+10] and ecx,80000000 or ecx,r14d mov edx,[rdi+14] and edx,80000000 or edx,r12d mov [rsp+28],rbp mov [rsp+30],r15 mov [rsp+38],ecx mov [rsp+3C],edx mov rcx,rbx mov rdi,[rcx] mov ebp,[rcx+8] mov r14,[rsp+30] mov r15d,[rsp+3C] and r15d,7FFFFFFF mov [rsp+20],r14 lea rcx,[rsp+28] mov edx,ebp mov r8,rdi mov r9d,r15d call qword ptr [7FF8C19D1E88]; System.Buffers.ReadOnlySequence`1[[System.Byte, System.Private.CoreLib]].BoundsCheck(UInt32, System.Object, UInt32, System.Object) mov ecx,[rsp+38] and ecx,80000000 or ecx,ebp mov edx,[rsp+3C] and edx,80000000 or edx,r15d mov [rsp+28],rdi mov [rsp+30],r14 mov [rsp+38],ecx mov [rsp+3C],edx mov rcx,rbx mov rdi,[rcx] mov ebp,[rcx+8] mov r14,[rsp+30] mov r15d,[rsp+3C] and r15d,7FFFFFFF mov [rsp+20],r14 lea rcx,[rsp+28] mov edx,ebp mov r8,rdi mov r9d,r15d call qword ptr [7FF8C19D1E88]; System.Buffers.ReadOnlySequence`1[[System.Byte, System.Private.CoreLib]].BoundsCheck(UInt32, System.Object, UInt32, System.Object) mov ecx,[rsp+38] and ecx,80000000 or ecx,ebp mov edx,[rsp+3C] and edx,80000000 or edx,r15d mov [rsp+28],rdi mov [rsp+30],r14 mov [rsp+38],ecx mov [rsp+3C],edx mov rcx,rbx mov rdi,[rcx] mov ebp,[rcx+8] mov r14,[rsp+30] mov r15d,[rsp+3C] and r15d,7FFFFFFF mov [rsp+20],r14 lea rcx,[rsp+28] mov edx,ebp mov r8,rdi mov r9d,r15d call qword ptr [7FF8C19D1E88]; System.Buffers.ReadOnlySequence`1[[System.Byte, System.Private.CoreLib]].BoundsCheck(UInt32, System.Object, UInt32, System.Object) mov ecx,[rsp+38] and ecx,80000000 or ecx,ebp mov edx,[rsp+3C] and edx,80000000 or edx,r15d mov [rsp+28],rdi mov [rsp+30],r14 mov [rsp+38],ecx mov [rsp+3C],edx mov rdi,[rbx] mov ebx,[rbx+8] mov rbp,[rsp+30] mov r14d,[rsp+3C] and r14d,7FFFFFFF mov [rsp+20],rbp lea rcx,[rsp+28] mov edx,ebx mov r8,rdi mov r9d,r14d call qword ptr [7FF8C19D1E88]; System.Buffers.ReadOnlySequence`1[[System.Byte, System.Private.CoreLib]].BoundsCheck(UInt32, System.Object, UInt32, System.Object) mov edx,[rsp+38] and edx,80000000 or edx,ebx mov ecx,[rsp+3C] and ecx,80000000 or ecx,r14d mov [rsp+28],rdi mov [rsp+30],rbp mov [rsp+38],edx mov [rsp+3C],ecx mov rdx,[rsp+28] mov rcx,rsi call CORINFO_HELP_CHECKED_ASSIGN_REF lea rcx,[rsi+8] mov rdx,[rsp+30] call CORINFO_HELP_CHECKED_ASSIGN_REF mov eax,[rsp+38] mov [rsi+10],eax mov eax,[rsp+3C] mov [rsi+14],eax mov rax,rsi add rsp,40 pop rbx pop rbp pop rsi pop rdi pop r12 pop r14 pop r15 ret ; Total bytes of code 558 ``` ```assembly ; System.Buffers.ReadOnlySequence`1[[System.Byte, System.Private.CoreLib]].BoundsCheck(UInt32, System.Object, UInt32, System.Object) push r15 push r14 push r12 push rdi push rsi push rbp push rbx sub rsp,20 mov rsi,[rsp+80] mov rdi,[rcx] mov rbx,[rcx+8] mov ebp,[rcx+10] and ebp,7FFFFFFF mov r14d,[rcx+14] and r14d,7FFFFFFF cmp rdi,rbx jne short M01_L01 cmp r8,rsi jne near ptr M01_L08 cmp r8,rdi jne near ptr M01_L08 cmp edx,r9d ja near ptr M01_L08 cmp edx,ebp jb near ptr M01_L08 cmp r9d,r14d ja near ptr M01_L08 M01_L00: add rsp,20 pop rbx pop rbp pop rsi pop rdi pop r12 pop r14 pop r15 ret M01_L01: mov r15d,edx mov r12d,r9d test r8,r8 je short M01_L03 mov rax,r8 mov rcx,offset MT_System.Buffers.ReadOnlySequenceSegment`1[[System.Byte, System.Private.CoreLib]] cmp [rax],rcx je short M01_L02 mov rdx,r8 call qword ptr [7FF8C164D8B8]; System.Runtime.CompilerServices.CastHelpers.ChkCastClassSpecial(Void*, System.Object) M01_L02: add r15,[rax+10] M01_L03: test rsi,rsi je short M01_L05 mov rax,rsi mov rcx,offset MT_System.Buffers.ReadOnlySequenceSegment`1[[System.Byte, System.Private.CoreLib]] cmp [rax],rcx je short M01_L04 mov rdx,rsi call qword ptr [7FF8C164D8B8]; System.Runtime.CompilerServices.CastHelpers.ChkCastClassSpecial(Void*, System.Object) M01_L04: add r12,[rax+10] M01_L05: cmp r15,r12 ja short M01_L08 mov rax,rdi test rax,rax je short M01_L06 mov rcx,offset MT_System.Buffers.ReadOnlySequenceSegment`1[[System.Byte, System.Private.CoreLib]] cmp [rax],rcx je short M01_L06 mov rdx,rdi call qword ptr [7FF8C164D8B8]; System.Runtime.CompilerServices.CastHelpers.ChkCastClassSpecial(Void*, System.Object) M01_L06: mov ecx,ebp add rcx,[rax+10] cmp rcx,r15 ja short M01_L08 mov rax,rbx test rax,rax je short M01_L07 mov rcx,offset MT_System.Buffers.ReadOnlySequenceSegment`1[[System.Byte, System.Private.CoreLib]] cmp [rax],rcx je short M01_L07 mov rdx,rbx call qword ptr [7FF8C164D8B8]; System.Runtime.CompilerServices.CastHelpers.ChkCastClassSpecial(Void*, System.Object) M01_L07: mov edx,r14d add rdx,[rax+10] cmp rdx,r12 jae near ptr M01_L00 M01_L08: call qword ptr [7FF8C1B81378] int 3 ; Total bytes of code 294 ``` ### Docs [Profiling workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/profiling-workflow-dotnet-runtime.md) [Benchmarking workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/benchmarking-workflow-dotnet-runtime.md)
performanceautofiler[bot] commented 1 year ago

Run Information

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

Improvements in ByteMark

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[BenchNeuralJagged - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x64_Windows 10.0.18362/ByteMark.BenchNeuralJagged.html>) 793.96 ms 592.34 ms 0.75 0.01 False Trace Trace
[BenchNeural - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x64_Windows 10.0.18362/ByteMark.BenchNeural.html>) 721.10 ms 665.24 ms 0.92 0.01 False 8371533333.333333 7911533333.333333 0.945051882172123 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 'ByteMark*'
### Payloads [Baseline]() [Compare]() ### Histogram #### ByteMark.BenchNeuralJagged ```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 592.3415666666666 < 752.3107101785713. 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 180.14710016954808 (T) = (0 -593350604.6031747) / Math.Sqrt((277564163693754.62 / (299)) + (2477308358143.0767 / (9))) is greater than 1.9677467375895035 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (9) - 2, .975) and 0.24985836005035328 = (790984759.415573 - 593350604.6031747) / 790984759.415573 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; BenchmarkDotNet.Autogenerated.Runnable_0.__ForDisassemblyDiagnoser__() push rbp sub rsp,20 lea rbp,[rsp+20] mov [rbp+10],rcx mov rcx,[rbp+10] cmp dword ptr [rcx+38],0B jne short M00_L00 mov rcx,[rbp+10] call qword ptr [7FFF4F89D7F8] M00_L00: nop add rsp,20 pop rbp ret ; Total bytes of code 41 ``` ### Compare Jit Disasm ```assembly ; BenchmarkDotNet.Autogenerated.Runnable_0.__ForDisassemblyDiagnoser__() push rbp sub rsp,20 lea rbp,[rsp+20] mov [rbp+10],rcx mov rcx,[rbp+10] cmp dword ptr [rcx+38],0B jne short M00_L00 mov rcx,[rbp+10] call qword ptr [7FFB794117F8] M00_L00: nop add rsp,20 pop rbp ret ; Total bytes of code 41 ``` #### ByteMark.BenchNeural ```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 665.2400066666667 < 686.8604341666667. 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 47.71662233101299 (T) = (0 -665749907.0370371) / Math.Sqrt((77218755171910.94 / (299)) + (10947577526957.453 / (9))) is greater than 1.9677467375895035 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (9) - 2, .975) and 0.0800680716879895 = (723694750.1742072 - 665749907.0370371) / 723694750.1742072 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; BenchmarkDotNet.Autogenerated.Runnable_0.__ForDisassemblyDiagnoser__() push rbp sub rsp,20 lea rbp,[rsp+20] mov [rbp+10],rcx mov rcx,[rbp+10] cmp dword ptr [rcx+38],0B jne short M00_L00 mov rcx,[rbp+10] call qword ptr [7FFB1C87D810] M00_L00: nop add rsp,20 pop rbp ret ; Total bytes of code 41 ``` ### Compare Jit Disasm ```assembly ; BenchmarkDotNet.Autogenerated.Runnable_0.__ForDisassemblyDiagnoser__() push rbp sub rsp,20 lea rbp,[rsp+20] mov [rbp+10],rcx mov rcx,[rbp+10] cmp dword ptr [rcx+38],0B jne short M00_L00 mov rcx,[rbp+10] call qword ptr [7FF848E31810] M00_L00: nop add rsp,20 pop rbp ret ; Total bytes of code 41 ``` ### Docs [Profiling workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/profiling-workflow-dotnet-runtime.md) [Benchmarking workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/benchmarking-workflow-dotnet-runtime.md)

Run Information

Architecture x64
OS Windows 10.0.18362
Baseline 02c144afac6efe0f716e64ea0a701e2eec995866
Compare 4ce23f46ed20683a1b6649e9a43e09459007c9d8
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
[ElementAt - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x64_Windows 10.0.18362/System.Linq.Tests.Perf_Enumerable.ElementAt(input%3a%20IList).html>) 8.65 ns 7.34 ns 0.85 0.04 False 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.Linq.Tests.Perf_Enumerable*'
### Payloads [Baseline]() [Compare]() ### Histogram #### System.Linq.Tests.Perf_Enumerable.ElementAt(input: IList) ```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.33906214257796 < 8.211477958894452. IsChangePoint: Marked as a change because one of 9/29/2022 7:42:19 AM, 10/2/2022 11:57:04 PM, 10/11/2022 8:42:28 PM, 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 12.697386875447249 (T) = (0 -7.595600011882016) / Math.Sqrt((0.3775071381941936 / (299)) + (0.009293489496152942 / (9))) is greater than 1.9677467375895035 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (9) - 2, .975) and 0.0741483722514717 = (8.203906310941937 - 7.595600011882016) / 8.203906310941937 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.ElementAt(System.Linq.Tests.LinqTestData) mov rcx,[rdx+8] mov edx,32 jmp qword ptr [7FFCE8A39FD8]; System.Linq.Enumerable.ElementAt[[System.Int32, System.Private.CoreLib]](System.Collections.Generic.IEnumerable`1, Int32) ; Total bytes of code 15 ``` ```assembly ; System.Linq.Enumerable.ElementAt[[System.Int32, System.Private.CoreLib]](System.Collections.Generic.IEnumerable`1, Int32) push rdi push rsi sub rsp,38 mov rsi,rcx mov edi,edx test rsi,rsi je near ptr M01_L03 mov rdx,rsi mov rcx,offset MT_System.Linq.IPartition`1[[System.Int32, System.Private.CoreLib]] call qword ptr [7FFCE851B810]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfInterface(Void*, System.Object) test rax,rax je short M01_L00 lea r8,[rsp+30] mov rcx,rax mov edx,edi mov r11,7FFCE83705B0 call qword ptr [r11] cmp byte ptr [rsp+30],0 je short M01_L02 add rsp,38 pop rsi pop rdi ret M01_L00: mov rdx,rsi mov rcx,offset MT_System.Collections.Generic.IList`1[[System.Int32, System.Private.CoreLib]] call qword ptr [7FFCE851B810]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfInterface(Void*, System.Object) test rax,rax je short M01_L01 mov rcx,rax mov edx,edi mov r11,7FFCE83705A8 call qword ptr [r11] nop add rsp,38 pop rsi pop rdi ret M01_L01: lea r8,[rsp+28] mov rcx,rsi mov edx,edi call qword ptr [7FFCE8A3B000] test eax,eax je short M01_L02 mov eax,[rsp+28] add rsp,38 pop rsi pop rdi ret M01_L02: mov ecx,6 call qword ptr [7FFCE88717B0] int 3 M01_L03: mov ecx,10 call qword ptr [7FFCE8871798] int 3 ; Total bytes of code 186 ``` ### Compare Jit Disasm ```assembly ; System.Linq.Tests.Perf_Enumerable.ElementAt(System.Linq.Tests.LinqTestData) mov rcx,[rdx+8] mov edx,32 jmp qword ptr [7FFD45C49FD8]; System.Linq.Enumerable.ElementAt[[System.Int32, System.Private.CoreLib]](System.Collections.Generic.IEnumerable`1, Int32) ; Total bytes of code 15 ``` ```assembly ; System.Linq.Enumerable.ElementAt[[System.Int32, System.Private.CoreLib]](System.Collections.Generic.IEnumerable`1, Int32) push rdi push rsi sub rsp,38 mov rsi,rcx mov edi,edx test rsi,rsi je near ptr M01_L03 mov rdx,rsi mov rcx,offset MT_System.Linq.IPartition`1[[System.Int32, System.Private.CoreLib]] call qword ptr [7FFD4570D810]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfInterface(Void*, System.Object) test rax,rax je short M01_L00 lea r8,[rsp+30] mov rcx,rax mov edx,edi mov r11,7FFD455605B8 call qword ptr [r11] cmp byte ptr [rsp+30],0 je short M01_L02 add rsp,38 pop rsi pop rdi ret M01_L00: mov rdx,rsi mov rcx,offset MT_System.Collections.Generic.IList`1[[System.Int32, System.Private.CoreLib]] call qword ptr [7FFD4570D810]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfInterface(Void*, System.Object) test rax,rax je short M01_L01 mov rcx,rax mov edx,edi mov r11,7FFD455605B0 call qword ptr [r11] nop add rsp,38 pop rsi pop rdi ret M01_L01: lea r8,[rsp+28] mov rcx,rsi mov edx,edi call qword ptr [7FFD45C4B000] test eax,eax je short M01_L02 mov eax,[rsp+28] add rsp,38 pop rsi pop rdi ret M01_L02: mov ecx,6 call qword ptr [7FFD45A657B0] int 3 M01_L03: mov ecx,10 call qword ptr [7FFD45A65798] int 3 ; Total bytes of code 186 ``` ### Docs [Profiling workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/profiling-workflow-dotnet-runtime.md) [Benchmarking workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/benchmarking-workflow-dotnet-runtime.md)
performanceautofiler[bot] commented 1 year ago

Run Information

Architecture x64
OS Windows 10.0.18362
Baseline 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
[CheckIsInstAnyIsInterfaceNo - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x64_Windows 10.0.18362/PerfLabTests.CastingPerf.CheckIsInstAnyIsInterfaceNo.html>) 281.81 μs 31.34 μs 0.11 0.04 False Trace Trace
[CheckIsInstAnyIsInterfaceYes - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x64_Windows 10.0.18362/PerfLabTests.CastingPerf.CheckIsInstAnyIsInterfaceYes.html>) 280.65 μs 31.21 μs 0.11 0.03 False Trace Trace
[CheckObjIsInterfaceNo - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x64_Windows 10.0.18362/PerfLabTests.CastingPerf.CheckObjIsInterfaceNo.html>) 281.80 μs 31.21 μs 0.11 0.04 False 3023454.301075269 402907.36984448956 0.13326061177812362 Trace Trace
[FooObjCastIfIsa - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x64_Windows 10.0.18362/PerfLabTests.CastingPerf.FooObjCastIfIsa.html>) 614.36 μs 368.37 μs 0.60 0.03 False 4847172.619047619 3228769.841269841 0.6661140617484828 Trace Trace
[CheckArrayIsInterfaceYes - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x64_Windows 10.0.18362/PerfLabTests.CastingPerf.CheckArrayIsInterfaceYes.html>) 353.76 μs 62.39 μs 0.18 0.29 False Trace Trace
[CheckObjIsInterfaceYes - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x64_Windows 10.0.18362/PerfLabTests.CastingPerf.CheckObjIsInterfaceYes.html>) 280.64 μs 31.33 μs 0.11 0.04 False 2320481.220657277 402941.17647058825 0.17364552355931373 Trace Trace
[CheckArrayIsInterfaceNo - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x64_Windows 10.0.18362/PerfLabTests.CastingPerf.CheckArrayIsInterfaceNo.html>) 366.05 μs 62.66 μs 0.17 0.22 False 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.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.33769234898368 < 266.64279433062285. IsChangePoint: Marked as a change because one of 11/13/2022 8:13:15 AM, 11/13/2022 11:44:30 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 55.050372388967034 (T) = (0 -58927.17003934511) / Math.Sqrt((611683715.3678888 / (299)) + (107040854.3731139 / (9))) is greater than 1.9677467375895035 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (9) - 2, .975) and 0.7771784246104657 = (264458.995662019 - 58927.17003934511) / 264458.995662019 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; PerfLabTests.CastingPerf.CheckIsInstAnyIsInterfaceNo() push rdi push rsi sub rsp,28 xor eax,eax xor esi,esi mov edi,[7FFD575EA4F0] test edi,edi jle short M00_L01 M00_L00: mov rdx,1E27CC062E0 mov rdx,[rdx] mov rcx,offset MT_PerfLabTests.IMyInterface2 call qword ptr [7FFD5726B810]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfInterface(Void*, System.Object) test rax,rax setne al movzx eax,al inc esi cmp esi,edi jl short M00_L00 M00_L01: add rsp,28 pop rsi pop rdi ret ; Total bytes of code 71 ``` ```assembly ; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfInterface(Void*, System.Object) test rdx,rdx je short M01_L03 mov rax,[rdx] movzx r8d,word ptr [rax+0E] test r8,r8 je short M01_L02 mov r9,[rax+38] cmp r8,4 jl short M01_L01 M01_L00: cmp [r9],rcx je short M01_L03 cmp [r9+8],rcx je short M01_L03 cmp [r9+10],rcx je short M01_L03 cmp [r9+18],rcx je short M01_L03 add r9,20 add r8,0FFFFFFFFFFFFFFFC cmp r8,4 jge short M01_L00 test r8,r8 je short M01_L02 M01_L01: cmp [r9],rcx je short M01_L03 add r9,8 dec r8 test r8,r8 jg short M01_L01 M01_L02: test dword ptr [rax],406C0000 jne short M01_L04 xor edx,edx M01_L03: mov rax,rdx ret M01_L04: jmp qword ptr [7FFD5726B840] ; Total bytes of code 107 ``` ### Compare Jit Disasm ```assembly ; PerfLabTests.CastingPerf.CheckIsInstAnyIsInterfaceNo() push rdi push rsi sub rsp,28 xor eax,eax xor esi,esi mov edi,[7FFB268AF548] test edi,edi jle short M00_L01 mov rdx,189404062E0 mov rdx,[rdx] mov rcx,offset MT_PerfLabTests.IMyInterface2 call qword ptr [7FFB2653D810]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfInterface(Void*, System.Object) test rax,rax setne al movzx eax,al M00_L00: mov edx,eax inc esi cmp esi,edi jl short M00_L00 mov eax,edx M00_L01: add rsp,28 pop rsi pop rdi ret ; Total bytes of code 75 ``` ```assembly ; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfInterface(Void*, System.Object) test rdx,rdx je short M01_L03 mov rax,[rdx] movzx r8d,word ptr [rax+0E] test r8,r8 je short M01_L02 mov r9,[rax+38] cmp r8,4 jl short M01_L01 M01_L00: cmp [r9],rcx je short M01_L03 cmp [r9+8],rcx je short M01_L03 cmp [r9+10],rcx je short M01_L03 cmp [r9+18],rcx je short M01_L03 add r9,20 add r8,0FFFFFFFFFFFFFFFC cmp r8,4 jge short M01_L00 test r8,r8 je short M01_L02 M01_L01: cmp [r9],rcx je short M01_L03 add r9,8 dec r8 test r8,r8 jg short M01_L01 M01_L02: test dword ptr [rax],406C0000 jne short M01_L04 xor edx,edx M01_L03: mov rax,rdx ret M01_L04: jmp qword ptr [7FFB2653D840] ; Total bytes of code 107 ``` #### 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.205808575157373 < 267.16965064306976. IsChangePoint: Marked as a change because one of 9/23/2022 1:16:35 AM, 11/13/2022 11:44:30 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 46.86114547220852 (T) = (0 -58970.326462924066) / Math.Sqrt((1290111792.3615973 / (299)) + (108415810.27136162 / (9))) is greater than 1.9677467375895035 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (9) - 2, .975) and 0.7627115445385673 = (248517.46937393126 - 58970.326462924066) / 248517.46937393126 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; PerfLabTests.CastingPerf.CheckIsInstAnyIsInterfaceYes() push rdi push rsi sub rsp,28 xor eax,eax xor esi,esi mov edi,[7FF97227A4F0] test edi,edi jle short M00_L01 M00_L00: mov rdx,29711C062E0 mov rdx,[rdx] mov rcx,offset MT_PerfLabTests.IMyInterface1 call qword ptr [7FF971EFB810]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfInterface(Void*, System.Object) test rax,rax setne al movzx eax,al inc esi cmp esi,edi jl short M00_L00 M00_L01: add rsp,28 pop rsi pop rdi ret ; Total bytes of code 71 ``` ```assembly ; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfInterface(Void*, System.Object) test rdx,rdx je short M01_L03 mov rax,[rdx] movzx r8d,word ptr [rax+0E] test r8,r8 je short M01_L02 mov r9,[rax+38] cmp r8,4 jl short M01_L01 M01_L00: cmp [r9],rcx je short M01_L03 cmp [r9+8],rcx je short M01_L03 cmp [r9+10],rcx je short M01_L03 cmp [r9+18],rcx je short M01_L03 add r9,20 add r8,0FFFFFFFFFFFFFFFC cmp r8,4 jge short M01_L00 test r8,r8 je short M01_L02 M01_L01: cmp [r9],rcx je short M01_L03 add r9,8 dec r8 test r8,r8 jg short M01_L01 M01_L02: test dword ptr [rax],406C0000 jne short M01_L04 xor edx,edx M01_L03: mov rax,rdx ret M01_L04: jmp qword ptr [7FF971EFB840] ; Total bytes of code 107 ``` ### Compare Jit Disasm ```assembly ; PerfLabTests.CastingPerf.CheckIsInstAnyIsInterfaceYes() push rdi push rsi sub rsp,28 xor eax,eax xor esi,esi mov edi,[7FFC3C36F548] test edi,edi jle short M00_L01 mov rdx,1D6928062E0 mov rdx,[rdx] mov rcx,offset MT_PerfLabTests.IMyInterface1 call qword ptr [7FFC3BFFD810]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfInterface(Void*, System.Object) test rax,rax setne al movzx eax,al M00_L00: mov edx,eax inc esi cmp esi,edi jl short M00_L00 mov eax,edx M00_L01: add rsp,28 pop rsi pop rdi ret ; Total bytes of code 75 ``` ```assembly ; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfInterface(Void*, System.Object) test rdx,rdx je short M01_L03 mov rax,[rdx] movzx r8d,word ptr [rax+0E] test r8,r8 je short M01_L02 mov r9,[rax+38] cmp r8,4 jl short M01_L01 M01_L00: cmp [r9],rcx je short M01_L03 cmp [r9+8],rcx je short M01_L03 cmp [r9+10],rcx je short M01_L03 cmp [r9+18],rcx je short M01_L03 add r9,20 add r8,0FFFFFFFFFFFFFFFC cmp r8,4 jge short M01_L00 test r8,r8 je short M01_L02 M01_L01: cmp [r9],rcx je short M01_L03 add r9,8 dec r8 test r8,r8 jg short M01_L01 M01_L02: test dword ptr [rax],406C0000 jne short M01_L04 xor edx,edx M01_L03: mov rax,rdx ret M01_L04: jmp qword ptr [7FFC3BFFD840] ; Total bytes of code 107 ``` #### 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.209542453554427 < 266.6280945226648. IsChangePoint: Marked as a change because one of 11/13/2022 8:13:15 AM, 11/13/2022 11:44:30 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 54.577763738603885 (T) = (0 -59053.24894103669) / Math.Sqrt((610568714.0606414 / (299)) + (109051985.20298935 / (9))) is greater than 1.9677467375895035 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (9) - 2, .975) and 0.7766690365048149 = (264420.33839302295 - 59053.24894103669) / 264420.33839302295 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; PerfLabTests.CastingPerf.CheckObjIsInterfaceNo() push rdi push rsi sub rsp,28 xor eax,eax xor esi,esi mov edi,[7FFB3A8CA4F0] test edi,edi jle short M00_L01 M00_L00: mov rdx,2316C8062D8 mov rdx,[rdx] mov rcx,offset MT_PerfLabTests.IMyInterface1 call qword ptr [7FFB3A54B810]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfInterface(Void*, System.Object) test rax,rax setne al movzx eax,al inc esi cmp esi,edi jl short M00_L00 M00_L01: add rsp,28 pop rsi pop rdi ret ; Total bytes of code 71 ``` ```assembly ; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfInterface(Void*, System.Object) test rdx,rdx je short M01_L03 mov rax,[rdx] movzx r8d,word ptr [rax+0E] test r8,r8 je short M01_L02 mov r9,[rax+38] cmp r8,4 jl short M01_L01 M01_L00: cmp [r9],rcx je short M01_L03 cmp [r9+8],rcx je short M01_L03 cmp [r9+10],rcx je short M01_L03 cmp [r9+18],rcx je short M01_L03 add r9,20 add r8,0FFFFFFFFFFFFFFFC cmp r8,4 jge short M01_L00 test r8,r8 je short M01_L02 M01_L01: cmp [r9],rcx je short M01_L03 add r9,8 dec r8 test r8,r8 jg short M01_L01 M01_L02: test dword ptr [rax],406C0000 jne short M01_L04 xor edx,edx M01_L03: mov rax,rdx ret M01_L04: jmp qword ptr [7FFB3A54B840] ; Total bytes of code 107 ``` ### Compare Jit Disasm ```assembly ; PerfLabTests.CastingPerf.CheckObjIsInterfaceNo() push rdi push rsi sub rsp,28 xor eax,eax xor esi,esi mov edi,[7FFD1550F548] test edi,edi jle short M00_L01 mov rdx,18DC50062D8 mov rdx,[rdx] mov rcx,offset MT_PerfLabTests.IMyInterface1 call qword ptr [7FFD1519D810]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfInterface(Void*, System.Object) test rax,rax setne al movzx eax,al M00_L00: mov edx,eax inc esi cmp esi,edi jl short M00_L00 mov eax,edx M00_L01: add rsp,28 pop rsi pop rdi ret ; Total bytes of code 75 ``` ```assembly ; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfInterface(Void*, System.Object) test rdx,rdx je short M01_L03 mov rax,[rdx] movzx r8d,word ptr [rax+0E] test r8,r8 je short M01_L02 mov r9,[rax+38] cmp r8,4 jl short M01_L01 M01_L00: cmp [r9],rcx je short M01_L03 cmp [r9+8],rcx je short M01_L03 cmp [r9+10],rcx je short M01_L03 cmp [r9+18],rcx je short M01_L03 add r9,20 add r8,0FFFFFFFFFFFFFFFC cmp r8,4 jge short M01_L00 test r8,r8 je short M01_L02 M01_L01: cmp [r9],rcx je short M01_L03 add r9,8 dec r8 test r8,r8 jg short M01_L01 M01_L02: test dword ptr [rax],406C0000 jne short M01_L04 xor edx,edx M01_L03: mov rax,rdx ret M01_L04: jmp qword ptr [7FFD1519D840] ; Total bytes of code 107 ``` #### 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 368.37019379844963 < 573.621659684066. IsChangePoint: Marked as a change because one of 9/20/2022 10:35:57 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 119.1456381028242 (T) = (0 -363197.9905330229) / Math.Sqrt((618660157.8142772 / (299)) + (11196168.542217774 / (9))) is greater than 1.9677467375895035 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (9) - 2, .975) and 0.3738683518397808 = (580066.4949619111 - 363197.9905330229) / 580066.4949619111 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; PerfLabTests.CastingPerf.FooObjCastIfIsa() push rdi push rsi push rbx sub rsp,20 xor esi,esi mov edi,[7FFB2DA1A4F0] test edi,edi jle short M00_L03 M00_L00: mov rdx,2A5EFC062A8 mov rbx,[rdx] mov rdx,rbx mov rcx,offset MT_PerfLabTests.Foo[] call qword ptr [7FFB2D69B7F8]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfAny(Void*, System.Object) test rax,rax je short M00_L02 mov rdx,rbx mov rax,rdx test rax,rax je short M00_L01 mov rcx,offset MT_PerfLabTests.Foo[] cmp [rax],rcx je short M00_L01 call qword ptr [7FFB2D69B858]; System.Runtime.CompilerServices.CastHelpers.ChkCastAny(Void*, System.Object) M00_L01: mov rcx,2A5EFC062B8 mov rdx,rax call CORINFO_HELP_ASSIGN_REF M00_L02: inc esi cmp esi,edi jl short M00_L00 M00_L03: add rsp,20 pop rbx pop rsi pop rdi ret ; Total bytes of code 120 ``` ```assembly ; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfAny(Void*, System.Object) push rdi push rsi test rdx,rdx je near ptr M01_L04 mov rax,[rdx] cmp rax,rcx je near ptr M01_L04 mov r8,2A5EFC00D08 mov r8,[r8] add r8,10 rorx r9,rax,20 xor r9,rcx mov r10,9E3779B97F4A7C15 imul r9,r10 mov r10d,[r8] shrx r9,r9,r10 xor r10d,r10d M01_L00: lea r11d,[r9+1] movsxd r11,r11d lea r11,[r11+r11*2] lea r11,[r8+r11*8] mov esi,[r11] mov rdi,[r11+8] and esi,0FFFFFFFE cmp rdi,rax jne short M01_L01 mov rdi,[r11+10] xor rdi,rcx cmp rdi,1 jbe short M01_L02 M01_L01: test esi,esi je short M01_L06 inc r10d add r9d,r10d and r9d,[r8+4] cmp r10d,8 jl short M01_L00 jmp short M01_L06 M01_L02: cmp esi,[r11] jne short M01_L06 mov eax,edi M01_L03: cmp eax,1 je short M01_L04 test eax,eax jne short M01_L05 xor edx,edx M01_L04: mov rax,rdx pop rsi pop rdi ret M01_L05: pop rsi pop rdi jmp near ptr System.Runtime.CompilerServices.CastHelpers.IsInstanceOfAny_NoCacheLookup(Void*, System.Object) M01_L06: mov eax,2 jmp short M01_L03 ; Total bytes of code 177 ``` ```assembly ; System.Runtime.CompilerServices.CastHelpers.ChkCastAny(Void*, System.Object) push rdi push rsi sub rsp,28 test rdx,rdx je near ptr M02_L03 mov rax,[rdx] cmp rax,rcx je near ptr M02_L03 mov r8,2A5EFC00D08 mov r8,[r8] add r8,10 rorx r9,rax,20 xor r9,rcx mov r10,9E3779B97F4A7C15 imul r9,r10 mov r10d,[r8] shrx r9,r9,r10 xor r10d,r10d M02_L00: lea r11d,[r9+1] movsxd r11,r11d lea r11,[r11+r11*2] lea r11,[r8+r11*8] mov esi,[r11] mov rdi,[r11+8] and esi,0FFFFFFFE cmp rdi,rax jne short M02_L01 mov rdi,[r11+10] xor rdi,rcx cmp rdi,1 jbe short M02_L02 M02_L01: test esi,esi je short M02_L04 inc r10d add r9d,r10d and r9d,[r8+4] cmp r10d,8 jl short M02_L00 jmp short M02_L04 M02_L02: cmp esi,[r11] jne short M02_L04 mov eax,edi cmp eax,1 jne short M02_L04 M02_L03: mov rax,rdx add rsp,28 pop rsi pop rdi ret M02_L04: call System.Runtime.CompilerServices.CastHelpers.ChkCastAny_NoCacheLookup(Void*, System.Object) nop add rsp,28 pop rsi pop rdi ret ; Total bytes of code 178 ``` ### Compare Jit Disasm ```assembly ; PerfLabTests.CastingPerf.FooObjCastIfIsa() push rdi push rsi push rbp push rbx sub rsp,28 xor esi,esi mov edi,[7FF8B8B4F548] test edi,edi jle short M00_L03 mov rdx,231954062A8 mov rbx,[rdx] mov rdx,rbx mov rcx,offset MT_PerfLabTests.Foo[] call qword ptr [7FF8B87DD7F8]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfAny(Void*, System.Object) mov rbp,rax M00_L00: test rbp,rbp je short M00_L02 mov rdx,rbx mov rax,rdx test rax,rax je short M00_L01 mov rcx,offset MT_PerfLabTests.Foo[] cmp [rax],rcx je short M00_L01 call qword ptr [7FF8B87DD858]; System.Runtime.CompilerServices.CastHelpers.ChkCastAny(Void*, System.Object) M00_L01: mov rcx,231954062B8 mov rdx,rax call CORINFO_HELP_ASSIGN_REF M00_L02: inc esi cmp esi,edi jl short M00_L00 M00_L03: add rsp,28 pop rbx pop rbp pop rsi pop rdi ret ; Total bytes of code 125 ``` ```assembly ; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfAny(Void*, System.Object) push rdi push rsi test rdx,rdx je near ptr M01_L04 mov rax,[rdx] cmp rax,rcx je near ptr M01_L04 mov r8,23195400D08 mov r8,[r8] add r8,10 rorx r9,rax,20 xor r9,rcx mov r10,9E3779B97F4A7C15 imul r9,r10 mov r10d,[r8] shrx r9,r9,r10 xor r10d,r10d M01_L00: lea r11d,[r9+1] movsxd r11,r11d lea r11,[r11+r11*2] lea r11,[r8+r11*8] mov esi,[r11] mov rdi,[r11+8] and esi,0FFFFFFFE cmp rdi,rax jne short M01_L01 mov rdi,[r11+10] xor rdi,rcx cmp rdi,1 jbe short M01_L02 M01_L01: test esi,esi je short M01_L06 inc r10d add r9d,r10d and r9d,[r8+4] cmp r10d,8 jl short M01_L00 jmp short M01_L06 M01_L02: cmp esi,[r11] jne short M01_L06 mov eax,edi M01_L03: cmp eax,1 je short M01_L04 test eax,eax jne short M01_L05 xor edx,edx M01_L04: mov rax,rdx pop rsi pop rdi ret M01_L05: pop rsi pop rdi jmp near ptr System.Runtime.CompilerServices.CastHelpers.IsInstanceOfAny_NoCacheLookup(Void*, System.Object) M01_L06: mov eax,2 jmp short M01_L03 ; Total bytes of code 177 ``` ```assembly ; System.Runtime.CompilerServices.CastHelpers.ChkCastAny(Void*, System.Object) push rdi push rsi sub rsp,28 test rdx,rdx je near ptr M02_L03 mov rax,[rdx] cmp rax,rcx je near ptr M02_L03 mov r8,23195400D08 mov r8,[r8] add r8,10 rorx r9,rax,20 xor r9,rcx mov r10,9E3779B97F4A7C15 imul r9,r10 mov r10d,[r8] shrx r9,r9,r10 xor r10d,r10d M02_L00: lea r11d,[r9+1] movsxd r11,r11d lea r11,[r11+r11*2] lea r11,[r8+r11*8] mov esi,[r11] mov rdi,[r11+8] and esi,0FFFFFFFE cmp rdi,rax jne short M02_L01 mov rdi,[r11+10] xor rdi,rcx cmp rdi,1 jbe short M02_L02 M02_L01: test esi,esi je short M02_L04 inc r10d add r9d,r10d and r9d,[r8+4] cmp r10d,8 jl short M02_L00 jmp short M02_L04 M02_L02: cmp esi,[r11] jne short M02_L04 mov eax,edi cmp eax,1 jne short M02_L04 M02_L03: mov rax,rdx add rsp,28 pop rsi pop rdi ret M02_L04: call System.Runtime.CompilerServices.CastHelpers.ChkCastAny_NoCacheLookup(Void*, System.Object) nop add rsp,28 pop rsi pop rdi ret ; Total bytes of code 178 ``` #### 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 62.39101273477518 < 329.38352779732116. IsChangePoint: Marked as a change because one of 9/22/2022 3:11:11 PM, 9/23/2022 1:16:35 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 50.03885909175768 (T) = (0 -34689.21750091467) / Math.Sqrt((12892203435.389101 / (299)) + (107914153.15388745 / (9))) is greater than 1.9677467375895035 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (9) - 2, .975) and 0.914590589382534 = (406152.17047078896 - 34689.21750091467) / 406152.17047078896 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; PerfLabTests.CastingPerf.CheckArrayIsInterfaceYes() push rdi push rsi sub rsp,28 xor eax,eax xor esi,esi mov edi,[7FF9E63DA4F0] test edi,edi jle short M00_L01 M00_L00: mov rdx,17FE88062E8 mov rdx,[rdx] mov rcx,offset MT_PerfLabTests.IMyInterface1[] call qword ptr [7FF9E605B7F8]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfAny(Void*, System.Object) test rax,rax setne al movzx eax,al inc esi cmp esi,edi jl short M00_L00 M00_L01: add rsp,28 pop rsi pop rdi ret ; Total bytes of code 71 ``` ```assembly ; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfAny(Void*, System.Object) push rdi push rsi test rdx,rdx je near ptr M01_L04 mov rax,[rdx] cmp rax,rcx je near ptr M01_L04 mov r8,17FE8800D08 mov r8,[r8] add r8,10 rorx r9,rax,20 xor r9,rcx mov r10,9E3779B97F4A7C15 imul r9,r10 mov r10d,[r8] shrx r9,r9,r10 xor r10d,r10d M01_L00: lea r11d,[r9+1] movsxd r11,r11d lea r11,[r11+r11*2] lea r11,[r8+r11*8] mov esi,[r11] mov rdi,[r11+8] and esi,0FFFFFFFE cmp rdi,rax jne short M01_L01 mov rdi,[r11+10] xor rdi,rcx cmp rdi,1 jbe short M01_L02 M01_L01: test esi,esi je short M01_L06 inc r10d add r9d,r10d and r9d,[r8+4] cmp r10d,8 jl short M01_L00 jmp short M01_L06 M01_L02: cmp esi,[r11] jne short M01_L06 mov eax,edi M01_L03: cmp eax,1 je short M01_L04 test eax,eax jne short M01_L05 xor edx,edx M01_L04: mov rax,rdx pop rsi pop rdi ret M01_L05: pop rsi pop rdi jmp near ptr System.Runtime.CompilerServices.CastHelpers.IsInstanceOfAny_NoCacheLookup(Void*, System.Object) M01_L06: mov eax,2 jmp short M01_L03 ; Total bytes of code 177 ``` ### Compare Jit Disasm ```assembly ; PerfLabTests.CastingPerf.CheckArrayIsInterfaceYes() push rdi push rsi sub rsp,28 xor eax,eax xor esi,esi mov edi,[7FFC3BE4F548] test edi,edi jle short M00_L01 mov rdx,261AC8062E8 mov rdx,[rdx] mov rcx,offset MT_PerfLabTests.IMyInterface1[] call qword ptr [7FFC3BADD7F8]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfAny(Void*, System.Object) test rax,rax setne al movzx eax,al M00_L00: mov edx,eax inc esi cmp esi,edi jl short M00_L00 mov eax,edx M00_L01: add rsp,28 pop rsi pop rdi ret ; Total bytes of code 75 ``` ```assembly ; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfAny(Void*, System.Object) push rdi push rsi test rdx,rdx je near ptr M01_L04 mov rax,[rdx] cmp rax,rcx je near ptr M01_L04 mov r8,261AC800D08 mov r8,[r8] add r8,10 rorx r9,rax,20 xor r9,rcx mov r10,9E3779B97F4A7C15 imul r9,r10 mov r10d,[r8] shrx r9,r9,r10 xor r10d,r10d M01_L00: lea r11d,[r9+1] movsxd r11,r11d lea r11,[r11+r11*2] lea r11,[r8+r11*8] mov esi,[r11] mov rdi,[r11+8] and esi,0FFFFFFFE cmp rdi,rax jne short M01_L01 mov rdi,[r11+10] xor rdi,rcx cmp rdi,1 jbe short M01_L02 M01_L01: test esi,esi je short M01_L06 inc r10d add r9d,r10d and r9d,[r8+4] cmp r10d,8 jl short M01_L00 jmp short M01_L06 M01_L02: cmp esi,[r11] jne short M01_L06 mov eax,edi M01_L03: cmp eax,1 je short M01_L04 test eax,eax jne short M01_L05 xor edx,edx M01_L04: mov rax,rdx pop rsi pop rdi ret M01_L05: pop rsi pop rdi jmp near ptr System.Runtime.CompilerServices.CastHelpers.IsInstanceOfAny_NoCacheLookup(Void*, System.Object) M01_L06: mov eax,2 jmp short M01_L03 ; Total bytes of code 177 ``` #### 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.334274382097526 < 266.62146893601187. IsChangePoint: Marked as a change because one of 9/23/2022 1:16:35 AM, 11/13/2022 11:44:30 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 47.313688561190695 (T) = (0 -58955.0094716364) / Math.Sqrt((1290358303.4003317 / (299)) + (107290826.53171758 / (9))) is greater than 1.9677467375895035 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (9) - 2, .975) and 0.7638067793721283 = (249605.00269616747 - 58955.0094716364) / 249605.00269616747 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; PerfLabTests.CastingPerf.CheckObjIsInterfaceYes() push rdi push rsi sub rsp,28 xor eax,eax xor esi,esi mov edi,[7FFD2089A4F0] test edi,edi jle short M00_L01 M00_L00: mov rdx,204AD0062D0 mov rdx,[rdx] mov rcx,offset MT_PerfLabTests.IMyInterface1 call qword ptr [7FFD2051B810]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfInterface(Void*, System.Object) test rax,rax setne al movzx eax,al inc esi cmp esi,edi jl short M00_L00 M00_L01: add rsp,28 pop rsi pop rdi ret ; Total bytes of code 71 ``` ```assembly ; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfInterface(Void*, System.Object) test rdx,rdx je short M01_L03 mov rax,[rdx] movzx r8d,word ptr [rax+0E] test r8,r8 je short M01_L02 mov r9,[rax+38] cmp r8,4 jl short M01_L01 M01_L00: cmp [r9],rcx je short M01_L03 cmp [r9+8],rcx je short M01_L03 cmp [r9+10],rcx je short M01_L03 cmp [r9+18],rcx je short M01_L03 add r9,20 add r8,0FFFFFFFFFFFFFFFC cmp r8,4 jge short M01_L00 test r8,r8 je short M01_L02 M01_L01: cmp [r9],rcx je short M01_L03 add r9,8 dec r8 test r8,r8 jg short M01_L01 M01_L02: test dword ptr [rax],406C0000 jne short M01_L04 xor edx,edx M01_L03: mov rax,rdx ret M01_L04: jmp qword ptr [7FFD2051B840] ; Total bytes of code 107 ``` ### Compare Jit Disasm ```assembly ; PerfLabTests.CastingPerf.CheckObjIsInterfaceYes() push rdi push rsi sub rsp,28 xor eax,eax xor esi,esi mov edi,[7FFCE889F548] test edi,edi jle short M00_L01 mov rdx,1AFA3C062D0 mov rdx,[rdx] mov rcx,offset MT_PerfLabTests.IMyInterface1 call qword ptr [7FFCE852D810]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfInterface(Void*, System.Object) test rax,rax setne al movzx eax,al M00_L00: mov edx,eax inc esi cmp esi,edi jl short M00_L00 mov eax,edx M00_L01: add rsp,28 pop rsi pop rdi ret ; Total bytes of code 75 ``` ```assembly ; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfInterface(Void*, System.Object) test rdx,rdx je short M01_L03 mov rax,[rdx] movzx r8d,word ptr [rax+0E] test r8,r8 je short M01_L02 mov r9,[rax+38] cmp r8,4 jl short M01_L01 M01_L00: cmp [r9],rcx je short M01_L03 cmp [r9+8],rcx je short M01_L03 cmp [r9+10],rcx je short M01_L03 cmp [r9+18],rcx je short M01_L03 add r9,20 add r8,0FFFFFFFFFFFFFFFC cmp r8,4 jge short M01_L00 test r8,r8 je short M01_L02 M01_L01: cmp [r9],rcx je short M01_L03 add r9,8 dec r8 test r8,r8 jg short M01_L01 M01_L02: test dword ptr [rax],406C0000 jne short M01_L04 xor edx,edx M01_L03: mov rax,rdx ret M01_L04: jmp qword ptr [7FFCE852D840] ; Total bytes of code 107 ``` #### 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 62.65530535714285 < 353.65793973214284. IsChangePoint: Marked as a change because one of 10/11/2022 6:23:40 AM, 10/11/2022 8:42:28 PM, 11/19/2022 5:43:40 PM, 11/21/2022 12:41:05 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 48.11708260990384 (T) = (0 -34726.89186590957) / Math.Sqrt((14149242812.037834 / (299)) + (109688772.01830614 / (9))) is greater than 1.9677467375895035 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (9) - 2, .975) and 0.9144475969081579 = (405913.6927881453 - 34726.89186590957) / 405913.6927881453 is greater than 0.05. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; PerfLabTests.CastingPerf.CheckArrayIsInterfaceNo() push rdi push rsi sub rsp,28 xor eax,eax xor esi,esi mov edi,[7FFD173BA4F0] test edi,edi jle short M00_L01 M00_L00: mov rdx,25C4B8062F0 mov rdx,[rdx] mov rcx,offset MT_PerfLabTests.IMyInterface1[] call qword ptr [7FFD1703B7F8]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfAny(Void*, System.Object) test rax,rax setne al movzx eax,al inc esi cmp esi,edi jl short M00_L00 M00_L01: add rsp,28 pop rsi pop rdi ret ; Total bytes of code 71 ``` ```assembly ; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfAny(Void*, System.Object) push rdi push rsi test rdx,rdx je near ptr M01_L04 mov rax,[rdx] cmp rax,rcx je near ptr M01_L04 mov r8,25C4B800D08 mov r8,[r8] add r8,10 rorx r9,rax,20 xor r9,rcx mov r10,9E3779B97F4A7C15 imul r9,r10 mov r10d,[r8] shrx r9,r9,r10 xor r10d,r10d M01_L00: lea r11d,[r9+1] movsxd r11,r11d lea r11,[r11+r11*2] lea r11,[r8+r11*8] mov esi,[r11] mov rdi,[r11+8] and esi,0FFFFFFFE cmp rdi,rax jne short M01_L01 mov rdi,[r11+10] xor rdi,rcx cmp rdi,1 jbe short M01_L02 M01_L01: test esi,esi je short M01_L06 inc r10d add r9d,r10d and r9d,[r8+4] cmp r10d,8 jl short M01_L00 jmp short M01_L06 M01_L02: cmp esi,[r11] jne short M01_L06 mov eax,edi M01_L03: cmp eax,1 je short M01_L04 test eax,eax jne short M01_L05 xor edx,edx M01_L04: mov rax,rdx pop rsi pop rdi ret M01_L05: pop rsi pop rdi jmp near ptr System.Runtime.CompilerServices.CastHelpers.IsInstanceOfAny_NoCacheLookup(Void*, System.Object) M01_L06: mov eax,2 jmp short M01_L03 ; Total bytes of code 177 ``` ### Compare Jit Disasm ```assembly ; PerfLabTests.CastingPerf.CheckArrayIsInterfaceNo() push rdi push rsi sub rsp,28 xor eax,eax xor esi,esi mov edi,[7FF998E8F548] test edi,edi jle short M00_L01 mov rdx,25A428062F0 mov rdx,[rdx] mov rcx,offset MT_PerfLabTests.IMyInterface1[] call qword ptr [7FF998B1D7F8]; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfAny(Void*, System.Object) test rax,rax setne al movzx eax,al M00_L00: mov edx,eax inc esi cmp esi,edi jl short M00_L00 mov eax,edx M00_L01: add rsp,28 pop rsi pop rdi ret ; Total bytes of code 75 ``` ```assembly ; System.Runtime.CompilerServices.CastHelpers.IsInstanceOfAny(Void*, System.Object) push rdi push rsi test rdx,rdx je near ptr M01_L04 mov rax,[rdx] cmp rax,rcx je near ptr M01_L04 mov r8,25A42800D08 mov r8,[r8] add r8,10 rorx r9,rax,20 xor r9,rcx mov r10,9E3779B97F4A7C15 imul r9,r10 mov r10d,[r8] shrx r9,r9,r10 xor r10d,r10d M01_L00: lea r11d,[r9+1] movsxd r11,r11d lea r11,[r11+r11*2] lea r11,[r8+r11*8] mov esi,[r11] mov rdi,[r11+8] and esi,0FFFFFFFE cmp rdi,rax jne short M01_L01 mov rdi,[r11+10] xor rdi,rcx cmp rdi,1 jbe short M01_L02 M01_L01: test esi,esi je short M01_L06 inc r10d add r9d,r10d and r9d,[r8+4] cmp r10d,8 jl short M01_L00 jmp short M01_L06 M01_L02: cmp esi,[r11] jne short M01_L06 mov eax,edi M01_L03: cmp eax,1 je short M01_L04 test eax,eax jne short M01_L05 xor edx,edx M01_L04: mov rax,rdx pop rsi pop rdi ret M01_L05: pop rsi pop rdi jmp near ptr System.Runtime.CompilerServices.CastHelpers.IsInstanceOfAny_NoCacheLookup(Void*, System.Object) M01_L06: mov eax,2 jmp short M01_L03 ; Total bytes of code 177 ``` ### 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)