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 10.0.18362/x86 : Improvement on 8/24/2022 9:42:22 AM #8170

Closed
performanceautofiler bot opened this issue Aug 30, 2022 · 0 comments
Closed

Comments

@performanceautofiler
Copy link

performanceautofiler bot commented Aug 30, 2022

Run Information

Architecture x86
OS Windows 10.0.18362
Baseline affc0fc7a79812b92445eb474c87533e32b35127
Compare 86412566424353b2d9b32d629fe7efb66346ac38
Diff Diff

Improvements in System.Collections.IndexerSet<String>

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
Span - Duration of single invocation 332.68 ns 257.47 ns 0.77 0.13 False

graph
Test Report

Repro

git clone https:/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net6.0 --filter 'System.Collections.IndexerSet&lt;String&gt;*'

Payloads

Baseline
Compare

Histogram

System.Collections.IndexerSet<String>.Span(Size: 512)


Description of detection logic

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 257.46639844727986 < 316.08976244862185.
IsChangePoint: Marked as a change because one of 7/14/2022 4:09:15 PM, 7/24/2022 8:36:55 PM, 7/28/2022 3:42:13 AM, 8/16/2022 10:54:40 PM, 8/24/2022 2:39:26 AM, 8/30/2022 12:52:21 AM falls between 8/21/2022 6:52:55 AM and 8/30/2022 12:52:21 AM.
IsImprovementStdDev: Marked as improvement because 14.129495778422278 (T) = (0 -257.3057020661041) / Math.Sqrt((1506.9373419018189 / (299)) + (1.6615168813569512 / (31))) is greater than 1.9672228266464409 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (299) + (31) - 2, .975) and 0.11026710542222755 = (289.194322963871 - 257.3057020661041) / 289.194322963871 is greater than 0.05.
IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so.

Docs

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

### Run Information
Architecture x86
OS Windows 10.0.18362
Baseline affc0fc7a79812b92445eb474c87533e32b35127
Compare 86412566424353b2d9b32d629fe7efb66346ac38
Diff Diff

Improvements in System.Text.Json.Tests.Perf_Get

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
GetSByte - Duration of single invocation 1.28 μs 999.32 ns 0.78 0.01 False Trace Trace

graph
Test Report

Repro

git clone https:/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net6.0 --filter 'System.Text.Json.Tests.Perf_Get*'

Payloads

Baseline
Compare

Histogram

System.Text.Json.Tests.Perf_Get.GetSByte


Description of detection logic

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 999.3216693855356 < 1.2152559247369976.
IsChangePoint: Marked as a change because one of 8/24/2022 2:39:26 AM, 8/30/2022 12:52:21 AM falls between 8/21/2022 6:52:55 AM and 8/30/2022 12:52:21 AM.
IsImprovementStdDev: Marked as improvement because 241.14546915012482 (T) = (0 -1018.5274731193842) / Math.Sqrt((6.896696264095966 / (100)) + (34.64805151495807 / (31))) is greater than 1.9785244914791056 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (100) + (31) - 2, .975) and 0.20503010679632164 = (1281.215152708215 - 1018.5274731193842) / 1281.215152708215 is greater than 0.05.
IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so.

```### Baseline Jit Disasm

```assembly
; System.Text.Json.Tests.Perf_Get.GetSByte()
       push      ebp
       mov       ebp,esp
       push      edi
       push      esi
       push      ebx
       sub       esp,0D8
       vzeroupper
       vxorps    xmm4,xmm4,xmm4
       vmovdqu   xmmword ptr [ebp-0E4],xmm4
       mov       eax,0FFFFFF40
M00_L00:
       vmovdqu   xmmword ptr [ebp+eax-14],xmm4
       vmovdqu   xmmword ptr [ebp+eax-4],xmm4
       vmovdqu   xmmword ptr [ebp+eax+0C],xmm4
       add       eax,30
       jne       short M00_L00
       mov       [ebp-14],eax
       mov       [ebp-10],eax
       xor       ebx,ebx
       mov       ecx,0A3C0000
       mov       edx,230
       call      CORINFO_HELP_GETSHARED_NONGCSTATIC_BASE
       mov       ecx,ds:[6A2530C]
       test      ecx,ecx
       je        near ptr M00_L02
       lea       edx,[ecx+8]
       mov       eax,[ecx+4]
M00_L01:
       xor       ecx,ecx
       xor       esi,esi
       mov       [ebp-0C8],ecx
       mov       [ebp-0C4],esi
       mov       [ebp-0C0],ecx
       mov       [ebp-0BC],esi
       mov       byte ptr [ebp-0B8],0
       mov       byte ptr [ebp-0B7],0
       mov       byte ptr [ebp-0B6],0
       mov       byte ptr [ebp-0B5],0
       mov       byte ptr [ebp-0B4],0
       mov       byte ptr [ebp-0B3],0
       mov       [ebp-0B0],ecx
       mov       byte ptr [ebp-0AC],0
       mov       byte ptr [ebp-0AB],0
       vxorps    xmm0,xmm0,xmm0
       vmovdqu   xmmword ptr [ebp-0A8],xmm0
       push      eax
       push      edx
       push      dword ptr [ebp-9C]
       push      dword ptr [ebp-0A0]
       push      dword ptr [ebp-0A4]
       push      dword ptr [ebp-0A8]
       push      dword ptr [ebp-0AC]
       push      dword ptr [ebp-0B0]
       push      dword ptr [ebp-0B4]
       push      dword ptr [ebp-0B8]
       push      dword ptr [ebp-0BC]
       push      dword ptr [ebp-0C0]
       push      dword ptr [ebp-0C4]
       push      dword ptr [ebp-0C8]
       lea       ecx,[ebp-94]
       mov       edx,1
       call      dword ptr [System.Text.Json.Utf8JsonReader..ctor(System.ReadOnlySpan`1<Byte>, Boolean, System.Text.Json.JsonReaderState)]
       cmp       byte ptr [ebp-69],0
       jne       short M00_L03
       lea       ecx,[ebp-94]
       call      dword ptr [System.Text.Json.Utf8JsonReader.ReadSingleSegment()]
       jmp       short M00_L04
M00_L02:
       xor       edx,edx
       xor       eax,eax
       jmp       near ptr M00_L01
M00_L03:
       lea       ecx,[ebp-94]
       call      dword ptr ds:[0AA011B0]
M00_L04:
       movzx     ecx,al
       test      ecx,ecx
       jne       short M00_L05
       cmp       byte ptr [ebp-70],0
       je        short M00_L05
       cmp       byte ptr [ebp-6C],0
       je        near ptr M00_L14
M00_L05:
       xor       eax,eax
       mov       [ebp-98],eax
M00_L06:
       cmp       byte ptr [ebp-6C],8
       jne       near ptr M00_L13
       cmp       byte ptr [ebp-67],0
       jne       short M00_L07
       mov       eax,[ebp-24]
       mov       edi,[ebp-20]
       jmp       short M00_L09
M00_L07:
       lea       edi,[ebp-0DC]
       lea       esi,[ebp-1C]
       mov       ecx,4
       rep movsd
       lea       ecx,[ebp-0DC]
       call      dword ptr ds:[0AA03FA8]
       test      eax,eax
       je        short M00_L10
       lea       ecx,[eax+8]
       mov       edi,[eax+4]
M00_L08:
       mov       eax,ecx
M00_L09:
       push      edi
       push      eax
       push      0
       lea       ecx,[ebp-0E0]
       lea       edx,[ebp-0E4]
       call      dword ptr [System.Buffers.Text.Utf8Parser.TryParse(System.ReadOnlySpan`1<Byte>, SByte ByRef, Int32 ByRef, Char)]
       test      eax,eax
       je        short M00_L11
       cmp       edi,[ebp-0E4]
       jne       short M00_L11
       mov       ecx,[ebp-0E0]
       movsx     eax,cl
       jmp       short M00_L12
M00_L10:
       xor       eax,eax
       xor       edi,edi
       mov       ecx,eax
       jmp       short M00_L08
M00_L11:
       xor       eax,eax
       mov       [ebp-0CC],eax
       mov       ecx,1
       call      dword ptr ds:[0AA03510]
       mov       eax,[ebp-0CC]
M00_L12:
       add       eax,ebx
       movsx     ebx,al
       mov       esi,[ebp-98]
       inc       esi
       cmp       esi,64
       mov       [ebp-98],esi
       jl        near ptr M00_L06
       mov       eax,ebx
       lea       esp,[ebp-0C]
       pop       ebx
       pop       esi
       pop       edi
       pop       ebp
       ret
M00_L13:
       movzx     ecx,byte ptr [ebp-6C]
       call      dword ptr ds:[0AA03258]
       int       3
M00_L14:
       xor       ecx,ecx
       push      0
       push      0
       push      ecx
       lea       ecx,[ebp-94]
       mov       edx,20
       call      dword ptr ds:[0AA03360]
       int       3
       int       3
       int       3
       int       3
       int       3
       int       3
       int       3
       int       3
; Total bytes of code 585
; System.Text.Json.Utf8JsonReader..ctor(System.ReadOnlySpan`1<Byte>, Boolean, System.Text.Json.JsonReaderState)
       push      ebp
       mov       ebp,esp
       push      edi
       push      esi
       sub       esp,28
       vzeroupper
       vxorps    xmm4,xmm4,xmm4
       vmovdqu   xmmword ptr [ebp-2C],xmm4
       xor       eax,eax
       mov       [ebp-1C],eax
       mov       [ebp-18],eax
       mov       [ebp-14],eax
       mov       [ebp-0C],ecx
       mov       [ebp-10],edx
       mov       edi,[ebp-0C]
       add       edi,30
       lea       esi,[ebp+38]
       call      CORINFO_HELP_ASSIGN_BYREF
       movsd
       mov       ecx,[ebp-0C]
       mov       edx,[ebp-10]
       mov       [ecx+24],dl
       mov       ecx,[ebp-0C]
       mov       byte ptr [ecx+25],0
       mov       ecx,[ebp-0C]
       mov       [ebp-1C],ecx
       mov       ecx,[ebp-1C]
       mov       edx,[ebp+8]
       mov       [ecx],edx
       mov       ecx,[ebp+0C]
       mov       edx,[ebp-1C]
       mov       [edx+4],ecx
       mov       ecx,[ebp-0C]
       add       ecx,8
       mov       [ebp-20],ecx
       mov       ecx,[ebp-20]
       mov       edx,[ebp+10]
       mov       [ecx],edx
       mov       ecx,[ebp+14]
       mov       edx,[ebp-20]
       mov       [edx+4],ecx
       mov       ecx,[ebp-0C]
       movzx     edx,byte ptr [ebp+18]
       mov       [ecx+26],dl
       mov       ecx,[ebp-0C]
       movzx     edx,byte ptr [ebp+19]
       mov       [ecx+27],dl
       mov       ecx,[ebp-0C]
       movzx     edx,byte ptr [ebp+1A]
       call      dword ptr [System.Text.Json.Utf8JsonReader.set_ValueIsEscaped(Boolean)]
       mov       ecx,[ebp-0C]
       movzx     eax,byte ptr [ebp+1B]
       mov       [ecx+2C],al
       mov       ecx,[ebp-0C]
       movzx     eax,byte ptr [ebp+1C]
       mov       [ecx+28],al
       mov       ecx,[ebp-0C]
       movzx     eax,byte ptr [ebp+1D]
       mov       [ecx+29],al
       mov       ecx,[ebp-0C]
       mov       eax,[ebp+20]
       mov       [ecx+38],eax
       mov       eax,[ebp+24]
       mov       [ecx+3C],eax
       mov       ecx,[ebp-0C]
       cmp       [ecx],cl
       mov       ecx,[ebp-0C]
       add       ecx,38
       call      dword ptr [System.Text.Json.JsonReaderOptions.get_MaxDepth()]
       test      eax,eax
       jne       short M01_L00
       mov       ecx,[ebp-0C]
       cmp       [ecx],cl
       mov       ecx,[ebp-0C]
       add       ecx,38
       mov       edx,40
       call      dword ptr [System.Text.Json.JsonReaderOptions.set_MaxDepth(Int32)]
M01_L00:
       mov       edi,[ebp-0C]
       add       edi,40
       lea       esi,[ebp+28]
       movsd
       movsd
       call      CORINFO_HELP_ASSIGN_BYREF
       movsd
       mov       ecx,[ebp-0C]
       xor       eax,eax
       mov       [ecx+20],eax
       xor       eax,eax
       mov       [ebp-24],eax
       mov       ecx,[ebp-24]
       sar       ecx,1F
       push      ecx
       push      dword ptr [ebp-24]
       mov       ecx,[ebp-0C]
       call      dword ptr [System.Text.Json.Utf8JsonReader.set_TokenStartIndex(Int64)]
       xor       ecx,ecx
       mov       [ebp-28],ecx
       mov       ecx,[ebp-28]
       mov       eax,[ebp-28]
       sar       eax,1F
       mov       [ebp-30],eax
       mov       eax,[ebp-0C]
       add       eax,10
       mov       [ebp-2C],eax
       mov       eax,[ebp-2C]
       mov       [eax],ecx
       mov       ecx,[ebp-30]
       mov       eax,[ebp-2C]
       mov       [eax+4],ecx
       mov       ecx,[ebp-0C]
       movzx     ecx,byte ptr [ecx+24]
       mov       eax,[ebp-0C]
       mov       [eax+2A],cl
       mov       ecx,[ebp-0C]
       mov       byte ptr [ecx+2B],0
       lea       ecx,[ebp-18]
       call      dword ptr [System.ReadOnlySpan`1[[System.Byte, System.Private.CoreLib]].get_Empty()]
       push      dword ptr [ebp-14]
       push      dword ptr [ebp-18]
       mov       ecx,[ebp-0C]
       call      dword ptr [System.Text.Json.Utf8JsonReader.set_ValueSpan(System.ReadOnlySpan`1<Byte>)]
       mov       ecx,[ebp-0C]
       xor       edx,edx
       mov       [ecx+58],edx
       mov       [ecx+5C],edx
       mov       ecx,[ebp-0C]
       xor       edx,edx
       mov       [ecx+50],edx
       mov       [ecx+54],edx
       mov       ecx,[ebp-0C]
       vxorps    xmm0,xmm0,xmm0
       vmovq     qword ptr [ecx+60],xmm0
       vmovq     qword ptr [ecx+68],xmm0
       mov       ecx,[ebp-0C]
       xor       edx,edx
       call      dword ptr [System.Text.Json.Utf8JsonReader.set_HasValueSequence(Boolean)]
       mov       ecx,0A8BEC30
       xor       edx,edx
       call      CORINFO_HELP_CLASSINIT_SHARED_DYNAMICCLASS
       mov       ecx,ds:[6A21FFC]
       add       ecx,4
       push      dword ptr [ecx+0C]
       push      dword ptr [ecx+8]
       push      dword ptr [ecx+4]
       push      dword ptr [ecx]
       mov       ecx,[ebp-0C]
       call      dword ptr [System.Text.Json.Utf8JsonReader.set_ValueSequence(System.Buffers.ReadOnlySequence`1<Byte>)]
       lea       esp,[ebp-8]
       pop       esi
       pop       edi
       pop       ebp
       ret       38
       int       3
       int       3
       int       3
       int       3
       int       3
       add       [eax],al
       add       [eax],al
       cwde
       sbb       [edi],eax
       or        [eax],al
       add       [eax],al
       add       [eax-67F7F8E7],dl
       (bad)
; Total bytes of code 494
; System.Text.Json.Utf8JsonReader.ReadSingleSegment()
       push      ebp
       mov       ebp,esp
       push      edi
       push      esi
       push      ebx
       sub       esp,0C
       mov       esi,ecx
       xor       ebx,ebx
       xor       edi,edi
       lea       ecx,[esi+70]
       mov       [ecx],edi
       xor       eax,eax
       mov       [ecx+4],eax
       mov       byte ptr [esi+2E],0
       mov       ecx,[esi+20]
       mov       eax,ecx
       sar       eax,1F
       cmp       ecx,[esi+34]
       sbb       eax,0
       jl        short M02_L02
       cmp       byte ptr [esi+27],0
       je        near ptr M02_L15
       cmp       byte ptr [esi+24],0
       je        near ptr M02_L15
       cmp       byte ptr [esi+2B],0
       je        short M02_L00
       movzx     ecx,byte ptr [esi+2A]
       test      ecx,ecx
       je        near ptr M02_L15
M02_L00:
       cmp       dword ptr [esi+4C],0
       jne       near ptr M02_L17
       cmp       byte ptr [esi+3C],2
       jne       short M02_L01
       movzx     ecx,byte ptr [esi+28]
       cmp       ecx,6
       je        near ptr M02_L15
M02_L01:
       movzx     ecx,byte ptr [esi+28]
       cmp       ecx,4
       je        near ptr M02_L15
       cmp       ecx,2
       jne       near ptr M02_L18
       jmp       near ptr M02_L15
M02_L02:
       mov       ecx,[esi+20]
       lea       eax,[esi+30]
       cmp       ecx,[eax+4]
       jae       near ptr M02_L22
       mov       eax,[eax]
       movzx     edx,byte ptr [eax+ecx]
       cmp       edx,20
       jg        near ptr M02_L06
       mov       ecx,esi
       call      dword ptr ds:[0A92FE28]
       mov       ecx,[esi+20]
       mov       edx,ecx
       mov       eax,edx
       sar       eax,1F
       cmp       edx,[esi+34]
       sbb       eax,0
       jl        short M02_L05
       cmp       byte ptr [esi+27],0
       je        near ptr M02_L15
       cmp       byte ptr [esi+24],0
       je        near ptr M02_L15
       cmp       byte ptr [esi+2B],0
       je        short M02_L03
       movzx     ecx,byte ptr [esi+2A]
       test      ecx,ecx
       je        near ptr M02_L15
M02_L03:
       cmp       dword ptr [esi+4C],0
       jne       near ptr M02_L19
       cmp       byte ptr [esi+3C],2
       jne       short M02_L04
       movzx     ecx,byte ptr [esi+28]
       cmp       ecx,6
       je        near ptr M02_L15
M02_L04:
       movzx     ecx,byte ptr [esi+28]
       cmp       ecx,4
       je        near ptr M02_L15
       cmp       ecx,2
       jne       near ptr M02_L20
       jmp       near ptr M02_L15
M02_L05:
       lea       edx,[esi+30]
       cmp       ecx,[edx+4]
       jae       near ptr M02_L22
       mov       edx,[edx]
       movzx     edx,byte ptr [edx+ecx]
M02_L06:
       mov       ecx,[esi+20]
       mov       eax,ecx
       sar       eax,1F
       lea       ebx,[esi+18]
       mov       [ebx],ecx
       mov       [ebx+4],eax
       movzx     ebx,byte ptr [esi+28]
       test      ebx,ebx
       je        near ptr M02_L16
       cmp       edx,2F
       jne       short M02_L07
       mov       ecx,esi
       call      dword ptr ds:[0A92FFA8]
       mov       ebx,eax
       jmp       near ptr M02_L15
M02_L07:
       cmp       ebx,1
       jne       short M02_L10
       cmp       edx,7D
       jne       short M02_L08
       mov       ecx,esi
       call      dword ptr ds:[0A92FD68]
       jmp       near ptr M02_L14
M02_L08:
       cmp       edx,22
       jne       near ptr M02_L21
       mov       ebx,[esi+20]
       lea       ecx,[esi+8]
       mov       edi,[ecx]
       mov       eax,[ecx+4]
       mov       [ebp-10],eax
       mov       ecx,esi
       mov       edx,[ecx]
       mov       ecx,[ecx+4]
       mov       [ebp-14],edx
       mov       [ebp-18],ecx
       mov       ecx,esi
       call      dword ptr ds:[0A92FEB8]
       test      eax,eax
       jne       short M02_L09
       mov       [esi+20],ebx
       mov       byte ptr [esi+28],1
       lea       ecx,[esi+8]
       mov       [ecx],edi
       mov       edi,[ebp-10]
       mov       [ecx+4],edi
       mov       edi,[ebp-14]
       mov       [esi],edi
       mov       edi,[ebp-18]
       mov       [esi+4],edi
       mov       ebx,eax
       jmp       short M02_L15
M02_L09:
       mov       ebx,eax
       jmp       short M02_L15
M02_L10:
       cmp       ebx,3
       jne       short M02_L12
       cmp       edx,5D
       jne       short M02_L11
       mov       ecx,esi
       call      dword ptr ds:[0A92FD98]
       jmp       short M02_L14
M02_L11:
       mov       ecx,esi
       call      dword ptr ds:[0A92FE40]
       mov       ebx,eax
       jmp       short M02_L15
M02_L12:
       cmp       ebx,5
       jne       short M02_L13
       mov       ecx,esi
       call      dword ptr ds:[0A92FE40]
       mov       ebx,eax
       jmp       short M02_L15
M02_L13:
       mov       ecx,esi
       call      dword ptr ds:[0A92FFA8]
       mov       ebx,eax
       jmp       short M02_L15
M02_L14:
       mov       ebx,1
M02_L15:
       mov       eax,ebx
       lea       esp,[ebp-0C]
       pop       ebx
       pop       esi
       pop       edi
       pop       ebp
       ret
M02_L16:
       mov       ecx,esi
       call      dword ptr [System.Text.Json.Utf8JsonReader.ReadFirstToken(Byte)]
       mov       ebx,eax
       jmp       short M02_L15
M02_L17:
       xor       edi,edi
       push      0
       push      0
       push      edi
       mov       ecx,esi
       mov       edx,19
       call      dword ptr ds:[0AA03360]
       int       3
M02_L18:
       xor       edi,edi
       push      0
       push      0
       push      edi
       mov       ecx,esi
       mov       edx,16
       call      dword ptr ds:[0AA03360]
       int       3
M02_L19:
       xor       edi,edi
       push      0
       push      0
       push      edi
       mov       ecx,esi
       mov       edx,19
       call      dword ptr ds:[0AA03360]
       int       3
M02_L20:
       xor       edi,edi
       push      0
       push      0
       push      edi
       mov       ecx,esi
       mov       edx,16
       call      dword ptr ds:[0AA03360]
       int       3
M02_L21:
       xor       edi,edi
       push      edx
       push      0
       push      edi
       mov       ecx,esi
       mov       edx,0C
       call      dword ptr ds:[0AA03360]
       int       3
M02_L22:
       call      CORINFO_HELP_RNGCHKFAIL
       int       3
       add       [eax],al
       add       ah,ah
       pop       ds
       pop       es
       or        [eax],al
       add       [eax],al
       add       ah,al
       pop       ds
       pop       es
       or        [eax+550A9464],cl
       mov       ebp,esp
       push      edi
       push      esi
       (bad)
; Total bytes of code 687
; System.Buffers.Text.Utf8Parser.TryParse(System.ReadOnlySpan`1<Byte>, SByte ByRef, Int32 ByRef, Char)
       push      ebp
       mov       ebp,esp
       push      esi
       mov       eax,[ebp+8]
       movzx     esi,ax
       test      esi,esi
       jne       short M03_L01
M03_L00:
       push      dword ptr [ebp+10]
       push      dword ptr [ebp+0C]
       call      dword ptr [System.Buffers.Text.Utf8Parser.TryParseSByteD(System.ReadOnlySpan`1<Byte>, SByte ByRef, Int32 ByRef)]
       pop       esi
       pop       ebp
       ret       0C
M03_L01:
       movzx     eax,ax
       or        eax,20
       cmp       eax,67
       jg        short M03_L02
       cmp       eax,64
       je        short M03_L00
       cmp       eax,67
       je        short M03_L00
       jmp       short M03_L04
M03_L02:
       cmp       eax,6E
       je        short M03_L03
       cmp       eax,72
       je        short M03_L00
       cmp       eax,78
       jne       short M03_L04
       push      dword ptr [ebp+10]
       push      dword ptr [ebp+0C]
       call      dword ptr ds:[6B701324]
       pop       esi
       pop       ebp
       ret       0C
M03_L03:
       push      dword ptr [ebp+10]
       push      dword ptr [ebp+0C]
       call      dword ptr ds:[6B7012F4]
       pop       esi
       pop       ebp
       ret       0C
M03_L04:
       push      dword ptr [ebp+10]
       push      dword ptr [ebp+0C]
       call      dword ptr ds:[6B706C44]
       pop       esi
       pop       ebp
       ret       0C
       int       3
       int       3
       int       3
       int       3
       int       3
       int       3
       int       3
       int       3
       push      ebp
       mov       ebp,esp
       push      esi
       mov       eax,[ebp+8]
       movzx     esi,ax
       test      esi,esi
       jne       short 6AFA709F
       push      dword ptr [ebp+10]
       (bad)
; Total bytes of code 147

Compare Jit Disasm

; System.Text.Json.Tests.Perf_Get.GetSByte()
       push      ebp
       mov       ebp,esp
       push      edi
       push      esi
       push      ebx
       sub       esp,0D8
       vzeroupper
       vxorps    xmm4,xmm4,xmm4
       vmovdqu   xmmword ptr [ebp-0E4],xmm4
       mov       eax,0FFFFFF40
M00_L00:
       vmovdqu   xmmword ptr [ebp+eax-14],xmm4
       vmovdqu   xmmword ptr [ebp+eax-4],xmm4
       vmovdqu   xmmword ptr [ebp+eax+0C],xmm4
       add       eax,30
       jne       short M00_L00
       mov       [ebp-14],eax
       mov       [ebp-10],eax
       xor       ebx,ebx
       mov       ecx,0B2B0000
       mov       edx,231
       call      CORINFO_HELP_GETSHARED_NONGCSTATIC_BASE
       mov       ecx,ds:[778533C]
       test      ecx,ecx
       je        near ptr M00_L02
       lea       edx,[ecx+8]
       mov       eax,[ecx+4]
M00_L01:
       xor       ecx,ecx
       xor       esi,esi
       mov       [ebp-0C8],ecx
       mov       [ebp-0C4],esi
       mov       [ebp-0C0],ecx
       mov       [ebp-0BC],esi
       mov       byte ptr [ebp-0B8],0
       mov       byte ptr [ebp-0B7],0
       mov       byte ptr [ebp-0B6],0
       mov       byte ptr [ebp-0B5],0
       mov       byte ptr [ebp-0B4],0
       mov       byte ptr [ebp-0B3],0
       mov       [ebp-0B0],ecx
       mov       byte ptr [ebp-0AC],0
       mov       byte ptr [ebp-0AB],0
       vxorps    xmm0,xmm0,xmm0
       vmovdqu   xmmword ptr [ebp-0A8],xmm0
       push      eax
       push      edx
       push      dword ptr [ebp-9C]
       push      dword ptr [ebp-0A0]
       push      dword ptr [ebp-0A4]
       push      dword ptr [ebp-0A8]
       push      dword ptr [ebp-0AC]
       push      dword ptr [ebp-0B0]
       push      dword ptr [ebp-0B4]
       push      dword ptr [ebp-0B8]
       push      dword ptr [ebp-0BC]
       push      dword ptr [ebp-0C0]
       push      dword ptr [ebp-0C4]
       push      dword ptr [ebp-0C8]
       lea       ecx,[ebp-94]
       mov       edx,1
       call      dword ptr [System.Text.Json.Utf8JsonReader..ctor(System.ReadOnlySpan`1<Byte>, Boolean, System.Text.Json.JsonReaderState)]
       cmp       byte ptr [ebp-69],0
       jne       short M00_L03
       lea       ecx,[ebp-94]
       call      dword ptr [System.Text.Json.Utf8JsonReader.ReadSingleSegment()]
       jmp       short M00_L04
M00_L02:
       xor       edx,edx
       xor       eax,eax
       jmp       near ptr M00_L01
M00_L03:
       lea       ecx,[ebp-94]
       call      dword ptr ds:[0B8311B0]
M00_L04:
       movzx     ecx,al
       test      ecx,ecx
       jne       short M00_L05
       cmp       byte ptr [ebp-70],0
       je        short M00_L05
       cmp       byte ptr [ebp-6C],0
       je        near ptr M00_L14
M00_L05:
       xor       eax,eax
       mov       [ebp-98],eax
M00_L06:
       cmp       byte ptr [ebp-6C],8
       jne       near ptr M00_L13
       cmp       byte ptr [ebp-67],0
       jne       short M00_L07
       mov       eax,[ebp-24]
       mov       edi,[ebp-20]
       jmp       short M00_L09
M00_L07:
       lea       edi,[ebp-0DC]
       lea       esi,[ebp-1C]
       mov       ecx,4
       rep movsd
       lea       ecx,[ebp-0DC]
       call      dword ptr ds:[0B833FA8]
       test      eax,eax
       je        short M00_L10
       lea       ecx,[eax+8]
       mov       edi,[eax+4]
M00_L08:
       mov       eax,ecx
M00_L09:
       push      edi
       push      eax
       push      0
       lea       ecx,[ebp-0E0]
       lea       edx,[ebp-0E4]
       call      dword ptr [System.Buffers.Text.Utf8Parser.TryParse(System.ReadOnlySpan`1<Byte>, SByte ByRef, Int32 ByRef, Char)]
       test      eax,eax
       je        short M00_L11
       cmp       edi,[ebp-0E4]
       jne       short M00_L11
       movsx     eax,byte ptr [ebp-0E0]
       jmp       short M00_L12
M00_L10:
       xor       eax,eax
       xor       edi,edi
       mov       ecx,eax
       jmp       short M00_L08
M00_L11:
       xor       eax,eax
       mov       [ebp-0CC],eax
       mov       ecx,1
       call      dword ptr ds:[0B833510]
       mov       eax,[ebp-0CC]
M00_L12:
       add       eax,ebx
       movsx     ebx,al
       mov       esi,[ebp-98]
       inc       esi
       cmp       esi,64
       mov       [ebp-98],esi
       jl        near ptr M00_L06
       mov       eax,ebx
       lea       esp,[ebp-0C]
       pop       ebx
       pop       esi
       pop       edi
       pop       ebp
       ret
M00_L13:
       movzx     ecx,byte ptr [ebp-6C]
       call      dword ptr ds:[0B833258]
       int       3
M00_L14:
       xor       ecx,ecx
       push      0
       push      0
       push      ecx
       lea       ecx,[ebp-94]
       mov       edx,20
       call      dword ptr ds:[0B833360]
       int       3
       int       3
       int       3
       int       3
       int       3
       int       3
       int       3
       int       3
; Total bytes of code 583
; System.Text.Json.Utf8JsonReader..ctor(System.ReadOnlySpan`1<Byte>, Boolean, System.Text.Json.JsonReaderState)
       push      ebp
       mov       ebp,esp
       push      edi
       push      esi
       sub       esp,28
       vzeroupper
       vxorps    xmm4,xmm4,xmm4
       vmovdqu   xmmword ptr [ebp-2C],xmm4
       xor       eax,eax
       mov       [ebp-1C],eax
       mov       [ebp-18],eax
       mov       [ebp-14],eax
       mov       [ebp-0C],ecx
       mov       [ebp-10],edx
       mov       edi,[ebp-0C]
       add       edi,30
       lea       esi,[ebp+38]
       call      CORINFO_HELP_ASSIGN_BYREF
       movsd
       mov       ecx,[ebp-0C]
       mov       edx,[ebp-10]
       mov       [ecx+24],dl
       mov       ecx,[ebp-0C]
       mov       byte ptr [ecx+25],0
       mov       ecx,[ebp-0C]
       mov       [ebp-1C],ecx
       mov       ecx,[ebp-1C]
       mov       edx,[ebp+8]
       mov       [ecx],edx
       mov       ecx,[ebp+0C]
       mov       edx,[ebp-1C]
       mov       [edx+4],ecx
       mov       ecx,[ebp-0C]
       add       ecx,8
       mov       [ebp-20],ecx
       mov       ecx,[ebp-20]
       mov       edx,[ebp+10]
       mov       [ecx],edx
       mov       ecx,[ebp+14]
       mov       edx,[ebp-20]
       mov       [edx+4],ecx
       mov       ecx,[ebp-0C]
       movzx     edx,byte ptr [ebp+18]
       mov       [ecx+26],dl
       mov       ecx,[ebp-0C]
       movzx     edx,byte ptr [ebp+19]
       mov       [ecx+27],dl
       mov       ecx,[ebp-0C]
       movzx     edx,byte ptr [ebp+1A]
       call      dword ptr [System.Text.Json.Utf8JsonReader.set_ValueIsEscaped(Boolean)]
       mov       ecx,[ebp-0C]
       movzx     eax,byte ptr [ebp+1B]
       mov       [ecx+2C],al
       mov       ecx,[ebp-0C]
       movzx     eax,byte ptr [ebp+1C]
       mov       [ecx+28],al
       mov       ecx,[ebp-0C]
       movzx     eax,byte ptr [ebp+1D]
       mov       [ecx+29],al
       mov       ecx,[ebp-0C]
       mov       eax,[ebp+20]
       mov       [ecx+38],eax
       mov       eax,[ebp+24]
       mov       [ecx+3C],eax
       mov       ecx,[ebp-0C]
       cmp       [ecx],cl
       mov       ecx,[ebp-0C]
       add       ecx,38
       call      dword ptr [System.Text.Json.JsonReaderOptions.get_MaxDepth()]
       test      eax,eax
       jne       short M01_L00
       mov       ecx,[ebp-0C]
       cmp       [ecx],cl
       mov       ecx,[ebp-0C]
       add       ecx,38
       mov       edx,40
       call      dword ptr [System.Text.Json.JsonReaderOptions.set_MaxDepth(Int32)]
M01_L00:
       mov       edi,[ebp-0C]
       add       edi,40
       lea       esi,[ebp+28]
       movsd
       movsd
       call      CORINFO_HELP_ASSIGN_BYREF
       movsd
       mov       ecx,[ebp-0C]
       xor       eax,eax
       mov       [ecx+20],eax
       xor       eax,eax
       mov       [ebp-24],eax
       mov       ecx,[ebp-24]
       sar       ecx,1F
       push      ecx
       push      dword ptr [ebp-24]
       mov       ecx,[ebp-0C]
       call      dword ptr [System.Text.Json.Utf8JsonReader.set_TokenStartIndex(Int64)]
       xor       ecx,ecx
       mov       [ebp-28],ecx
       mov       ecx,[ebp-28]
       mov       eax,[ebp-28]
       sar       eax,1F
       mov       [ebp-30],eax
       mov       eax,[ebp-0C]
       add       eax,10
       mov       [ebp-2C],eax
       mov       eax,[ebp-2C]
       mov       [eax],ecx
       mov       ecx,[ebp-30]
       mov       eax,[ebp-2C]
       mov       [eax+4],ecx
       mov       ecx,[ebp-0C]
       movzx     ecx,byte ptr [ecx+24]
       mov       eax,[ebp-0C]
       mov       [eax+2A],cl
       mov       ecx,[ebp-0C]
       mov       byte ptr [ecx+2B],0
       lea       ecx,[ebp-18]
       call      dword ptr [System.ReadOnlySpan`1[[System.Byte, System.Private.CoreLib]].get_Empty()]
       push      dword ptr [ebp-14]
       push      dword ptr [ebp-18]
       mov       ecx,[ebp-0C]
       call      dword ptr [System.Text.Json.Utf8JsonReader.set_ValueSpan(System.ReadOnlySpan`1<Byte>)]
       mov       ecx,[ebp-0C]
       xor       edx,edx
       mov       [ecx+58],edx
       mov       [ecx+5C],edx
       mov       ecx,[ebp-0C]
       xor       edx,edx
       mov       [ecx+50],edx
       mov       [ecx+54],edx
       mov       ecx,[ebp-0C]
       vxorps    xmm0,xmm0,xmm0
       vmovq     qword ptr [ecx+60],xmm0
       vmovq     qword ptr [ecx+68],xmm0
       mov       ecx,[ebp-0C]
       xor       edx,edx
       call      dword ptr [System.Text.Json.Utf8JsonReader.set_HasValueSequence(Boolean)]
       mov       ecx,0B7AE958
       xor       edx,edx
       call      CORINFO_HELP_CLASSINIT_SHARED_DYNAMICCLASS
       mov       ecx,ds:[7781FFC]
       add       ecx,4
       push      dword ptr [ecx+0C]
       push      dword ptr [ecx+8]
       push      dword ptr [ecx+4]
       push      dword ptr [ecx]
       mov       ecx,[ebp-0C]
       call      dword ptr [System.Text.Json.Utf8JsonReader.set_ValueSequence(System.Buffers.ReadOnlySequence`1<Byte>)]
       lea       esp,[ebp-8]
       pop       esi
       pop       edi
       pop       ebp
       ret       38
       int       3
       int       3
       int       3
       int       3
       int       3
       add       [eax],al
       add       [eax],al
       mov       [eax],bl
       out       dx,eax
       or        [eax],al
       add       [eax],al
       add       [eax-3FF710E8],al
       pop       edi
; Total bytes of code 494
; System.Text.Json.Utf8JsonReader.ReadSingleSegment()
       push      ebp
       mov       ebp,esp
       push      edi
       push      esi
       push      ebx
       sub       esp,0C
       mov       esi,ecx
       xor       ebx,ebx
       xor       edi,edi
       lea       ecx,[esi+70]
       mov       [ecx],edi
       xor       eax,eax
       mov       [ecx+4],eax
       mov       byte ptr [esi+2E],0
       mov       ecx,[esi+20]
       mov       eax,ecx
       sar       eax,1F
       cmp       ecx,[esi+34]
       sbb       eax,0
       jl        short M02_L02
       cmp       byte ptr [esi+27],0
       je        near ptr M02_L15
       cmp       byte ptr [esi+24],0
       je        near ptr M02_L15
       cmp       byte ptr [esi+2B],0
       je        short M02_L00
       movzx     ecx,byte ptr [esi+2A]
       test      ecx,ecx
       je        near ptr M02_L15
M02_L00:
       cmp       dword ptr [esi+4C],0
       jne       near ptr M02_L17
       cmp       byte ptr [esi+3C],2
       jne       short M02_L01
       movzx     ecx,byte ptr [esi+28]
       cmp       ecx,6
       je        near ptr M02_L15
M02_L01:
       movzx     ecx,byte ptr [esi+28]
       cmp       ecx,4
       je        near ptr M02_L15
       cmp       ecx,2
       jne       near ptr M02_L18
       jmp       near ptr M02_L15
M02_L02:
       mov       ecx,[esi+20]
       lea       eax,[esi+30]
       cmp       ecx,[eax+4]
       jae       near ptr M02_L22
       mov       eax,[eax]
       movzx     edx,byte ptr [eax+ecx]
       cmp       edx,20
       jg        near ptr M02_L06
       mov       ecx,esi
       call      dword ptr ds:[0B7BFE28]
       mov       ecx,[esi+20]
       mov       edx,ecx
       mov       eax,edx
       sar       eax,1F
       cmp       edx,[esi+34]
       sbb       eax,0
       jl        short M02_L05
       cmp       byte ptr [esi+27],0
       je        near ptr M02_L15
       cmp       byte ptr [esi+24],0
       je        near ptr M02_L15
       cmp       byte ptr [esi+2B],0
       je        short M02_L03
       movzx     ecx,byte ptr [esi+2A]
       test      ecx,ecx
       je        near ptr M02_L15
M02_L03:
       cmp       dword ptr [esi+4C],0
       jne       near ptr M02_L19
       cmp       byte ptr [esi+3C],2
       jne       short M02_L04
       movzx     ecx,byte ptr [esi+28]
       cmp       ecx,6
       je        near ptr M02_L15
M02_L04:
       movzx     ecx,byte ptr [esi+28]
       cmp       ecx,4
       je        near ptr M02_L15
       cmp       ecx,2
       jne       near ptr M02_L20
       jmp       near ptr M02_L15
M02_L05:
       lea       edx,[esi+30]
       cmp       ecx,[edx+4]
       jae       near ptr M02_L22
       mov       edx,[edx]
       movzx     edx,byte ptr [edx+ecx]
M02_L06:
       mov       ecx,[esi+20]
       mov       eax,ecx
       sar       eax,1F
       lea       ebx,[esi+18]
       mov       [ebx],ecx
       mov       [ebx+4],eax
       movzx     ebx,byte ptr [esi+28]
       test      ebx,ebx
       je        near ptr M02_L16
       cmp       edx,2F
       jne       short M02_L07
       mov       ecx,esi
       call      dword ptr ds:[0B7BFFA8]
       mov       ebx,eax
       jmp       near ptr M02_L15
M02_L07:
       cmp       ebx,1
       jne       short M02_L10
       cmp       edx,7D
       jne       short M02_L08
       mov       ecx,esi
       call      dword ptr ds:[0B7BFD68]
       jmp       near ptr M02_L14
M02_L08:
       cmp       edx,22
       jne       near ptr M02_L21
       mov       ebx,[esi+20]
       lea       ecx,[esi+8]
       mov       edi,[ecx]
       mov       eax,[ecx+4]
       mov       [ebp-10],eax
       mov       ecx,esi
       mov       edx,[ecx]
       mov       ecx,[ecx+4]
       mov       [ebp-14],edx
       mov       [ebp-18],ecx
       mov       ecx,esi
       call      dword ptr ds:[0B7BFEB8]
       test      eax,eax
       jne       short M02_L09
       mov       [esi+20],ebx
       mov       byte ptr [esi+28],1
       lea       ecx,[esi+8]
       mov       [ecx],edi
       mov       edi,[ebp-10]
       mov       [ecx+4],edi
       mov       edi,[ebp-14]
       mov       [esi],edi
       mov       edi,[ebp-18]
       mov       [esi+4],edi
       mov       ebx,eax
       jmp       short M02_L15
M02_L09:
       mov       ebx,eax
       jmp       short M02_L15
M02_L10:
       cmp       ebx,3
       jne       short M02_L12
       cmp       edx,5D
       jne       short M02_L11
       mov       ecx,esi
       call      dword ptr ds:[0B7BFD98]
       jmp       short M02_L14
M02_L11:
       mov       ecx,esi
       call      dword ptr ds:[0B7BFE40]
       mov       ebx,eax
       jmp       short M02_L15
M02_L12:
       cmp       ebx,5
       jne       short M02_L13
       mov       ecx,esi
       call      dword ptr ds:[0B7BFE40]
       mov       ebx,eax
       jmp       short M02_L15
M02_L13:
       mov       ecx,esi
       call      dword ptr ds:[0B7BFFA8]
       mov       ebx,eax
       jmp       short M02_L15
M02_L14:
       mov       ebx,1
M02_L15:
       mov       eax,ebx
       lea       esp,[ebp-0C]
       pop       ebx
       pop       esi
       pop       edi
       pop       ebp
       ret
M02_L16:
       mov       ecx,esi
       call      dword ptr [System.Text.Json.Utf8JsonReader.ReadFirstToken(Byte)]
       mov       ebx,eax
       jmp       short M02_L15
M02_L17:
       xor       edi,edi
       push      0
       push      0
       push      edi
       mov       ecx,esi
       mov       edx,19
       call      dword ptr ds:[0B833360]
       int       3
M02_L18:
       xor       edi,edi
       push      0
       push      0
       push      edi
       mov       ecx,esi
       mov       edx,16
       call      dword ptr ds:[0B833360]
       int       3
M02_L19:
       xor       edi,edi
       push      0
       push      0
       push      edi
       mov       ecx,esi
       mov       edx,19
       call      dword ptr ds:[0B833360]
       int       3
M02_L20:
       xor       edi,edi
       push      0
       push      0
       push      edi
       mov       ecx,esi
       mov       edx,16
       call      dword ptr ds:[0B833360]
       int       3
M02_L21:
       xor       edi,edi
       push      edx
       push      0
       push      edi
       mov       ecx,esi
       mov       edx,0C
       call      dword ptr ds:[0B833360]
       int       3
M02_L22:
       call      CORINFO_HELP_RNGCHKFAIL
       int       3
       add       [eax],al
       add       ah,dl
       push      ds
       out       dx,eax
       or        [eax],al
       add       [eax],al
       add       [esi+ebx+61B008EF],dh
       or        dword ptr [ebx],57EC8B55
       push      esi
       (bad)
; Total bytes of code 687
; System.Buffers.Text.Utf8Parser.TryParse(System.ReadOnlySpan`1<Byte>, SByte ByRef, Int32 ByRef, Char)
       push      ebp
       mov       ebp,esp
       push      esi
       mov       eax,[ebp+8]
       movzx     esi,ax
       test      esi,esi
       jne       short M03_L01
M03_L00:
       push      dword ptr [ebp+10]
       push      dword ptr [ebp+0C]
       call      dword ptr [System.Buffers.Text.Utf8Parser.TryParseSByteD(System.ReadOnlySpan`1<Byte>, SByte ByRef, Int32 ByRef)]
       pop       esi
       pop       ebp
       ret       0C
M03_L01:
       movzx     eax,ax
       or        eax,20
       cmp       eax,67
       jg        short M03_L02
       cmp       eax,64
       je        short M03_L00
       cmp       eax,67
       je        short M03_L00
       jmp       short M03_L04
M03_L02:
       cmp       eax,6E
       je        short M03_L03
       cmp       eax,72
       je        short M03_L00
       cmp       eax,78
       jne       short M03_L04
       push      dword ptr [ebp+10]
       push      dword ptr [ebp+0C]
       call      dword ptr ds:[6B68F320]
       pop       esi
       pop       ebp
       ret       0C
M03_L03:
       push      dword ptr [ebp+10]
       push      dword ptr [ebp+0C]
       call      dword ptr ds:[6B68F2F0]
       pop       esi
       pop       ebp
       ret       0C
M03_L04:
       push      dword ptr [ebp+10]
       push      dword ptr [ebp+0C]
       call      dword ptr ds:[6B694C38]
       pop       esi
       pop       ebp
       ret       0C
       int       3
       int       3
       int       3
       int       3
       int       3
       int       3
       int       3
       int       3
       push      ebp
       mov       ebp,esp
       push      esi
       mov       eax,[ebp+8]
       movzx     esi,ax
       test      esi,esi
       jne       short 6AF3616F
       push      dword ptr [ebp+10]
       (bad)
; Total bytes of code 147

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