MihuBot / runtime-utils

0 stars 0 forks source link

[X64] [EgorBo] JIT: Intrinsify ClearWithoutReferences and Fill #258

Open MihuBot opened 5 months ago

MihuBot commented 5 months ago

Build completed in 2 hours 6 minutes. https://github.com/dotnet/runtime/pull/98700

CoreLib diffs

Found 2 files with textual diffs.

Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 6844398
Total bytes of diff: 6844404
Total bytes of delta: 6 (0.00 % of base)
Total relative delta: 0.38
    diff is a regression.
    relative diff is a regression.

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

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

Top method regressions (bytes):
           6 (37.50 % of base) : System.Private.CoreLib.dasm - System.Runtime.InteropServices.NativeMemory:Fill(ulong,ulong,ubyte) (FullOpts)

Top method regressions (percentages):
           6 (37.50 % of base) : System.Private.CoreLib.dasm - System.Runtime.InteropServices.NativeMemory:Fill(ulong,ulong,ubyte) (FullOpts)

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

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

Frameworks diffs

Diffs ``` Found 259 files with textual diffs. Summary of Code Size diffs: (Lower is better) Total bytes of base: 38279728 Total bytes of diff: 38279485 Total bytes of delta: -243 (-0.00 % of base) Total relative delta: Infinity diff is an improvement. relative diff is a regression. Top file regressions (bytes): 128 : System.DirectoryServices.Protocols.dasm (0.09 % of base) 6 : System.Private.CoreLib.dasm (0.00 % of base) Top file improvements (bytes): -377 : System.Net.Sockets.dasm (-0.15 % of base) 3 total files with Code Size differences (1 improved, 2 regressed), 253 unchanged. Top method regressions (bytes): 128 (Infinity of base) : System.DirectoryServices.Protocols.dasm - System.DirectoryServices.Protocols.PartialResultsRetriever:ThreadRoutine():this (FullOpts) 6 (37.50 % of base) : System.Private.CoreLib.dasm - System.Runtime.InteropServices.NativeMemory:Fill(ulong,ulong,ubyte) (FullOpts) Top method improvements (bytes): -377 (-100.00 % of base) : System.Net.Sockets.dasm - System.Net.Sockets.SocketAsyncEngine:EventLoop():this (FullOpts) Top method regressions (percentages): 128 (Infinity of base) : System.DirectoryServices.Protocols.dasm - System.DirectoryServices.Protocols.PartialResultsRetriever:ThreadRoutine():this (FullOpts) 6 (37.50 % of base) : System.Private.CoreLib.dasm - System.Runtime.InteropServices.NativeMemory:Fill(ulong,ulong,ubyte) (FullOpts) Top method improvements (percentages): -377 (-100.00 % of base) : System.Net.Sockets.dasm - System.Net.Sockets.SocketAsyncEngine:EventLoop():this (FullOpts) 3 total methods with Code Size differences (1 improved, 2 regressed), 239345 unchanged. -------------------------------------------------------------------------------- ```

Artifacts:

MihuBot commented 5 months ago

Top method regressions

6 (37.50 % of base) - System.Runtime.InteropServices.NativeMemory:Fill(ulong,ulong,ubyte) ```diff ; Assembly listing for method System.Runtime.InteropServices.NativeMemory:Fill(ulong,ulong,ubyte) (FullOpts) ; Emitting BLENDED_CODE for X64 with AVX - Unix ; FullOpts code ; optimized code ; rsp based frame -; fully interruptible +; partially interruptible ; No PGO data ; Final local variable assignments ; ; V00 arg0 [V00,T00] ( 3, 3 ) long -> rdi single-def ; V01 arg1 [V01,T01] ( 3, 3 ) long -> rsi single-def ; V02 arg2 [V02,T02] ( 3, 3 ) ubyte -> rdx single-def ;# V03 OutArgs [V03 ] ( 1, 1 ) struct ( 0) [rsp+0x00] do-not-enreg[XS] addr-exposed "OutgoingArgSpace" ; -; Lcl frame size = 0 +; Lcl frame size = 8 G_M48403_IG01: - ;; size=0 bbWeight=1 PerfScore 0.00 + push rax + ;; size=1 bbWeight=1 PerfScore 1.00 G_M48403_IG02: movzx rdx, dl mov rax, 0xD1FFAB1E ; code for System.SpanHelpers:Fill[ubyte](byref,ulong,ubyte) - ;; size=13 bbWeight=1 PerfScore 0.50 + call [rax]System.SpanHelpers:Fill[ubyte](byref,ulong,ubyte) + nop + ;; size=16 bbWeight=1 PerfScore 3.75 G_M48403_IG03: - tail.jmp [rax]System.SpanHelpers:Fill[ubyte](byref,ulong,ubyte) - ;; size=3 bbWeight=1 PerfScore 2.00 + add rsp, 8 + ret + ;; size=5 bbWeight=1 PerfScore 1.25 -; Total bytes of code 16, prolog size 0, PerfScore 2.50, instruction count 3, allocated bytes for code 16 (MethodHash=ef1742ec) for method System.Runtime.InteropServices.NativeMemory:Fill(ulong,ulong,ubyte) (FullOpts) +; Total bytes of code 22, prolog size 1, PerfScore 6.00, instruction count 7, allocated bytes for code 22 (MethodHash=ef1742ec) for method System.Runtime.InteropServices.NativeMemory:Fill(ulong,ulong,ubyte) (FullOpts) ```
MihuBot commented 5 months ago

@EgorBo