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

Regressions in System.Tests.Perf_Uri #78975

Closed
performanceautofiler bot opened this issue Nov 29, 2022 · 13 comments
Closed

Regressions in System.Tests.Perf_Uri #78975

performanceautofiler bot opened this issue Nov 29, 2022 · 13 comments
Labels
area-System.Net tenet-performance Performance related issue tenet-performance-benchmarks Issue from performance benchmark
Milestone

Comments

@performanceautofiler
Copy link

Run Information

Architecture x64
OS Windows 10.0.18362
Baseline 3d4f51254ab9993276c743c8f0fbe6879179daa6
Compare 0fffb89ff019bff325cea3ca90a91eec174d5968
Diff Diff

Regressions in System.Tests.Perf_Uri

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
Ctor - Duration of single invocation 119.50 ns 132.84 ns 1.11 0.00 False 1253.83267630311 1432.1501050953107 1.1422178829458844 Trace Trace

graph
Test Report

Repro

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Tests.Perf_Uri*'

Payloads

Baseline
Compare

Histogram

System.Tests.Perf_Uri.Ctor


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 132.8406412599579 > 125.89656837167281.
IsChangePoint: Marked as a change because one of 10/24/2022 10:11:47 PM, 11/23/2022 1:02:40 AM, 11/29/2022 1:43:29 AM falls between 11/20/2022 12:28:28 PM and 11/29/2022 1:43:29 AM.
IsRegressionStdDev: Marked as regression because -64.69904615703888 (T) = (0 -131.85713555475974) / Math.Sqrt((0.4626390234478732 / (29)) + (0.5016694137124285 / (26))) is less than -2.005745995316835 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (29) + (26) - 2, .025) and -0.10146917250970292 = (119.71023687782619 - 131.85713555475974) / 119.71023687782619 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.Tests.Perf_Uri.Ctor()
       push      rsi
       sub       rsp,30
       mov       rcx,offset MT_System.Uri
       call      CORINFO_HELP_NEWSFAST
       mov       rsi,rax
       lea       rcx,[rsp+28]
       mov       byte ptr [rcx],0
       mov       [rsp+20],rcx
       mov       rcx,rsi
       mov       rdx,1F9A3616620
       xor       r8d,r8d
       mov       r9d,1
       call      qword ptr [7FF9C3BD3D20]; System.Uri.CreateThis(System.String, Boolean, System.UriKind, System.UriCreationOptions ByRef)
       mov       rax,rsi
       add       rsp,30
       pop       rsi
       ret
; Total bytes of code 73
; System.Uri.CreateThis(System.String, Boolean, System.UriKind, System.UriCreationOptions ByRef)
       push      rdi
       push      rsi
       push      rbx
       sub       rsp,30
       xor       eax,eax
       mov       [rsp+28],rax
       mov       rsi,rcx
       mov       ebx,r8d
       mov       edi,r9d
       test      edi,edi
       jl        short M01_L03
       cmp       edi,2
       jg        short M01_L03
       test      rdx,rdx
       jne       short M01_L00
       mov       rdx,1F9A3610008
M01_L00:
       lea       rcx,[rsi+8]
       call      CORINFO_HELP_ASSIGN_REF
       test      bl,bl
       je        short M01_L01
       or        qword ptr [rsi+28],80000
M01_L01:
       mov       rbx,[rsp+70]
       cmp       byte ptr [rbx],0
       je        short M01_L02
       mov       rcx,200000000000
       or        [rsi+28],rcx
M01_L02:
       mov       rcx,[rsi+8]
       lea       rdx,[rsi+28]
       lea       r8,[rsi+18]
       call      qword ptr [7FF9C3BD39D8]; System.Uri.ParseScheme(System.String, Flags ByRef, System.UriParser ByRef)
       mov       edx,eax
       lea       r9,[rsp+28]
       mov       rcx,rsi
       mov       r8d,edi
       call      qword ptr [7FF9C3BD3D38]; System.Uri.InitializeUri(System.ParsingError, System.UriKind, System.UriFormatException ByRef)
       cmp       qword ptr [rsp+28],0
       jne       short M01_L04
       add       rsp,30
       pop       rbx
       pop       rsi
       pop       rdi
       ret
M01_L03:
       mov       rcx,offset MT_System.UriKind
       call      CORINFO_HELP_NEWSFAST
       mov       rsi,rax
       call      qword ptr [7FF9C3BD5318]
       mov       rbx,rax
       mov       [rsi+8],edi
       mov       rcx,offset MT_System.ArgumentException
       call      CORINFO_HELP_NEWSFAST
       mov       rdi,rax
       mov       rdx,rsi
       mov       rcx,rbx
       call      qword ptr [7FF9C3BD5198]
       mov       rdx,rax
       mov       rcx,rdi
       call      qword ptr [7FF9C388BB88]
       mov       rcx,rdi
       call      CORINFO_HELP_THROW
M01_L04:
       mov       rcx,[rsp+28]
       call      CORINFO_HELP_THROW
       int       3
; Total bytes of code 236

Compare Jit Disasm

; System.Tests.Perf_Uri.Ctor()
       push      rsi
       sub       rsp,30
       mov       rcx,offset MT_System.Uri
       call      CORINFO_HELP_NEWSFAST
       mov       rsi,rax
       lea       rcx,[rsp+28]
       mov       byte ptr [rcx],0
       mov       [rsp+20],rcx
       mov       rcx,rsi
       mov       rdx,2D6B2B065F0
       xor       r8d,r8d
       mov       r9d,1
       call      qword ptr [7FFC6D113D20]; System.Uri.CreateThis(System.String, Boolean, System.UriKind, System.UriCreationOptions ByRef)
       mov       rax,rsi
       add       rsp,30
       pop       rsi
       ret
; Total bytes of code 73
; System.Uri.CreateThis(System.String, Boolean, System.UriKind, System.UriCreationOptions ByRef)
       push      rdi
       push      rsi
       push      rbx
       sub       rsp,30
       xor       eax,eax
       mov       [rsp+28],rax
       mov       rsi,rcx
       mov       ebx,r8d
       mov       edi,r9d
       test      edi,edi
       jl        short M01_L03
       cmp       edi,2
       jg        short M01_L03
       test      rdx,rdx
       jne       short M01_L00
       mov       rdx,2D6B2B00008
M01_L00:
       lea       rcx,[rsi+8]
       call      CORINFO_HELP_ASSIGN_REF
       test      bl,bl
       je        short M01_L01
       or        qword ptr [rsi+28],80000
M01_L01:
       mov       rbx,[rsp+70]
       cmp       byte ptr [rbx],0
       je        short M01_L02
       mov       rcx,200000000000
       or        [rsi+28],rcx
M01_L02:
       mov       rcx,[rsi+8]
       lea       rdx,[rsi+28]
       lea       r8,[rsi+18]
       call      qword ptr [7FFC6D1139D8]; System.Uri.ParseScheme(System.String, Flags ByRef, System.UriParser ByRef)
       mov       edx,eax
       lea       r9,[rsp+28]
       mov       rcx,rsi
       mov       r8d,edi
       call      qword ptr [7FFC6D113D38]; System.Uri.InitializeUri(System.ParsingError, System.UriKind, System.UriFormatException ByRef)
       cmp       qword ptr [rsp+28],0
       jne       short M01_L04
       add       rsp,30
       pop       rbx
       pop       rsi
       pop       rdi
       ret
M01_L03:
       mov       rcx,offset MT_System.UriKind
       call      CORINFO_HELP_NEWSFAST
       mov       rsi,rax
       call      qword ptr [7FFC6D115318]
       mov       rbx,rax
       mov       [rsi+8],edi
       mov       rcx,offset MT_System.ArgumentException
       call      CORINFO_HELP_NEWSFAST
       mov       rdi,rax
       mov       rdx,rsi
       mov       rcx,rbx
       call      qword ptr [7FFC6D115198]
       mov       rdx,rax
       mov       rcx,rdi
       call      qword ptr [7FFC6CDCBB88]
       mov       rcx,rdi
       call      CORINFO_HELP_THROW
M01_L04:
       mov       rcx,[rsp+28]
       call      CORINFO_HELP_THROW
       int       3
; Total bytes of code 236

Docs

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

@performanceautofiler performanceautofiler bot added CoreClr untriaged New issue has not been triaged by the area owner labels Nov 29, 2022
@EgorBo EgorBo changed the title [Perf] Windows/x64: 1 Regression on 11/23/2022 5:21:28 AM Regressions in System.Tests.Perf_Uri Nov 29, 2022
@EgorBo EgorBo removed refs/heads/main untriaged New issue has not been triaged by the area owner labels Nov 29, 2022
@EgorBo EgorBo transferred this issue from dotnet/perf-autofiling-issues Nov 29, 2022
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Nov 29, 2022
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Nov 29, 2022
@ghost
Copy link

ghost commented Nov 29, 2022

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

Issue Details

Run Information

Architecture x64
OS Windows 10.0.18362
Baseline 3d4f51254ab9993276c743c8f0fbe6879179daa6
Compare 0fffb89ff019bff325cea3ca90a91eec174d5968
Diff Diff

Regressions in System.Tests.Perf_Uri

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
Ctor - Duration of single invocation 119.50 ns 132.84 ns 1.11 0.00 False 1253.83267630311 1432.1501050953107 1.1422178829458844 Trace Trace

graph
Test Report

Repro

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Tests.Perf_Uri*'

Payloads

Baseline
Compare

Histogram

System.Tests.Perf_Uri.Ctor


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 132.8406412599579 > 125.89656837167281.
IsChangePoint: Marked as a change because one of 10/24/2022 10:11:47 PM, 11/23/2022 1:02:40 AM, 11/29/2022 1:43:29 AM falls between 11/20/2022 12:28:28 PM and 11/29/2022 1:43:29 AM.
IsRegressionStdDev: Marked as regression because -64.69904615703888 (T) = (0 -131.85713555475974) / Math.Sqrt((0.4626390234478732 / (29)) + (0.5016694137124285 / (26))) is less than -2.005745995316835 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (29) + (26) - 2, .025) and -0.10146917250970292 = (119.71023687782619 - 131.85713555475974) / 119.71023687782619 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.Tests.Perf_Uri.Ctor()
       push      rsi
       sub       rsp,30
       mov       rcx,offset MT_System.Uri
       call      CORINFO_HELP_NEWSFAST
       mov       rsi,rax
       lea       rcx,[rsp+28]
       mov       byte ptr [rcx],0
       mov       [rsp+20],rcx
       mov       rcx,rsi
       mov       rdx,1F9A3616620
       xor       r8d,r8d
       mov       r9d,1
       call      qword ptr [7FF9C3BD3D20]; System.Uri.CreateThis(System.String, Boolean, System.UriKind, System.UriCreationOptions ByRef)
       mov       rax,rsi
       add       rsp,30
       pop       rsi
       ret
; Total bytes of code 73
; System.Uri.CreateThis(System.String, Boolean, System.UriKind, System.UriCreationOptions ByRef)
       push      rdi
       push      rsi
       push      rbx
       sub       rsp,30
       xor       eax,eax
       mov       [rsp+28],rax
       mov       rsi,rcx
       mov       ebx,r8d
       mov       edi,r9d
       test      edi,edi
       jl        short M01_L03
       cmp       edi,2
       jg        short M01_L03
       test      rdx,rdx
       jne       short M01_L00
       mov       rdx,1F9A3610008
M01_L00:
       lea       rcx,[rsi+8]
       call      CORINFO_HELP_ASSIGN_REF
       test      bl,bl
       je        short M01_L01
       or        qword ptr [rsi+28],80000
M01_L01:
       mov       rbx,[rsp+70]
       cmp       byte ptr [rbx],0
       je        short M01_L02
       mov       rcx,200000000000
       or        [rsi+28],rcx
M01_L02:
       mov       rcx,[rsi+8]
       lea       rdx,[rsi+28]
       lea       r8,[rsi+18]
       call      qword ptr [7FF9C3BD39D8]; System.Uri.ParseScheme(System.String, Flags ByRef, System.UriParser ByRef)
       mov       edx,eax
       lea       r9,[rsp+28]
       mov       rcx,rsi
       mov       r8d,edi
       call      qword ptr [7FF9C3BD3D38]; System.Uri.InitializeUri(System.ParsingError, System.UriKind, System.UriFormatException ByRef)
       cmp       qword ptr [rsp+28],0
       jne       short M01_L04
       add       rsp,30
       pop       rbx
       pop       rsi
       pop       rdi
       ret
M01_L03:
       mov       rcx,offset MT_System.UriKind
       call      CORINFO_HELP_NEWSFAST
       mov       rsi,rax
       call      qword ptr [7FF9C3BD5318]
       mov       rbx,rax
       mov       [rsi+8],edi
       mov       rcx,offset MT_System.ArgumentException
       call      CORINFO_HELP_NEWSFAST
       mov       rdi,rax
       mov       rdx,rsi
       mov       rcx,rbx
       call      qword ptr [7FF9C3BD5198]
       mov       rdx,rax
       mov       rcx,rdi
       call      qword ptr [7FF9C388BB88]
       mov       rcx,rdi
       call      CORINFO_HELP_THROW
M01_L04:
       mov       rcx,[rsp+28]
       call      CORINFO_HELP_THROW
       int       3
; Total bytes of code 236

Compare Jit Disasm

; System.Tests.Perf_Uri.Ctor()
       push      rsi
       sub       rsp,30
       mov       rcx,offset MT_System.Uri
       call      CORINFO_HELP_NEWSFAST
       mov       rsi,rax
       lea       rcx,[rsp+28]
       mov       byte ptr [rcx],0
       mov       [rsp+20],rcx
       mov       rcx,rsi
       mov       rdx,2D6B2B065F0
       xor       r8d,r8d
       mov       r9d,1
       call      qword ptr [7FFC6D113D20]; System.Uri.CreateThis(System.String, Boolean, System.UriKind, System.UriCreationOptions ByRef)
       mov       rax,rsi
       add       rsp,30
       pop       rsi
       ret
; Total bytes of code 73
; System.Uri.CreateThis(System.String, Boolean, System.UriKind, System.UriCreationOptions ByRef)
       push      rdi
       push      rsi
       push      rbx
       sub       rsp,30
       xor       eax,eax
       mov       [rsp+28],rax
       mov       rsi,rcx
       mov       ebx,r8d
       mov       edi,r9d
       test      edi,edi
       jl        short M01_L03
       cmp       edi,2
       jg        short M01_L03
       test      rdx,rdx
       jne       short M01_L00
       mov       rdx,2D6B2B00008
M01_L00:
       lea       rcx,[rsi+8]
       call      CORINFO_HELP_ASSIGN_REF
       test      bl,bl
       je        short M01_L01
       or        qword ptr [rsi+28],80000
M01_L01:
       mov       rbx,[rsp+70]
       cmp       byte ptr [rbx],0
       je        short M01_L02
       mov       rcx,200000000000
       or        [rsi+28],rcx
M01_L02:
       mov       rcx,[rsi+8]
       lea       rdx,[rsi+28]
       lea       r8,[rsi+18]
       call      qword ptr [7FFC6D1139D8]; System.Uri.ParseScheme(System.String, Flags ByRef, System.UriParser ByRef)
       mov       edx,eax
       lea       r9,[rsp+28]
       mov       rcx,rsi
       mov       r8d,edi
       call      qword ptr [7FFC6D113D38]; System.Uri.InitializeUri(System.ParsingError, System.UriKind, System.UriFormatException ByRef)
       cmp       qword ptr [rsp+28],0
       jne       short M01_L04
       add       rsp,30
       pop       rbx
       pop       rsi
       pop       rdi
       ret
M01_L03:
       mov       rcx,offset MT_System.UriKind
       call      CORINFO_HELP_NEWSFAST
       mov       rsi,rax
       call      qword ptr [7FFC6D115318]
       mov       rbx,rax
       mov       [rsi+8],edi
       mov       rcx,offset MT_System.ArgumentException
       call      CORINFO_HELP_NEWSFAST
       mov       rdi,rax
       mov       rdx,rsi
       mov       rcx,rbx
       call      qword ptr [7FFC6D115198]
       mov       rdx,rax
       mov       rcx,rdi
       call      qword ptr [7FFC6CDCBB88]
       mov       rcx,rdi
       call      CORINFO_HELP_THROW
M01_L04:
       mov       rcx,[rsp+28]
       call      CORINFO_HELP_THROW
       int       3
; Total bytes of code 236

Docs

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

Author: performanceautofiler[bot]
Assignees: DrewScoggins
Labels:

area-CodeGen-coreclr

Milestone: -

@EgorBo EgorBo added tenet-performance Performance related issue tenet-performance-benchmarks Issue from performance benchmark area-System.Runtime and removed area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI labels Nov 29, 2022
@ghost
Copy link

ghost commented Nov 29, 2022

Tagging subscribers to this area: @dotnet/area-system-runtime
See info in area-owners.md if you want to be subscribed.

Issue Details

Run Information

Architecture x64
OS Windows 10.0.18362
Baseline 3d4f51254ab9993276c743c8f0fbe6879179daa6
Compare 0fffb89ff019bff325cea3ca90a91eec174d5968
Diff Diff

Regressions in System.Tests.Perf_Uri

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
Ctor - Duration of single invocation 119.50 ns 132.84 ns 1.11 0.00 False 1253.83267630311 1432.1501050953107 1.1422178829458844 Trace Trace

graph
Test Report

Repro

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Tests.Perf_Uri*'

Payloads

Baseline
Compare

Histogram

System.Tests.Perf_Uri.Ctor


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 132.8406412599579 > 125.89656837167281.
IsChangePoint: Marked as a change because one of 10/24/2022 10:11:47 PM, 11/23/2022 1:02:40 AM, 11/29/2022 1:43:29 AM falls between 11/20/2022 12:28:28 PM and 11/29/2022 1:43:29 AM.
IsRegressionStdDev: Marked as regression because -64.69904615703888 (T) = (0 -131.85713555475974) / Math.Sqrt((0.4626390234478732 / (29)) + (0.5016694137124285 / (26))) is less than -2.005745995316835 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (29) + (26) - 2, .025) and -0.10146917250970292 = (119.71023687782619 - 131.85713555475974) / 119.71023687782619 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.Tests.Perf_Uri.Ctor()
       push      rsi
       sub       rsp,30
       mov       rcx,offset MT_System.Uri
       call      CORINFO_HELP_NEWSFAST
       mov       rsi,rax
       lea       rcx,[rsp+28]
       mov       byte ptr [rcx],0
       mov       [rsp+20],rcx
       mov       rcx,rsi
       mov       rdx,1F9A3616620
       xor       r8d,r8d
       mov       r9d,1
       call      qword ptr [7FF9C3BD3D20]; System.Uri.CreateThis(System.String, Boolean, System.UriKind, System.UriCreationOptions ByRef)
       mov       rax,rsi
       add       rsp,30
       pop       rsi
       ret
; Total bytes of code 73
; System.Uri.CreateThis(System.String, Boolean, System.UriKind, System.UriCreationOptions ByRef)
       push      rdi
       push      rsi
       push      rbx
       sub       rsp,30
       xor       eax,eax
       mov       [rsp+28],rax
       mov       rsi,rcx
       mov       ebx,r8d
       mov       edi,r9d
       test      edi,edi
       jl        short M01_L03
       cmp       edi,2
       jg        short M01_L03
       test      rdx,rdx
       jne       short M01_L00
       mov       rdx,1F9A3610008
M01_L00:
       lea       rcx,[rsi+8]
       call      CORINFO_HELP_ASSIGN_REF
       test      bl,bl
       je        short M01_L01
       or        qword ptr [rsi+28],80000
M01_L01:
       mov       rbx,[rsp+70]
       cmp       byte ptr [rbx],0
       je        short M01_L02
       mov       rcx,200000000000
       or        [rsi+28],rcx
M01_L02:
       mov       rcx,[rsi+8]
       lea       rdx,[rsi+28]
       lea       r8,[rsi+18]
       call      qword ptr [7FF9C3BD39D8]; System.Uri.ParseScheme(System.String, Flags ByRef, System.UriParser ByRef)
       mov       edx,eax
       lea       r9,[rsp+28]
       mov       rcx,rsi
       mov       r8d,edi
       call      qword ptr [7FF9C3BD3D38]; System.Uri.InitializeUri(System.ParsingError, System.UriKind, System.UriFormatException ByRef)
       cmp       qword ptr [rsp+28],0
       jne       short M01_L04
       add       rsp,30
       pop       rbx
       pop       rsi
       pop       rdi
       ret
M01_L03:
       mov       rcx,offset MT_System.UriKind
       call      CORINFO_HELP_NEWSFAST
       mov       rsi,rax
       call      qword ptr [7FF9C3BD5318]
       mov       rbx,rax
       mov       [rsi+8],edi
       mov       rcx,offset MT_System.ArgumentException
       call      CORINFO_HELP_NEWSFAST
       mov       rdi,rax
       mov       rdx,rsi
       mov       rcx,rbx
       call      qword ptr [7FF9C3BD5198]
       mov       rdx,rax
       mov       rcx,rdi
       call      qword ptr [7FF9C388BB88]
       mov       rcx,rdi
       call      CORINFO_HELP_THROW
M01_L04:
       mov       rcx,[rsp+28]
       call      CORINFO_HELP_THROW
       int       3
; Total bytes of code 236

Compare Jit Disasm

; System.Tests.Perf_Uri.Ctor()
       push      rsi
       sub       rsp,30
       mov       rcx,offset MT_System.Uri
       call      CORINFO_HELP_NEWSFAST
       mov       rsi,rax
       lea       rcx,[rsp+28]
       mov       byte ptr [rcx],0
       mov       [rsp+20],rcx
       mov       rcx,rsi
       mov       rdx,2D6B2B065F0
       xor       r8d,r8d
       mov       r9d,1
       call      qword ptr [7FFC6D113D20]; System.Uri.CreateThis(System.String, Boolean, System.UriKind, System.UriCreationOptions ByRef)
       mov       rax,rsi
       add       rsp,30
       pop       rsi
       ret
; Total bytes of code 73
; System.Uri.CreateThis(System.String, Boolean, System.UriKind, System.UriCreationOptions ByRef)
       push      rdi
       push      rsi
       push      rbx
       sub       rsp,30
       xor       eax,eax
       mov       [rsp+28],rax
       mov       rsi,rcx
       mov       ebx,r8d
       mov       edi,r9d
       test      edi,edi
       jl        short M01_L03
       cmp       edi,2
       jg        short M01_L03
       test      rdx,rdx
       jne       short M01_L00
       mov       rdx,2D6B2B00008
M01_L00:
       lea       rcx,[rsi+8]
       call      CORINFO_HELP_ASSIGN_REF
       test      bl,bl
       je        short M01_L01
       or        qword ptr [rsi+28],80000
M01_L01:
       mov       rbx,[rsp+70]
       cmp       byte ptr [rbx],0
       je        short M01_L02
       mov       rcx,200000000000
       or        [rsi+28],rcx
M01_L02:
       mov       rcx,[rsi+8]
       lea       rdx,[rsi+28]
       lea       r8,[rsi+18]
       call      qword ptr [7FFC6D1139D8]; System.Uri.ParseScheme(System.String, Flags ByRef, System.UriParser ByRef)
       mov       edx,eax
       lea       r9,[rsp+28]
       mov       rcx,rsi
       mov       r8d,edi
       call      qword ptr [7FFC6D113D38]; System.Uri.InitializeUri(System.ParsingError, System.UriKind, System.UriFormatException ByRef)
       cmp       qword ptr [rsp+28],0
       jne       short M01_L04
       add       rsp,30
       pop       rbx
       pop       rsi
       pop       rdi
       ret
M01_L03:
       mov       rcx,offset MT_System.UriKind
       call      CORINFO_HELP_NEWSFAST
       mov       rsi,rax
       call      qword ptr [7FFC6D115318]
       mov       rbx,rax
       mov       [rsi+8],edi
       mov       rcx,offset MT_System.ArgumentException
       call      CORINFO_HELP_NEWSFAST
       mov       rdi,rax
       mov       rdx,rsi
       mov       rcx,rbx
       call      qword ptr [7FFC6D115198]
       mov       rdx,rax
       mov       rcx,rdi
       call      qword ptr [7FFC6CDCBB88]
       mov       rcx,rdi
       call      CORINFO_HELP_THROW
M01_L04:
       mov       rcx,[rsp+28]
       call      CORINFO_HELP_THROW
       int       3
; Total bytes of code 236

Docs

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

Author: performanceautofiler[bot]
Assignees: -
Labels:

area-System.Runtime, tenet-performance, tenet-performance-benchmarks, untriaged

Milestone: -

@EgorBo
Copy link
Member

EgorBo commented Nov 29, 2022

@MihaZupan likely regresses via #78666

@ghost
Copy link

ghost commented Nov 29, 2022

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Issue Details

Run Information

Architecture x64
OS Windows 10.0.18362
Baseline 3d4f51254ab9993276c743c8f0fbe6879179daa6
Compare 0fffb89ff019bff325cea3ca90a91eec174d5968
Diff Diff

Regressions in System.Tests.Perf_Uri

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
Ctor - Duration of single invocation 119.50 ns 132.84 ns 1.11 0.00 False 1253.83267630311 1432.1501050953107 1.1422178829458844 Trace Trace

graph
Test Report

Repro

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Tests.Perf_Uri*'

Payloads

Baseline
Compare

Histogram

System.Tests.Perf_Uri.Ctor


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 132.8406412599579 > 125.89656837167281.
IsChangePoint: Marked as a change because one of 10/24/2022 10:11:47 PM, 11/23/2022 1:02:40 AM, 11/29/2022 1:43:29 AM falls between 11/20/2022 12:28:28 PM and 11/29/2022 1:43:29 AM.
IsRegressionStdDev: Marked as regression because -64.69904615703888 (T) = (0 -131.85713555475974) / Math.Sqrt((0.4626390234478732 / (29)) + (0.5016694137124285 / (26))) is less than -2.005745995316835 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (29) + (26) - 2, .025) and -0.10146917250970292 = (119.71023687782619 - 131.85713555475974) / 119.71023687782619 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.Tests.Perf_Uri.Ctor()
       push      rsi
       sub       rsp,30
       mov       rcx,offset MT_System.Uri
       call      CORINFO_HELP_NEWSFAST
       mov       rsi,rax
       lea       rcx,[rsp+28]
       mov       byte ptr [rcx],0
       mov       [rsp+20],rcx
       mov       rcx,rsi
       mov       rdx,1F9A3616620
       xor       r8d,r8d
       mov       r9d,1
       call      qword ptr [7FF9C3BD3D20]; System.Uri.CreateThis(System.String, Boolean, System.UriKind, System.UriCreationOptions ByRef)
       mov       rax,rsi
       add       rsp,30
       pop       rsi
       ret
; Total bytes of code 73
; System.Uri.CreateThis(System.String, Boolean, System.UriKind, System.UriCreationOptions ByRef)
       push      rdi
       push      rsi
       push      rbx
       sub       rsp,30
       xor       eax,eax
       mov       [rsp+28],rax
       mov       rsi,rcx
       mov       ebx,r8d
       mov       edi,r9d
       test      edi,edi
       jl        short M01_L03
       cmp       edi,2
       jg        short M01_L03
       test      rdx,rdx
       jne       short M01_L00
       mov       rdx,1F9A3610008
M01_L00:
       lea       rcx,[rsi+8]
       call      CORINFO_HELP_ASSIGN_REF
       test      bl,bl
       je        short M01_L01
       or        qword ptr [rsi+28],80000
M01_L01:
       mov       rbx,[rsp+70]
       cmp       byte ptr [rbx],0
       je        short M01_L02
       mov       rcx,200000000000
       or        [rsi+28],rcx
M01_L02:
       mov       rcx,[rsi+8]
       lea       rdx,[rsi+28]
       lea       r8,[rsi+18]
       call      qword ptr [7FF9C3BD39D8]; System.Uri.ParseScheme(System.String, Flags ByRef, System.UriParser ByRef)
       mov       edx,eax
       lea       r9,[rsp+28]
       mov       rcx,rsi
       mov       r8d,edi
       call      qword ptr [7FF9C3BD3D38]; System.Uri.InitializeUri(System.ParsingError, System.UriKind, System.UriFormatException ByRef)
       cmp       qword ptr [rsp+28],0
       jne       short M01_L04
       add       rsp,30
       pop       rbx
       pop       rsi
       pop       rdi
       ret
M01_L03:
       mov       rcx,offset MT_System.UriKind
       call      CORINFO_HELP_NEWSFAST
       mov       rsi,rax
       call      qword ptr [7FF9C3BD5318]
       mov       rbx,rax
       mov       [rsi+8],edi
       mov       rcx,offset MT_System.ArgumentException
       call      CORINFO_HELP_NEWSFAST
       mov       rdi,rax
       mov       rdx,rsi
       mov       rcx,rbx
       call      qword ptr [7FF9C3BD5198]
       mov       rdx,rax
       mov       rcx,rdi
       call      qword ptr [7FF9C388BB88]
       mov       rcx,rdi
       call      CORINFO_HELP_THROW
M01_L04:
       mov       rcx,[rsp+28]
       call      CORINFO_HELP_THROW
       int       3
; Total bytes of code 236

Compare Jit Disasm

; System.Tests.Perf_Uri.Ctor()
       push      rsi
       sub       rsp,30
       mov       rcx,offset MT_System.Uri
       call      CORINFO_HELP_NEWSFAST
       mov       rsi,rax
       lea       rcx,[rsp+28]
       mov       byte ptr [rcx],0
       mov       [rsp+20],rcx
       mov       rcx,rsi
       mov       rdx,2D6B2B065F0
       xor       r8d,r8d
       mov       r9d,1
       call      qword ptr [7FFC6D113D20]; System.Uri.CreateThis(System.String, Boolean, System.UriKind, System.UriCreationOptions ByRef)
       mov       rax,rsi
       add       rsp,30
       pop       rsi
       ret
; Total bytes of code 73
; System.Uri.CreateThis(System.String, Boolean, System.UriKind, System.UriCreationOptions ByRef)
       push      rdi
       push      rsi
       push      rbx
       sub       rsp,30
       xor       eax,eax
       mov       [rsp+28],rax
       mov       rsi,rcx
       mov       ebx,r8d
       mov       edi,r9d
       test      edi,edi
       jl        short M01_L03
       cmp       edi,2
       jg        short M01_L03
       test      rdx,rdx
       jne       short M01_L00
       mov       rdx,2D6B2B00008
M01_L00:
       lea       rcx,[rsi+8]
       call      CORINFO_HELP_ASSIGN_REF
       test      bl,bl
       je        short M01_L01
       or        qword ptr [rsi+28],80000
M01_L01:
       mov       rbx,[rsp+70]
       cmp       byte ptr [rbx],0
       je        short M01_L02
       mov       rcx,200000000000
       or        [rsi+28],rcx
M01_L02:
       mov       rcx,[rsi+8]
       lea       rdx,[rsi+28]
       lea       r8,[rsi+18]
       call      qword ptr [7FFC6D1139D8]; System.Uri.ParseScheme(System.String, Flags ByRef, System.UriParser ByRef)
       mov       edx,eax
       lea       r9,[rsp+28]
       mov       rcx,rsi
       mov       r8d,edi
       call      qword ptr [7FFC6D113D38]; System.Uri.InitializeUri(System.ParsingError, System.UriKind, System.UriFormatException ByRef)
       cmp       qword ptr [rsp+28],0
       jne       short M01_L04
       add       rsp,30
       pop       rbx
       pop       rsi
       pop       rdi
       ret
M01_L03:
       mov       rcx,offset MT_System.UriKind
       call      CORINFO_HELP_NEWSFAST
       mov       rsi,rax
       call      qword ptr [7FFC6D115318]
       mov       rbx,rax
       mov       [rsi+8],edi
       mov       rcx,offset MT_System.ArgumentException
       call      CORINFO_HELP_NEWSFAST
       mov       rdi,rax
       mov       rdx,rsi
       mov       rcx,rbx
       call      qword ptr [7FFC6D115198]
       mov       rdx,rax
       mov       rcx,rdi
       call      qword ptr [7FFC6CDCBB88]
       mov       rcx,rdi
       call      CORINFO_HELP_THROW
M01_L04:
       mov       rcx,[rsp+28]
       call      CORINFO_HELP_THROW
       int       3
; Total bytes of code 236

Docs

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

Author: performanceautofiler[bot]
Assignees: MihaZupan
Labels:

area-System.Net, tenet-performance, tenet-performance-benchmarks, untriaged

Milestone: -

@MihaZupan
Copy link
Member

I'll take a look

@MihaZupan
Copy link
Member

MihaZupan commented Nov 29, 2022

This specific benchmark is

public Uri Ctor() => new Uri("http://dot.net");

I'll double-check the numbers locally, but some regression is not unreasonable given the host is relatively short (7 chars aka max before it becomes fast 😄), so the new approach with vectorization doesn't help at all.

@MihaZupan
Copy link
Member

MihaZupan commented Nov 30, 2022

Can we treat this as a new baseline for this benchmark?

This method is now using 3 vectorized helpers for the purposes of this benchmark:

  • Initial scan of the whole input for any invalid characters (IndexOfAnyValues)
  • IndexOfAny(4 chars) for every label to find the next dot
  • IndexOfAnyExceptInRange on each label slice to check for non-ASCII
    • This should get a little cheaper when Ascii APIs are available

All three fall back to scalar paths because the input is short in this benchmark.
The assumption I made in #78666 is that it's more common for input to be longer, such that a dual-pass over the input is more efficient if both passes are vectorized. If only scalar paths are used, then that is not the case and the old approach with a single pass wins out.

@dakersnar
Copy link
Contributor

@MihaZupan another regression here dotnet/perf-autofiling-issues#10174, I'm assuming this is the same case?

@dakersnar dakersnar reopened this Dec 1, 2022
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Dec 1, 2022
@dakersnar dakersnar added the untriaged New issue has not been triaged by the area owner label Dec 1, 2022
@dakersnar
Copy link
Contributor

(Whoops, accidental close)

@MihaZupan
Copy link
Member

Yep, that one is the same Perf_Uri Ctor benchmark.

@MihaZupan MihaZupan removed their assignment Dec 5, 2022
@MihaZupan
Copy link
Member

Closing this per comment above: #78975 (comment)

@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Dec 5, 2022
@stephentoub
Copy link
Member

Should we be augmenting the benchmark to also test a longer url?

@MihaZupan
Copy link
Member

Should we be augmenting the benchmark to also test a longer url?

dotnet/performance#2772

@ghost ghost locked as resolved and limited conversation to collaborators Jan 5, 2023
@karelz karelz added this to the 8.0.0 milestone Mar 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Net tenet-performance Performance related issue tenet-performance-benchmarks Issue from performance benchmark
Projects
None yet
Development

No branches or pull requests

6 participants