Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Perf] Windows/x64: 1 Regression on 1/15/2023 6:48:05 PM #12004

Closed
performanceautofiler bot opened this issue Jan 24, 2023 · 1 comment
Closed

[Perf] Windows/x64: 1 Regression on 1/15/2023 6:48:05 PM #12004

performanceautofiler bot opened this issue Jan 24, 2023 · 1 comment

Comments

@performanceautofiler
Copy link

performanceautofiler bot commented Jan 24, 2023

Run Information

Architecture x64
OS Windows 10.0.18362
Baseline 2eca2d319bf8d1247edf38facfdd501e0e2f0030
Compare 51a8dd5323721b363e61069575511f783e7ea6d3
Diff Diff

Regressions in System.Buffers.Text.Tests.Utf8FormatterTests

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
FormatterInt64 - Duration of single invocation 30.72 ns 33.74 ns 1.10 0.02 False 345.553769409794 382.19085528190385 1.1060242692032736 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.Buffers.Text.Tests.Utf8FormatterTests*'

Payloads

Baseline
Compare

Histogram

System.Buffers.Text.Tests.Utf8FormatterTests.FormatterInt64(value: 9223372036854775807)


Description of detection logic

IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline.
IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small.
IsRegressionBase: Marked as regression because the compare was 5% greater than the baseline, and the value was not too small.
IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline.
IsRegressionWindowed: Marked as regression because 33.735512692343335 > 32.26736005931942.
IsChangePoint: Marked as a change because one of 1/15/2023 4:08:29 PM, 1/24/2023 6:33:57 AM falls between 1/15/2023 4:08:29 PM and 1/24/2023 6:33:57 AM.
IsRegressionStdDev: Marked as regression because -26.878842632971974 (T) = (0 -34.935854550668715) / Math.Sqrt((0.12197983608550336 / (15)) + (0.7903162659861526 / (54))) is less than -1.9960083540247138 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (15) + (54) - 2, .025) and -0.13133752397716875 = (30.880134186527474 - 34.935854550668715) / 30.880134186527474 is less than -0.05.
IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small.
IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so.

```### Baseline Jit Disasm

```assembly
; System.Buffers.Text.Tests.Utf8FormatterTests.FormatterInt64(Int64)
       push      rdi
       push      rsi
       push      rbx
       sub       rsp,40
       vxorps    xmm4,xmm4,xmm4
       vmovdqu   xmmword ptr [rsp+28],xmm4
       xor       eax,eax
       mov       [rsp+38],rax
       mov       rax,[rcx+8]
       test      rax,rax
       je        near ptr M00_L11
       lea       rsi,[rax+10]
       mov       edi,[rax+8]
M00_L00:
       cmp       rdx,0A
       jae       short M00_L03
       test      edi,edi
       jne       short M00_L01
       xor       edx,edx
       mov       [rsp+38],edx
       jmp       short M00_L02
       nop       dword ptr [rax]
M00_L01:
       add       edx,30
       mov       [rsi],dl
       mov       dword ptr [rsp+38],1
       mov       edx,1
M00_L02:
       mov       eax,edx
       jmp       near ptr M00_L10
M00_L03:
       mov       rbx,rdx
       mov       rcx,rsi
       mov       esi,edi
       test      rbx,rbx
       jge       near ptr M00_L07
       neg       rbx
       mov       rax,rbx
       or        rax,1
       lzcnt     rax,rax
       xor       eax,3F
       cdqe
       mov       rdx,7FFC88098EB0
       movzx     r8d,byte ptr [rax+rdx]
       lea       eax,[r8*8]
       mov       rdx,7FFC8809EFC8
       cmp       rbx,[rax+rdx]
       setb      al
       movzx     eax,al
       sub       r8d,eax
       cmp       r8d,esi
       jl        short M00_L04
       xor       ecx,ecx
       mov       [rsp+38],ecx
       jmp       near ptr M00_L09
M00_L04:
       test      esi,esi
       je        near ptr M00_L13
       mov       byte ptr [rcx],2D
       lea       eax,[r8+1]
       mov       [rsp+38],eax
       mov       eax,r8d
       inc       rax
       mov       edx,esi
       cmp       rax,rdx
       ja        near ptr M00_L12
       inc       rcx
       mov       rdx,rbx
       lea       r9d,[r8-1]
       test      r9d,r9d
       jle       short M00_L06
M00_L05:
       lea       r10,[rdx+30]
       mov       r11,0CCCCCCCCCCCCCCCD
       mov       rax,rdx
       mul       r11
       shr       rdx,3
       cmp       r9d,r8d
       jae       near ptr M00_L13
       mov       eax,r9d
       lea       r11,[rdx+rdx*4]
       add       r11,r11
       sub       r10,r11
       mov       [rcx+rax],r10b
       dec       r9d
       test      r9d,r9d
       jg        short M00_L05
M00_L06:
       test      r8d,r8d
       je        short M00_L13
       lea       rax,[rdx+30]
       mov       [rcx],al
       mov       ecx,1
       jmp       short M00_L09
M00_L07:
       mov       rdi,rcx
       mov       rcx,rbx
       call      qword ptr [7FFC2961B4E0]; System.Buffers.Text.FormattingHelpers.CountDigits(UInt64)
       cmp       eax,esi
       jle       short M00_L08
       xor       eax,eax
       mov       [rsp+38],eax
       xor       ecx,ecx
       jmp       short M00_L09
M00_L08:
       mov       [rsp+38],eax
       cmp       eax,esi
       ja        short M00_L12
       mov       rcx,rbx
       mov       [rsp+28],rdi
       mov       [rsp+30],eax
       lea       rdx,[rsp+28]
       call      qword ptr [7FFC2961B588]; System.Buffers.Text.FormattingHelpers.WriteDigits(UInt64, System.Span`1<Byte>)
       mov       ecx,1
M00_L09:
       mov       eax,ecx
M00_L10:
       add       rsp,40
       pop       rbx
       pop       rsi
       pop       rdi
       ret
M00_L11:
       xor       esi,esi
       xor       edi,edi
       jmp       near ptr M00_L00
M00_L12:
       call      qword ptr [7FFC293EB4E0]
       int       3
M00_L13:
       call      CORINFO_HELP_RNGCHKFAIL
       int       3
; Total bytes of code 410
; System.Buffers.Text.FormattingHelpers.CountDigits(UInt64)
       mov       rax,rcx
       or        rax,1
       lzcnt     rax,rax
       xor       eax,3F
       cdqe
       mov       rdx,7FFC88098EB0
       movzx     eax,byte ptr [rax+rdx]
       lea       edx,[rax*8]
       mov       r8,7FFC8809EFC8
       cmp       rcx,[rdx+r8]
       setb      dl
       movzx     edx,dl
       sub       eax,edx
       ret
; Total bytes of code 61
; System.Buffers.Text.FormattingHelpers.WriteDigits(UInt64, System.Span`1<Byte>)
       sub       rsp,28
       mov       r8,[rdx]
       mov       r9d,[rdx+8]
       lea       r10d,[r9-1]
       test      r10d,r10d
       jle       short M02_L01
M02_L00:
       lea       r11,[rcx+30]
       mov       rdx,0CCCCCCCCCCCCCCCD
       mov       rax,rcx
       mul       rdx
       mov       rcx,rdx
       shr       rcx,3
       cmp       r10d,r9d
       jae       short M02_L02
       mov       eax,r10d
       lea       rdx,[rcx+rcx*4]
       add       rdx,rdx
       sub       r11,rdx
       mov       [r8+rax],r11b
       dec       r10d
       test      r10d,r10d
       jg        short M02_L00
M02_L01:
       test      r9d,r9d
       je        short M02_L02
       lea       rax,[rcx+30]
       mov       [r8],al
       add       rsp,28
       ret
M02_L02:
       call      CORINFO_HELP_RNGCHKFAIL
       int       3
; Total bytes of code 100

Compare Jit Disasm

; System.Buffers.Text.Tests.Utf8FormatterTests.FormatterInt64(Int64)
       push      rdi
       push      rsi
       push      rbx
       sub       rsp,70
       vzeroupper
       xor       eax,eax
       mov       [rsp+28],rax
       vxorps    xmm4,xmm4,xmm4
       vmovdqa   xmmword ptr [rsp+30],xmm4
       vmovdqa   xmmword ptr [rsp+40],xmm4
       vmovdqa   xmmword ptr [rsp+50],xmm4
       vmovdqa   xmmword ptr [rsp+60],xmm4
       mov       rax,[rcx+8]
       test      rax,rax
       je        near ptr M00_L11
       lea       rsi,[rax+10]
       mov       edi,[rax+8]
M00_L00:
       cmp       rdx,0A
       jae       short M00_L03
       test      edi,edi
       jne       short M00_L01
       xor       edx,edx
       mov       [rsp+68],edx
       jmp       short M00_L02
M00_L01:
       add       edx,30
       mov       [rsi],dl
       mov       dword ptr [rsp+68],1
       mov       edx,1
M00_L02:
       mov       eax,edx
       jmp       near ptr M00_L10
M00_L03:
       mov       rbx,rdx
       mov       rcx,rsi
       mov       r8d,edi
       test      rbx,rbx
       jge       near ptr M00_L07
       neg       rbx
       mov       rax,rbx
       or        rax,1
       lzcnt     rax,rax
       xor       eax,3F
       cdqe
       mov       rdx,7FFD333C8130
       movzx     r9d,byte ptr [rax+rdx]
       mov       eax,r9d
       mov       rdx,7FFD333CEAC8
       cmp       rbx,[rdx+rax*8]
       setb      al
       movzx     eax,al
       sub       r9d,eax
       cmp       r9d,r8d
       jl        short M00_L04
       xor       r8d,r8d
       mov       [rsp+68],r8d
       jmp       near ptr M00_L09
M00_L04:
       test      r8d,r8d
       je        near ptr M00_L13
       mov       byte ptr [rcx],2D
       lea       eax,[r9+1]
       mov       [rsp+68],eax
       mov       eax,r9d
       inc       rax
       mov       edx,r8d
       cmp       rax,rdx
       ja        near ptr M00_L12
       inc       rcx
       mov       rdx,rbx
       lea       r8d,[r9-1]
       test      r8d,r8d
       jle       short M00_L06
M00_L05:
       lea       r10,[rdx+30]
       mov       r11,0CCCCCCCCCCCCCCCD
       mov       rax,rdx
       mul       r11
       shr       rdx,3
       cmp       r8d,r9d
       jae       near ptr M00_L13
       mov       eax,r8d
       lea       r11,[rdx+rdx*4]
       add       r11,r11
       sub       r10,r11
       mov       [rcx+rax],r10b
       dec       r8d
       test      r8d,r8d
       jg        short M00_L05
M00_L06:
       test      r9d,r9d
       je        near ptr M00_L13
       add       rdx,30
       mov       [rcx],dl
       mov       r8d,1
       jmp       near ptr M00_L09
M00_L07:
       mov       [rsp+58],rcx
       mov       [rsp+60],r8d
       vxorps    xmm0,xmm0,xmm0
       vmovdqu   xmmword ptr [rsp+38],xmm0
       lea       rcx,[rsp+38]
       mov       rdx,7FFD333C8130
       mov       r8d,40
       call      qword ptr [7FFCD44D79D8]; System.ReadOnlySpan`1[[System.Byte, System.Private.CoreLib]]..ctor(Void*, Int32)
       mov       rsi,[rsp+38]
       mov       rcx,rbx
       call      qword ptr [7FFCD44B3198]; System.Numerics.BitOperations.Log2(UInt64)
       movsxd    rcx,eax
       movzx     r9d,byte ptr [rsi+rcx]
       mov       ecx,r9d
       mov       rdx,7FFD333CEAC8
       cmp       rbx,[rdx+rcx*8]
       setb      cl
       movzx     ecx,cl
       sub       r9d,ecx
       cmp       r9d,[rsp+60]
       jle       short M00_L08
       xor       r9d,r9d
       mov       [rsp+68],r9d
       xor       r8d,r8d
       jmp       short M00_L09
M00_L08:
       mov       [rsp+68],r9d
       lea       rcx,[rsp+58]
       lea       rdx,[rsp+48]
       xor       r8d,r8d
       call      qword ptr [7FFCD459D720]; System.Span`1[[System.Byte, System.Private.CoreLib]].Slice(Int32, Int32)
       mov       rcx,rbx
       mov       rdx,[rsp+48]
       mov       [rsp+28],rdx
       mov       edx,[rsp+50]
       mov       [rsp+30],edx
       lea       rdx,[rsp+28]
       call      qword ptr [7FFCD495B5A0]; System.Buffers.Text.FormattingHelpers.WriteDigits(UInt64, System.Span`1<Byte>)
       mov       r8d,1
M00_L09:
       mov       eax,r8d
M00_L10:
       add       rsp,70
       pop       rbx
       pop       rsi
       pop       rdi
       ret
M00_L11:
       xor       esi,esi
       xor       edi,edi
       jmp       near ptr M00_L00
M00_L12:
       call      qword ptr [7FFCD472B4E0]
       int       3
M00_L13:
       call      CORINFO_HELP_RNGCHKFAIL
       int       3
; Total bytes of code 552
; System.ReadOnlySpan`1[[System.Byte, System.Private.CoreLib]]..ctor(Void*, Int32)
       sub       rsp,28
       test      r8d,r8d
       jl        short M01_L00
       mov       [rcx],rdx
       mov       [rcx+8],r8d
       add       rsp,28
       ret
M01_L00:
       call      qword ptr [7FFCD472B4E0]
       int       3
; Total bytes of code 28
; System.Numerics.BitOperations.Log2(UInt64)
       or        rcx,1
       xor       eax,eax
       lzcnt     rax,rcx
       xor       eax,3F
       ret
; Total bytes of code 15
; System.Span`1[[System.Byte, System.Private.CoreLib]].Slice(Int32, Int32)
       sub       rsp,28
       mov       eax,r8d
       mov       r8d,r9d
       add       r8,rax
       mov       r10d,[rcx+8]
       cmp       r8,r10
       ja        short M03_L00
       add       rax,[rcx]
       mov       [rdx],rax
       mov       [rdx+8],r9d
       mov       rax,rdx
       add       rsp,28
       ret
M03_L00:
       call      qword ptr [7FFCD472B4E0]
       int       3
; Total bytes of code 47
; System.Buffers.Text.FormattingHelpers.WriteDigits(UInt64, System.Span`1<Byte>)
       sub       rsp,28
       mov       r8,[rdx]
       mov       r9d,[rdx+8]
       lea       r10d,[r9-1]
       test      r10d,r10d
       jle       short M04_L01
M04_L00:
       lea       r11,[rcx+30]
       mov       rdx,0CCCCCCCCCCCCCCCD
       mov       rax,rcx
       mul       rdx
       mov       rcx,rdx
       shr       rcx,3
       cmp       r10d,r9d
       jae       short M04_L02
       mov       eax,r10d
       lea       rdx,[rcx+rcx*4]
       add       rdx,rdx
       sub       r11,rdx
       mov       [r8+rax],r11b
       dec       r10d
       test      r10d,r10d
       jg        short M04_L00
M04_L01:
       test      r9d,r9d
       je        short M04_L02
       lea       rax,[rcx+30]
       mov       [r8],al
       add       rsp,28
       ret
M04_L02:
       call      CORINFO_HELP_RNGCHKFAIL
       int       3
; Total bytes of code 100

Docs

Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants