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

[X64] [xtqqczze] Seal overridden virtual method SetDefaultFallbacks #386

Open
MihuBot opened this issue May 25, 2024 · 3 comments
Open

[X64] [xtqqczze] Seal overridden virtual method SetDefaultFallbacks #386

MihuBot opened this issue May 25, 2024 · 3 comments

Comments

@MihuBot
Copy link
Owner

MihuBot commented May 25, 2024

Job completed in 29 minutes.
dotnet/runtime#100030

Diffs

Found 259 files with textual diffs.

Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 39663356
Total bytes of diff: 39663376
Total bytes of delta: 20 (0.00 % of base)
Total relative delta: 0.29
    diff is a regression.
    relative diff is a regression.


Top file regressions (bytes):
          20 : System.Private.CoreLib.dasm (0.00 % of base)

1 total files with Code Size differences (0 improved, 1 regressed), 255 unchanged.

Top method regressions (bytes):
          20 (28.99 % of base) : System.Private.CoreLib.dasm - System.Text.Latin1Encoding:.ctor():this (FullOpts)

Top method regressions (percentages):
          20 (28.99 % of base) : System.Private.CoreLib.dasm - System.Text.Latin1Encoding:.ctor():this (FullOpts)

1 total methods with Code Size differences (0 improved, 1 regressed), 244925 unchanged.

--------------------------------------------------------------------------------

Artifacts:

@MihuBot
Copy link
Owner Author

MihuBot commented May 25, 2024

Top method regressions

20 (28.99 % of base) - System.Text.Latin1Encoding:.ctor():this
 ; Assembly listing for method System.Text.Latin1Encoding:.ctor():this (FullOpts)
 ; Emitting BLENDED_CODE for X64 with AVX - Unix
 ; FullOpts code
 ; optimized code
-; rbp based frame
+; rsp based frame
 ; partially interruptible
 ; No PGO data
-; 0 inlinees with PGO data; 2 single block inlinees; 0 inlinees without PGO data
+; 0 inlinees with PGO data; 4 single block inlinees; 0 inlinees without PGO data
 ; Final local variable assignments
 ;
 ;  V00 this         [V00,T00] (  6,  6   )     ref  ->  rbx         this class-hnd single-def <System.Text.Latin1Encoding>
 ;# V01 OutArgs      [V01    ] (  1,  1   )  struct ( 0) [rsp+0x00]  do-not-enreg[XS] addr-exposed "OutgoingArgSpace"
 ;
-; Lcl frame size = 8
+; Lcl frame size = 0
 
 G_M19309_IG01:
-       push     rbp
        push     rbx
-       push     rax
-       lea      rbp, [rsp+0x10]
        mov      rbx, rdi
-						;; size=11 bbWeight=1 PerfScore 3.75
+						;; size=4 bbWeight=1 PerfScore 1.25
 G_M19309_IG02:
        mov      byte  ptr [rbx+0x24], 1
        mov      edi, 0x6FAF
        mov      rsi, 0xD1FFAB1E      ; 'codePage'
        mov      rax, 0xD1FFAB1E      ; code for System.ArgumentOutOfRangeException:ThrowIfNegative[int](int,System.String)
        call     [rax]System.ArgumentOutOfRangeException:ThrowIfNegative[int](int,System.String)
        mov      dword ptr [rbx+0x20], 0x6FAF
-       mov      rdi, rbx
-       mov      rax, qword ptr [rbx]
-       mov      rax, qword ptr [rax+0x40]
-						;; size=48 bbWeight=1 PerfScore 10.00
+       mov      rdi, 0xD1FFAB1E      ; const ptr
+       mov      rsi, gword ptr [rdi]
+       lea      rdi, bword ptr [rbx+0x10]
+       call     CORINFO_HELP_ASSIGN_REF
+       mov      rdi, 0xD1FFAB1E      ; const ptr
+       mov      rsi, gword ptr [rdi]
+       lea      rdi, bword ptr [rbx+0x18]
+       call     CORINFO_HELP_ASSIGN_REF
+       nop      
+						;; size=83 bbWeight=1 PerfScore 13.50
 G_M19309_IG03:
-       add      rsp, 8
        pop      rbx
-       pop      rbp
-       tail.jmp [rax+0x20]System.Text.Encoding:SetDefaultFallbacks():this
-						;; size=10 bbWeight=1 PerfScore 3.25
+       ret      
+						;; size=2 bbWeight=1 PerfScore 1.50
 
-; Total bytes of code 69, prolog size 8, PerfScore 17.00, instruction count 18, allocated bytes for code 69 (MethodHash=7ce9b492) for method System.Text.Latin1Encoding:.ctor():this (FullOpts)
+; Total bytes of code 89, prolog size 1, PerfScore 16.25, instruction count 19, allocated bytes for code 89 (MethodHash=7ce9b492) for method System.Text.Latin1Encoding:.ctor():this (FullOpts)

@MihuBot
Copy link
Owner Author

MihuBot commented May 25, 2024

@xtqqczze

@xtqqczze
Copy link

xtqqczze commented May 25, 2024

diffs shows improvement to PerfScore from improved inlining.

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

No branches or pull requests

2 participants