DrewScoggins / performance-2

This repo contains benchmarks used for testing the performance of all .NET Runtimes
MIT License
0 stars 0 forks source link

[Perf] Changes at 3/10/2021 12:58:37 AM #4264

Open performanceautofiler[bot] opened 3 years ago

performanceautofiler[bot] commented 3 years ago

Run Information

Architecture x64
OS Windows 10.0.18362
Baseline e0bbfa0f555cf5b9d8b8749e1a91a78924c9d927
Compare 11ff8a576aaccbf291ce8e3e9ba0bd0b04913d37

Regressions in System.Buffers.Tests.RentReturnArrayPoolTests<Byte>

Benchmark Baseline Test Test/Base Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[SingleSerial](<https://pvscmdupload.blob.core.windows.net/reports/allTestHistory/refs/heads/main_x64_Windows 10.0.18362/System.Buffers.Tests.RentReturnArrayPoolTests(Byte).SingleSerial(RentalSize%3a%204096%2c%20ManipulateArray%3a%20True%2c%20Async%3a%20False%2c%20UseSharedPool%3a%20False).html>) 1.39 μs 2.27 μs 1.64
[MultipleSerial](<https://pvscmdupload.blob.core.windows.net/reports/allTestHistory/refs/heads/main_x64_Windows 10.0.18362/System.Buffers.Tests.RentReturnArrayPoolTests(Byte).MultipleSerial(RentalSize%3a%204096%2c%20ManipulateArray%3a%20False%2c%20Async%3a%20False%2c%20UseSharedPool%3a%20False).html>) 333.98 ns 356.96 ns 1.07
[SingleSerial](<https://pvscmdupload.blob.core.windows.net/reports/allTestHistory/refs/heads/main_x64_Windows 10.0.18362/System.Buffers.Tests.RentReturnArrayPoolTests(Byte).SingleSerial(RentalSize%3a%204096%2c%20ManipulateArray%3a%20True%2c%20Async%3a%20True%2c%20UseSharedPool%3a%20False).html>) 2.35 μs 2.79 μs 1.19
[SingleSerial](<https://pvscmdupload.blob.core.windows.net/reports/allTestHistory/refs/heads/main_x64_Windows 10.0.18362/System.Buffers.Tests.RentReturnArrayPoolTests(Byte).SingleSerial(RentalSize%3a%204096%2c%20ManipulateArray%3a%20False%2c%20Async%3a%20False%2c%20UseSharedPool%3a%20False).html>) 40.59 ns 42.86 ns 1.06
[SingleSerial](<https://pvscmdupload.blob.core.windows.net/reports/allTestHistory/refs/heads/main_x64_Windows 10.0.18362/System.Buffers.Tests.RentReturnArrayPoolTests(Byte).SingleSerial(RentalSize%3a%204096%2c%20ManipulateArray%3a%20True%2c%20Async%3a%20True%2c%20UseSharedPool%3a%20True).html>) 2.44 μs 2.72 μs 1.12

graph graph graph graph graph Historical Data in Reporting System

Repro

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f netcoreapp5.0 --filter 'System.Buffers.Tests.RentReturnArrayPoolTests&lt;Byte&gt;*'
. ### Payloads [Baseline]() [Compare]() ### Histogram #### System.Buffers.Tests.RentReturnArrayPoolTests.SingleSerial(RentalSize: 4096, ManipulateArray: True, Async: False, UseSharedPool: False) ```log [1386.731 ; 1486.133) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ [1486.133 ; 1600.313) | @@@@@@@@@@@@ [1600.313 ; 1709.112) | @@@@@@@@ [1709.112 ; 1825.277) | @@@@@@ [1825.277 ; 1949.307) | @@@@@@@@@ [1949.307 ; 2015.656) | @@ [2015.656 ; 2115.058) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@ [2115.058 ; 2182.173) | @@@@ [2182.173 ; 2313.093) | @@@@@@@@ [2313.093 ; 2412.496) | @@@@@@@@@@@@@@ ``` #### System.Buffers.Tests.RentReturnArrayPoolTests.MultipleSerial(RentalSize: 4096, ManipulateArray: False, Async: False, UseSharedPool: False) ```log [331.303 ; 339.688) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ [339.688 ; 350.447) | @@ [350.447 ; 360.994) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ``` #### System.Buffers.Tests.RentReturnArrayPoolTests.SingleSerial(RentalSize: 4096, ManipulateArray: True, Async: True, UseSharedPool: False) ```log [2113.694 ; 2169.419) | @ [2169.419 ; 2221.811) | @@ [2221.811 ; 2293.809) | @@@@@@@@@@@@ [2293.809 ; 2380.819) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ [2380.819 ; 2432.677) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ [2432.677 ; 2523.225) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ [2523.225 ; 2611.756) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ [2611.756 ; 2670.632) | @@ [2670.632 ; 2736.431) | [2736.431 ; 2836.865) | @@@@@ ``` #### System.Buffers.Tests.RentReturnArrayPoolTests.SingleSerial(RentalSize: 4096, ManipulateArray: False, Async: False, UseSharedPool: False) ```log [39.770 ; 41.169) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ [41.169 ; 42.329) | @@ [42.329 ; 43.533) | @@@@@ [43.533 ; 44.965) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ``` #### System.Buffers.Tests.RentReturnArrayPoolTests.SingleSerial(RentalSize: 4096, ManipulateArray: True, Async: True, UseSharedPool: True) ```log [2034.886 ; 2093.143) | @ [2093.143 ; 2137.805) | @ [2137.805 ; 2218.818) | @@ [2218.818 ; 2274.420) | @@@@@@@@@@ [2274.420 ; 2367.079) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ [2367.079 ; 2415.915) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ [2415.915 ; 2480.708) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ [2480.708 ; 2573.303) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ [2573.303 ; 2658.683) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ [2658.683 ; 2721.143) | @@@@@@@ [2721.143 ; 2782.276) | @ [2782.276 ; 2867.559) | @ [2867.559 ; 2954.591) | @ ``` ### 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 | [e0bbfa0f555cf5b9d8b8749e1a91a78924c9d927](https://github.com/dotnet/runtime/commit/e0bbfa0f555cf5b9d8b8749e1a91a78924c9d927) Compare | [11ff8a576aaccbf291ce8e3e9ba0bd0b04913d37](https://github.com/dotnet/runtime/commit/11ff8a576aaccbf291ce8e3e9ba0bd0b04913d37) ### Regressions in System.MathBenchmarks.Double Benchmark | Baseline | Test | Test/Base | Baseline IR | Compare IR | IR Ratio | Baseline ETL | Compare ETL -- | -- | -- | -- | -- | -- | -- | -- | -- [Min]() | 6.25 μs | 7.72 μs | 1.23 | | | | [Trace](https://helixri107v0xdeko0k025g8.blob.core.windows.net/results-e822c89e408a4b65a1/Collect%20System.MathBenchmarks.Double.Min/artifacts/BenchmarkDotNet.Artifacts/System.MathBenchmarks.Double.Min-20210310-145323.etl?sv=2019-07-07&se=2021-06-08T22%3A50%3A31Z&sr=c&sp=rl&sig=2Z%2FIlqvKpnXD30ncjlHBx9gB1m38cdZwmgtsT4g%2F4Ik%3D) | [Trace](https://helixri107v0xdeko0k025g8.blob.core.windows.net/results-c3df277c71a24b2286/Collect%20System.MathBenchmarks.Double.Min/artifacts/BenchmarkDotNet.Artifacts/System.MathBenchmarks.Double.Min-20210310-145200.etl?sv=2019-07-07&se=2021-06-08T22%3A50%3A31Z&sr=c&sp=rl&sig=olvmTV2P5VoUJRaSllkgMA3016iNmCKsjaZX%2Fpwa3qE%3D) ![graph]() [Historical Data in Reporting System]() ### Repro ```cmd git clone https://github.com/dotnet/performance.git py .\performance\scripts\benchmarks_ci.py -f netcoreapp5.0 --filter 'System.MathBenchmarks.Double*' ```
. ### Payloads [Baseline]() [Compare]() ### Histogram #### System.MathBenchmarks.Double.Min ```log [6219.792 ; 6396.059) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ [6396.059 ; 6574.845) | [6574.845 ; 6753.631) | [6753.631 ; 6932.417) | [6932.417 ; 7111.203) | [7111.203 ; 7289.990) | [7289.990 ; 7468.776) | [7468.776 ; 7748.778) | @@@@@ ``` ### Baseline Jit Disasm ```assembly ; System.MathBenchmarks.Double.Min() jmp near ptr System.MathBenchmarks.Double.MinTest() ; Total bytes of code 5 ``` ```assembly ; System.MathBenchmarks.Double.MinTest() push rdi push rsi push rbx sub rsp,30 vzeroupper vmovaps [rsp+20],xmm6 vxorps xmm6,xmm6,xmm6 vmovsd xmm0,qword ptr [7FFD924A5DF0] xor ecx,ecx vmovsd xmm1,qword ptr [7FFD924A5DF8] M01_L00: vsubsd xmm0,xmm0,xmm1 vucomisd xmm0,qword ptr [7FFD924A5E00] jp short M01_L01 je short M01_L03 M01_L01: vucomisd xmm0,qword ptr [7FFD924A5E00] ja short M01_L02 vmovaps xmm2,xmm0 jmp short M01_L05 M01_L02: vmovsd xmm2,qword ptr [7FFD924A5E00] jmp short M01_L05 M01_L03: vmovsd xmm2,qword ptr [7FFD924A5E00] vmovq rax,xmm2 test rax,rax jl short M01_L04 vmovsd xmm2,qword ptr [7FFD924A5E00] jmp short M01_L05 M01_L04: vmovsd xmm2,qword ptr [7FFD924A5E00] M01_L05: vaddsd xmm6,xmm6,xmm2 inc ecx cmp ecx,1388 jl short M01_L00 vmovsd xmm0,qword ptr [7FFD924A5E00] vsubsd xmm0,xmm0,xmm6 vandps xmm0,xmm0,[7FFD924A5E10] vucomisd xmm0,qword ptr [7FFD924A5E20] ja short M01_L06 vmovaps xmm6,[rsp+20] add rsp,30 pop rbx pop rsi pop rdi ret M01_L06: mov rcx,offset MT_System.Double call CORINFO_HELP_NEWSFAST mov rsi,rax vmovsd xmm0,qword ptr [7FFD924A5E00] vmovsd qword ptr [rsi+8],xmm0 mov rcx,offset MT_System.Double call CORINFO_HELP_NEWSFAST mov rdi,rax vmovsd qword ptr [rdi+8],xmm6 mov rcx,offset MT_System.Exception call CORINFO_HELP_NEWSFAST mov rbx,rax mov ecx,5BC7 mov rdx,7FFD923F6130 call CORINFO_HELP_STRCNS mov rcx,rax mov rdx,rsi mov r8,rdi call System.String.Format(System.String, System.Object, System.Object) mov rsi,rax mov rcx,rbx call System.Exception..ctor() lea rcx,[rbx+10] mov rdx,rsi call CORINFO_HELP_ASSIGN_REF mov rcx,rbx call CORINFO_HELP_THROW int 3 ; Total bytes of code 312 ``` ### Compare Jit Disasm ```assembly ; System.MathBenchmarks.Double.Min() jmp near ptr System.MathBenchmarks.Double.MinTest() ; Total bytes of code 5 ``` ```assembly ; System.MathBenchmarks.Double.MinTest() push rdi push rsi push rbx sub rsp,30 vzeroupper vmovaps [rsp+20],xmm6 vxorps xmm6,xmm6,xmm6 vmovsd xmm0,qword ptr [7FF9E5E75DF0] xor ecx,ecx vmovsd xmm1,qword ptr [7FF9E5E75DF8] M01_L00: vsubsd xmm0,xmm0,xmm1 vucomisd xmm0,qword ptr [7FF9E5E75E00] jp short M01_L01 je short M01_L03 M01_L01: vucomisd xmm0,qword ptr [7FF9E5E75E00] ja short M01_L02 vmovaps xmm2,xmm0 jmp short M01_L05 M01_L02: vmovsd xmm2,qword ptr [7FF9E5E75E00] jmp short M01_L05 M01_L03: vmovsd xmm2,qword ptr [7FF9E5E75E00] vmovq rax,xmm2 test rax,rax jl short M01_L04 vmovsd xmm2,qword ptr [7FF9E5E75E00] jmp short M01_L05 M01_L04: vmovsd xmm2,qword ptr [7FF9E5E75E00] M01_L05: vaddsd xmm6,xmm6,xmm2 inc ecx cmp ecx,1388 jl short M01_L00 vmovsd xmm0,qword ptr [7FF9E5E75E00] vsubsd xmm0,xmm0,xmm6 vandps xmm0,xmm0,[7FF9E5E75E10] vucomisd xmm0,qword ptr [7FF9E5E75E20] ja short M01_L06 vmovaps xmm6,[rsp+20] add rsp,30 pop rbx pop rsi pop rdi ret M01_L06: mov rcx,offset MT_System.Double call CORINFO_HELP_NEWSFAST mov rsi,rax vmovsd xmm0,qword ptr [7FF9E5E75E00] vmovsd qword ptr [rsi+8],xmm0 mov rcx,offset MT_System.Double call CORINFO_HELP_NEWSFAST mov rdi,rax vmovsd qword ptr [rdi+8],xmm6 mov rcx,offset MT_System.Exception call CORINFO_HELP_NEWSFAST mov rbx,rax mov ecx,5C37 mov rdx,7FF9E5DB6F48 call CORINFO_HELP_STRCNS mov rcx,rax mov rdx,rsi mov r8,rdi call System.String.Format(System.String, System.Object, System.Object) mov rsi,rax mov rcx,rbx call System.Exception..ctor() lea rcx,[rbx+10] mov rdx,rsi call CORINFO_HELP_ASSIGN_REF mov rcx,rbx call CORINFO_HELP_THROW int 3 ; Total bytes of code 312 ``` ### 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 | [e0bbfa0f555cf5b9d8b8749e1a91a78924c9d927](https://github.com/dotnet/runtime/commit/e0bbfa0f555cf5b9d8b8749e1a91a78924c9d927) Compare | [11ff8a576aaccbf291ce8e3e9ba0bd0b04913d37](https://github.com/dotnet/runtime/commit/11ff8a576aaccbf291ce8e3e9ba0bd0b04913d37) ### Regressions in System.Linq.Tests.Perf_Enumerable Benchmark | Baseline | Test | Test/Base | Baseline IR | Compare IR | IR Ratio | Baseline ETL | Compare ETL -- | -- | -- | -- | -- | -- | -- | -- | -- [ToList]() | 726.61 ns | 777.65 ns | 1.07 | | | | [Trace](https://helixri107v0xdeko0k025g8.blob.core.windows.net/results-4e65abfd0c794fb4b1/Collect%20System.Linq.Tests.Perf_Enumerable.ToList/artifacts/BenchmarkDotNet.Artifacts/System.Linq.Tests.Perf_Enumerable.ToList%28input_%20IEnumerable%29-20210310-145334.etl?sv=2019-07-07&se=2021-06-08T22%3A50%3A39Z&sr=c&sp=rl&sig=EmnwSICySTKEsWakY5htQqQjgPahFlQL90ILtQzmeT0%3D) | [Trace](https://helixri107v0xdeko0k025g8.blob.core.windows.net/results-eb2baecd259542ecb2/Collect%20System.Linq.Tests.Perf_Enumerable.ToList/artifacts/BenchmarkDotNet.Artifacts/System.Linq.Tests.Perf_Enumerable.ToList%28input_%20IEnumerable%29-20210310-145339.etl?sv=2019-07-07&se=2021-06-08T22%3A50%3A40Z&sr=c&sp=rl&sig=qcU6T7mikGXT1bQjzjD3uQ7Yi9pUImyrf4V6gEjxFgw%3D) ![graph]() [Historical Data in Reporting System]() ### Repro ```cmd git clone https://github.com/dotnet/performance.git py .\performance\scripts\benchmarks_ci.py -f netcoreapp5.0 --filter 'System.Linq.Tests.Perf_Enumerable*' ```
. ### Payloads [Baseline]() [Compare]() ### Histogram #### System.Linq.Tests.Perf_Enumerable.ToList(input: IEnumerable) ```log [716.906 ; 735.898) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ [735.898 ; 753.565) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ [753.565 ; 775.478) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ [775.478 ; 796.858) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ``` ### Baseline Jit Disasm ```assembly ; System.Linq.Tests.Perf_Enumerable.ToList(System.Linq.Tests.LinqTestData) mov rcx,[rdx+8] jmp near ptr System.Linq.Enumerable.ToList[[System.Int32, System.Private.CoreLib]](System.Collections.Generic.IEnumerable`1) ; Total bytes of code 9 ``` ```assembly ; System.Linq.Enumerable.ToList[[System.Int32, System.Private.CoreLib]](System.Collections.Generic.IEnumerable`1) push rdi push rsi sub rsp,28 mov rsi,rcx test rsi,rsi je short M01_L01 mov rdx,rsi mov rcx,offset MT_System.Linq.IIListProvider`1[[System.Int32, System.Private.CoreLib]] call CORINFO_HELP_ISINSTANCEOFINTERFACE test rax,rax jne short M01_L00 mov rcx,offset MT_System.Collections.Generic.List`1[[System.Int32, System.Private.CoreLib]] call CORINFO_HELP_NEWSFAST mov rdi,rax mov rcx,rdi mov rdx,rsi call System.Collections.Generic.List`1[[System.Int32, System.Private.CoreLib]]..ctor(System.Collections.Generic.IEnumerable`1) mov rax,rdi add rsp,28 pop rsi pop rdi ret M01_L00: mov rcx,rax mov r11,7FF7EA680538 mov rax,7FF7EA680538 mov rax,[rax] add rsp,28 pop rsi pop rdi jmp rax M01_L01: mov ecx,10 call System.Linq.ThrowHelper.ThrowArgumentNullException(System.Linq.ExceptionArgument) int 3 ; Total bytes of code 122 ``` ### Compare Jit Disasm ```assembly ; System.Linq.Tests.Perf_Enumerable.ToList(System.Linq.Tests.LinqTestData) mov rcx,[rdx+8] jmp near ptr System.Linq.Enumerable.ToList[[System.Int32, System.Private.CoreLib]](System.Collections.Generic.IEnumerable`1) ; Total bytes of code 9 ``` ```assembly ; System.Linq.Enumerable.ToList[[System.Int32, System.Private.CoreLib]](System.Collections.Generic.IEnumerable`1) push rdi push rsi sub rsp,28 mov rsi,rcx test rsi,rsi je short M01_L01 mov rdx,rsi mov rcx,offset MT_System.Linq.IIListProvider`1[[System.Int32, System.Private.CoreLib]] call CORINFO_HELP_ISINSTANCEOFINTERFACE test rax,rax jne short M01_L00 mov rcx,offset MT_System.Collections.Generic.List`1[[System.Int32, System.Private.CoreLib]] call CORINFO_HELP_NEWSFAST mov rdi,rax mov rcx,rdi mov rdx,rsi call System.Collections.Generic.List`1[[System.Int32, System.Private.CoreLib]]..ctor(System.Collections.Generic.IEnumerable`1) mov rax,rdi add rsp,28 pop rsi pop rdi ret M01_L00: mov rcx,rax mov r11,7FFE3CBA0538 mov rax,7FFE3CBA0538 mov rax,[rax] add rsp,28 pop rsi pop rdi jmp rax M01_L01: mov ecx,10 call System.Linq.ThrowHelper.ThrowArgumentNullException(System.Linq.ExceptionArgument) int 3 ; Total bytes of code 122 ``` ### 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 | [e0bbfa0f555cf5b9d8b8749e1a91a78924c9d927](https://github.com/dotnet/runtime/commit/e0bbfa0f555cf5b9d8b8749e1a91a78924c9d927) Compare | [11ff8a576aaccbf291ce8e3e9ba0bd0b04913d37](https://github.com/dotnet/runtime/commit/11ff8a576aaccbf291ce8e3e9ba0bd0b04913d37) ### Regressions in System.Collections.AddGivenSize<Int32> Benchmark | Baseline | Test | Test/Base | Baseline IR | Compare IR | IR Ratio | Baseline ETL | Compare ETL -- | -- | -- | -- | -- | -- | -- | -- | -- [ICollection]() | 1.49 μs | 1.86 μs | 1.25 | | | ![graph]() [Historical Data in Reporting System]() ### Repro ```cmd git clone https://github.com/dotnet/performance.git py .\performance\scripts\benchmarks_ci.py -f netcoreapp5.0 --filter 'System.Collections.AddGivenSize<Int32>*' ```
. ### Payloads [Baseline]() [Compare]() ### Histogram #### System.Collections.AddGivenSize.ICollection(Size: 512) ```log [1414.057 ; 1447.945) | @ [1447.945 ; 1490.007) | @@@@@@@@@@@@@@@@@@@@ [1490.007 ; 1536.916) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ [1536.916 ; 1571.728) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ [1571.728 ; 1605.496) | [1605.496 ; 1652.404) | @@@ [1652.404 ; 1718.532) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ [1718.532 ; 1792.113) | @ [1792.113 ; 1871.525) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ``` ### 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 | [e0bbfa0f555cf5b9d8b8749e1a91a78924c9d927](https://github.com/dotnet/runtime/commit/e0bbfa0f555cf5b9d8b8749e1a91a78924c9d927) Compare | [11ff8a576aaccbf291ce8e3e9ba0bd0b04913d37](https://github.com/dotnet/runtime/commit/11ff8a576aaccbf291ce8e3e9ba0bd0b04913d37) ### Regressions in System.Formats.Cbor.Tests.Perf_CborWriter Benchmark | Baseline | Test | Test/Base | Baseline IR | Compare IR | IR Ratio | Baseline ETL | Compare ETL -- | -- | -- | -- | -- | -- | -- | -- | -- [WriteCoseKey]() | 774.78 ns | 827.57 ns | 1.07 | | | ![graph]() [Historical Data in Reporting System]() ### Repro ```cmd git clone https://github.com/dotnet/performance.git py .\performance\scripts\benchmarks_ci.py -f netcoreapp5.0 --filter 'System.Formats.Cbor.Tests.Perf_CborWriter*' ```
. ### Payloads [Baseline]() [Compare]() ### Histogram #### System.Formats.Cbor.Tests.Perf_CborWriter.WriteCoseKey(publicKey: ECDSA_P384) ```log [756.067 ; 776.508) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ [776.508 ; 793.499) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ [793.499 ; 810.528) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ [810.528 ; 840.803) | @@@@@@@@@@@@@@@@@@ ``` ### Baseline Jit Disasm ```assembly ; System.Formats.Cbor.Tests.Perf_CborWriter.WriteCoseKey(System.Formats.Cbor.Tests.ECDsaCosePublicKey) push r15 push r14 push rdi push rsi push rbp push rbx sub rsp,148 xor eax,eax mov [rsp+28],rax vxorps xmm4,xmm4,xmm4 vmovdqa xmmword ptr [rsp+30],xmm4 vmovdqa xmmword ptr [rsp+40],xmm4 mov rax,0FFFFFFFFFF10 M00_L00: vmovdqa xmmword ptr [rsp+rax+140],xmm4 vmovdqa xmmword ptr [rsp+rax+150],xmm4 vmovdqa xmmword ptr [rsp+rax+160],xmm4 add rax,30 jne short M00_L00 mov [rsp+140],rax mov rbx,rcx mov rbp,rdx mov rcx,[rbx+8] cmp [rcx],ecx call System.Formats.Cbor.CborWriter.Reset() mov r14,[rbx+8] lea rsi,[rbp+18] lea rdi,[rsp+0C8] mov ecx,10 rep movsq mov rbp,[rbp+98] mov r15d,1 lea rdi,[rsp+48] lea rsi,[rsp+0C8] mov ecx,10 rep movsq lea rcx,[rsp+38] mov [rcx],r15b mov [rcx+8],rbp mov rcx,r14 lea rdx,[rsp+48] lea r8,[rsp+38] call System.Formats.Cbor.Tests.ECDsaCosePublicKeyHelper.WriteECParametersAsCosePublicKey(System.Formats.Cbor.CborWriter, System.Security.Cryptography.ECParameters, System.Nullable`1) mov rcx,[rbx+8] mov rdx,[rbx+10] test rdx,rdx jne short M00_L01 xor eax,eax xor r8d,r8d jmp short M00_L02 M00_L01: lea rax,[rdx+10] mov r8d,[rdx+8] M00_L02: lea rdx,[rsp+28] mov [rdx],rax mov [rdx+8],r8d lea rdx,[rsp+28] cmp [rcx],ecx call System.Formats.Cbor.CborWriter.Encode(System.Span`1) nop add rsp,148 pop rbx pop rbp pop rsi pop rdi pop r14 pop r15 ret ; Total bytes of code 263 ``` ```assembly ; System.Formats.Cbor.CborWriter.Reset() push rsi sub rsp,20 mov rsi,rcx mov r8d,[rsi+48] test r8d,r8d jle short M01_L03 mov rcx,[rsi+28] xor edx,edx call System.Array.Clear(System.Array, Int32, Int32) xor ecx,ecx mov [rsi+48],ecx mov rcx,[rsi+30] test rcx,rcx je short M01_L00 call System.Collections.Generic.Stack`1[[System.Formats.Cbor.CborWriter+StackFrame, System.Formats.Cbor]].Clear() M01_L00: xor ecx,ecx mov [rsi+60],cx mov [rsi+68],rcx mov [rsi+4C],ecx mov [rsi+50],ecx mov byte ptr [rsi+58],0 mov [rsi+70],rcx mov [rsi+78],rcx mov byte ptr [rsi+59],0 mov rcx,[rsi+38] test rcx,rcx je short M01_L01 inc dword ptr [rcx+14] xor eax,eax mov [rcx+10],eax M01_L01: mov rcx,[rsi+40] test rcx,rcx jne short M01_L02 add rsp,20 pop rsi ret M01_L02: mov rax,offset System.Collections.Generic.HashSet`1[[System.ValueTuple`2[[System.Int32, System.Private.CoreLib],[System.Int32, System.Private.CoreLib]], System.Private.CoreLib]].Clear() mov rax,[rax] add rsp,20 pop rsi jmp rax M01_L03: add rsp,20 pop rsi ret ; Total bytes of code 138 ``` ```assembly ; System.Formats.Cbor.Tests.ECDsaCosePublicKeyHelper.WriteECParametersAsCosePublicKey(System.Formats.Cbor.CborWriter, System.Security.Cryptography.ECParameters, System.Nullable`1) push r15 push r14 push r13 push r12 push rdi push rsi push rbp push rbx sub rsp,98 xor eax,eax mov [rsp+28],rax vxorps xmm4,xmm4,xmm4 mov rax,0FFFFFFFFFFA0 M02_L00: vmovdqa xmmword ptr [rsp+rax+90],xmm4 vmovdqa xmmword ptr [rsp+rax+0A0],xmm4 vmovdqa xmmword ptr [rsp+rax+0B0],xmm4 add rax,30 jne short M02_L00 mov rbp,rcx mov rbx,rdx movzx r14d,byte ptr [r8] mov r15,[r8+8] cmp qword ptr [rbx+8],0 je near ptr M02_L04 cmp qword ptr [rbx+10],0 je near ptr M02_L04 lea rsi,[rbx+18] lea rdi,[rsp+28] mov ecx,0D rep movsq lea rcx,[rsp+28] call System.Formats.Cbor.Tests.ECDsaCosePublicKeyHelper.g__MapECCurveToCoseKtyAndCrv|0_0(System.Security.Cryptography.ECCurve) mov [rsp+90],rax mov esi,[rsp+90] mov edi,[rsp+94] test r14b,r14b jne short M02_L01 xor r12d,r12d xor r13d,r13d jmp short M02_L02 M02_L01: test r14b,r14b je near ptr M02_L05 mov rcx,r15 call System.Formats.Cbor.Tests.ECDsaCosePublicKeyHelper.g__MapHashAlgorithmNameToCoseKeyAlg|0_1(System.Security.Cryptography.HashAlgorithmName) mov r13d,eax mov r12d,1 M02_L02: xor ecx,ecx xor edx,edx mov rax,rbp lea r8,[rsp+20] mov [r8],cl mov [r8+4],edx mov rcx,rax mov rdx,[rsp+20] cmp [rcx],ecx call System.Formats.Cbor.CborWriter.WriteStartMap(System.Nullable`1) mov rcx,rbp mov edx,1 call System.Formats.Cbor.CborWriter.WriteInt64(Int64) movsxd rdx,esi mov rcx,rbp call System.Formats.Cbor.CborWriter.WriteInt64(Int64) test r12b,r12b je short M02_L03 mov rcx,rbp mov edx,3 call System.Formats.Cbor.CborWriter.WriteInt64(Int64) movsxd rdx,r13d mov rcx,rbp call System.Formats.Cbor.CborWriter.WriteInt64(Int64) M02_L03: mov rcx,rbp mov rdx,0FFFFFFFFFFFF call System.Formats.Cbor.CborWriter.WriteInt64(Int64) movsxd rdx,edi mov rcx,rbp call System.Formats.Cbor.CborWriter.WriteInt64(Int64) mov rcx,rbp mov rdx,0FFFFFFFFFFFE call System.Formats.Cbor.CborWriter.WriteInt64(Int64) mov rdx,[rbx+8] mov rcx,rbp call System.Formats.Cbor.CborWriter.WriteByteString(Byte[]) mov rcx,rbp mov rdx,0FFFFFFFFFFFD call System.Formats.Cbor.CborWriter.WriteInt64(Int64) mov rdx,[rbx+10] mov rcx,rbp call System.Formats.Cbor.CborWriter.WriteByteString(Byte[]) mov rcx,rbp call System.Formats.Cbor.CborWriter.WriteEndMap() nop add rsp,98 pop rbx pop rbp pop rsi pop rdi pop r12 pop r13 pop r14 pop r15 ret M02_L04: mov rcx,offset MT_System.ArgumentException call CORINFO_HELP_NEWSFAST mov rsi,rax mov ecx,0B048 mov rdx,7FFD64D16AA0 call CORINFO_HELP_STRCNS mov rdi,rax mov ecx,0B092 mov rdx,7FFD64D16AA0 call CORINFO_HELP_STRCNS mov r8,rax mov rdx,rdi mov rcx,rsi call System.ArgumentException..ctor(System.String, System.String) mov rcx,rsi call CORINFO_HELP_THROW M02_L05: call System.ThrowHelper.ThrowInvalidOperationException_InvalidOperation_NoValue() int 3 ; Total bytes of code 491 ``` ```assembly ; System.Formats.Cbor.CborWriter.Encode(System.Span`1) push rdi push rsi sub rsp,38 xor eax,eax mov [rsp+28],rax mov [rsp+30],rax mov rsi,rdx lea rdx,[rsp+28] call System.Formats.Cbor.CborWriter.GetSpanEncoding() mov ecx,[rsp+30] mov edx,[rsi+8] cmp ecx,edx jg short M03_L00 mov rcx,[rsi] mov r8d,[rsp+30] cmp r8d,edx ja short M03_L01 mov rdx,[rsp+28] mov r8d,[rsp+30] movsxd r8,r8d call System.Buffer.Memmove(Byte ByRef, Byte ByRef, UIntPtr) mov eax,[rsp+30] add rsp,38 pop rsi pop rdi ret M03_L00: mov rcx,offset MT_System.ArgumentException call CORINFO_HELP_NEWSFAST mov rsi,rax mov ecx,7 mov rdx,7FFD64D74078 call CORINFO_HELP_STRCNS mov rcx,rax xor edx,edx call System.SR.GetResourceString(System.String, System.String) mov rdi,rax mov ecx,0DD2 mov rdx,7FFD64D74078 call CORINFO_HELP_STRCNS mov r8,rax mov rdx,rdi mov rcx,rsi call System.ArgumentException..ctor(System.String, System.String) mov rcx,rsi call CORINFO_HELP_THROW M03_L01: call System.ThrowHelper.ThrowArgumentException_DestinationTooShort() int 3 ; Total bytes of code 183 ``` ### Compare Jit Disasm ```assembly ; System.Formats.Cbor.Tests.Perf_CborWriter.WriteCoseKey(System.Formats.Cbor.Tests.ECDsaCosePublicKey) push r15 push r14 push rdi push rsi push rbp push rbx sub rsp,148 xor eax,eax mov [rsp+28],rax vxorps xmm4,xmm4,xmm4 vmovdqa xmmword ptr [rsp+30],xmm4 vmovdqa xmmword ptr [rsp+40],xmm4 mov rax,0FFFFFFFFFF10 M00_L00: vmovdqa xmmword ptr [rsp+rax+140],xmm4 vmovdqa xmmword ptr [rsp+rax+150],xmm4 vmovdqa xmmword ptr [rsp+rax+160],xmm4 add rax,30 jne short M00_L00 mov [rsp+140],rax mov rbx,rcx mov rbp,rdx mov rcx,[rbx+8] cmp [rcx],ecx call System.Formats.Cbor.CborWriter.Reset() mov r14,[rbx+8] lea rsi,[rbp+18] lea rdi,[rsp+0C8] mov ecx,10 rep movsq mov rbp,[rbp+98] mov r15d,1 lea rdi,[rsp+48] lea rsi,[rsp+0C8] mov ecx,10 rep movsq lea rcx,[rsp+38] mov [rcx],r15b mov [rcx+8],rbp mov rcx,r14 lea rdx,[rsp+48] lea r8,[rsp+38] call System.Formats.Cbor.Tests.ECDsaCosePublicKeyHelper.WriteECParametersAsCosePublicKey(System.Formats.Cbor.CborWriter, System.Security.Cryptography.ECParameters, System.Nullable`1) mov rcx,[rbx+8] mov rdx,[rbx+10] test rdx,rdx jne short M00_L01 xor eax,eax xor r8d,r8d jmp short M00_L02 M00_L01: lea rax,[rdx+10] mov r8d,[rdx+8] M00_L02: lea rdx,[rsp+28] mov [rdx],rax mov [rdx+8],r8d lea rdx,[rsp+28] cmp [rcx],ecx call 00007FF9FBD850F0 nop add rsp,148 pop rbx pop rbp pop rsi pop rdi pop r14 pop r15 ret ; Total bytes of code 263 ``` ```assembly ; System.Formats.Cbor.CborWriter.Reset() push rsi sub rsp,20 mov rsi,rcx mov r8d,[rsi+48] test r8d,r8d jle short M01_L03 mov rcx,[rsi+28] xor edx,edx call System.Array.Clear(System.Array, Int32, Int32) xor ecx,ecx mov [rsi+48],ecx mov rcx,[rsi+30] test rcx,rcx je short M01_L00 call 00007FF9FC008438 M01_L00: xor ecx,ecx mov [rsi+60],cx mov [rsi+68],rcx mov [rsi+4C],ecx mov [rsi+50],ecx mov byte ptr [rsi+58],0 mov [rsi+70],rcx mov [rsi+78],rcx mov byte ptr [rsi+59],0 mov rcx,[rsi+38] test rcx,rcx je short M01_L01 inc dword ptr [rcx+14] xor eax,eax mov [rcx+10],eax M01_L01: mov rcx,[rsi+40] test rcx,rcx jne short M01_L02 add rsp,20 pop rsi ret M01_L02: mov rax,7FF9FC0E2088 mov rax,[rax] add rsp,20 pop rsi jmp rax M01_L03: add rsp,20 pop rsi ret ; Total bytes of code 138 ``` ```assembly ; System.Formats.Cbor.Tests.ECDsaCosePublicKeyHelper.WriteECParametersAsCosePublicKey(System.Formats.Cbor.CborWriter, System.Security.Cryptography.ECParameters, System.Nullable`1) push r15 push r14 push r13 push r12 push rdi push rsi push rbp push rbx sub rsp,98 xor eax,eax mov [rsp+28],rax vxorps xmm4,xmm4,xmm4 mov rax,0FFFFFFFFFFA0 M02_L00: vmovdqa xmmword ptr [rsp+rax+90],xmm4 vmovdqa xmmword ptr [rsp+rax+0A0],xmm4 vmovdqa xmmword ptr [rsp+rax+0B0],xmm4 add rax,30 jne short M02_L00 mov rbp,rcx mov rbx,rdx movzx r14d,byte ptr [r8] mov r15,[r8+8] cmp qword ptr [rbx+8],0 je near ptr M02_L04 cmp qword ptr [rbx+10],0 je near ptr M02_L04 lea rsi,[rbx+18] lea rdi,[rsp+28] mov ecx,0D rep movsq lea rcx,[rsp+28] call 00007FF9FC008290 mov [rsp+90],rax mov esi,[rsp+90] mov edi,[rsp+94] test r14b,r14b jne short M02_L01 xor r12d,r12d xor r13d,r13d jmp short M02_L02 M02_L01: test r14b,r14b je near ptr M02_L05 mov rcx,r15 call 00007FF9FC0082A0 mov r13d,eax mov r12d,1 M02_L02: xor ecx,ecx xor edx,edx mov rax,rbp lea r8,[rsp+20] mov [r8],cl mov [r8+4],edx mov rcx,rax mov rdx,[rsp+20] cmp [rcx],ecx call System.Formats.Cbor.CborWriter.WriteStartMap(System.Nullable`1) mov rcx,rbp mov edx,1 call System.Formats.Cbor.CborWriter.WriteInt64(Int64) movsxd rdx,esi mov rcx,rbp call System.Formats.Cbor.CborWriter.WriteInt64(Int64) test r12b,r12b je short M02_L03 mov rcx,rbp mov edx,3 call System.Formats.Cbor.CborWriter.WriteInt64(Int64) movsxd rdx,r13d mov rcx,rbp call System.Formats.Cbor.CborWriter.WriteInt64(Int64) M02_L03: mov rcx,rbp mov rdx,0FFFFFFFFFFFF call System.Formats.Cbor.CborWriter.WriteInt64(Int64) movsxd rdx,edi mov rcx,rbp call System.Formats.Cbor.CborWriter.WriteInt64(Int64) mov rcx,rbp mov rdx,0FFFFFFFFFFFE call System.Formats.Cbor.CborWriter.WriteInt64(Int64) mov rdx,[rbx+8] mov rcx,rbp call 00007FF9FBD85058 mov rcx,rbp mov rdx,0FFFFFFFFFFFD call System.Formats.Cbor.CborWriter.WriteInt64(Int64) mov rdx,[rbx+10] mov rcx,rbp call 00007FF9FBD85058 mov rcx,rbp call System.Formats.Cbor.CborWriter.WriteEndMap() nop add rsp,98 pop rbx pop rbp pop rsi pop rdi pop r12 pop r13 pop r14 pop r15 ret M02_L04: mov rcx,offset MT_System.ArgumentException call CORINFO_HELP_NEWSFAST mov rsi,rax mov ecx,0B0B8 mov rdx,7FF9FBF36F48 call CORINFO_HELP_STRCNS mov rdi,rax mov ecx,0B102 mov rdx,7FF9FBF36F48 call CORINFO_HELP_STRCNS mov r8,rax mov rdx,rdi mov rcx,rsi call 00007FF9FBD57A88 mov rcx,rsi call CORINFO_HELP_THROW M02_L05: call System.ThrowHelper.ThrowInvalidOperationException_InvalidOperation_NoValue() int 3 ; Total bytes of code 491 ``` ### 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)
DrewScoggins commented 3 years ago

For Double: https://github.com/dotnet/runtime/pull/48568