Skip to content

[JitDiff X64] [EgorBo] Reduce Unsafe usage in TryWriteSignificand/TryHash he ... #1887

@MihuBot

Description

@MihuBot

Job completed in 3 minutes 2 seconds (remote runner delay: 0 seconds).
dotnet/runtime#127921

Main commit: dotnet/runtime@41fad31
PR commit: EgorBo/runtime-1@2fab70c

Diffs

Diffs
Found 85 files with textual diffs.

Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 46154992
Total bytes of diff: 46155607
Total bytes of delta: 615 (0.00 % of base)
Total relative delta: 5.62
    diff is a regression.
    relative diff is a regression.


Total byte diff includes 405 bytes from reconciling methods
	Base had    4 unique methods,     1709 unique bytes
	Diff had   12 unique methods,     2114 unique bytes

Top file regressions (bytes):
         508 : System.Private.CoreLib.dasm (0.01 % of base)
         107 : System.IO.Hashing.dasm (0.27 % of base)

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

Top method regressions (bytes):
         482 (Infinity of base) : System.Private.CoreLib.dasm - System.Double:<RootN>g__NegativeN|239_1(double,int):double (FullOpts) (0 base, 1 diff methods)
         469 (Infinity of base) : System.Private.CoreLib.dasm - System.Double:<RootN>g__PositiveN|239_0(double,int):double (FullOpts) (0 base, 1 diff methods)
         384 (Infinity of base) : System.Private.CoreLib.dasm - System.Single:<RootN>g__NegativeN|239_1(float,int):float (FullOpts) (0 base, 1 diff methods)
         374 (Infinity of base) : System.Private.CoreLib.dasm - System.Single:<RootN>g__PositiveN|239_0(float,int):float (FullOpts) (0 base, 1 diff methods)
          65 (Infinity of base) : System.Private.CoreLib.dasm - System.Double:TryWriteSignificandBigEndian(System.Span`1[byte],byref):bool:this (FullOpts) (0 base, 1 diff methods)
          62 (Infinity of base) : System.Private.CoreLib.dasm - System.Double:TryWriteSignificandLittleEndian(System.Span`1[byte],byref):bool:this (FullOpts) (0 base, 1 diff methods)
          62 (Infinity of base) : System.Private.CoreLib.dasm - System.Single:TryWriteSignificandBigEndian(System.Span`1[byte],byref):bool:this (FullOpts) (0 base, 1 diff methods)
          58 (Infinity of base) : System.Private.CoreLib.dasm - System.Single:TryWriteSignificandLittleEndian(System.Span`1[byte],byref):bool:this (FullOpts) (0 base, 1 diff methods)
          54 (158.82 % of base) : System.IO.Hashing.dasm - System.IO.Hashing.XxHash128:GetCurrentHashCore(System.Span`1[byte]):this (FullOpts)
          47 (Infinity of base) : System.Private.CoreLib.dasm - System.Double:TryWriteExponentBigEndian(System.Span`1[byte],byref):bool:this (FullOpts) (0 base, 1 diff methods)
          43 (Infinity of base) : System.Private.CoreLib.dasm - System.Double:TryWriteExponentLittleEndian(System.Span`1[byte],byref):bool:this (FullOpts) (0 base, 1 diff methods)
          37 (176.19 % of base) : System.IO.Hashing.dasm - System.IO.Hashing.XxHash128:WriteBigEndian128(byref,System.Span`1[byte]) (FullOpts)
          34 (Infinity of base) : System.Private.CoreLib.dasm - System.Single:TryWriteExponentBigEndian(System.Span`1[byte],byref):bool:this (FullOpts) (0 base, 1 diff methods)
          34 (Infinity of base) : System.Private.CoreLib.dasm - System.Single:TryWriteExponentLittleEndian(System.Span`1[byte],byref):bool:this (FullOpts) (0 base, 1 diff methods)
           9 (25.71 % of base) : System.Private.CoreLib.dasm - System.Decimal:System.Numerics.IFloatingPoint<System.Decimal>.TryWriteSignificandLittleEndian(System.Span`1[byte],byref):bool:this (FullOpts)
           9 (13.43 % of base) : System.Private.CoreLib.dasm - System.Runtime.InteropServices.NFloat:System.Numerics.IFloatingPoint<System.Runtime.InteropServices.NFloat>.TryWriteSignificandBigEndian(System.Span`1[byte],byref):bool:this (FullOpts)
           9 (14.06 % of base) : System.Private.CoreLib.dasm - System.Runtime.InteropServices.NFloat:System.Numerics.IFloatingPoint<System.Runtime.InteropServices.NFloat>.TryWriteSignificandLittleEndian(System.Span`1[byte],byref):bool:this (FullOpts)
           8 (20.00 % of base) : System.Private.CoreLib.dasm - System.Decimal:System.Numerics.IFloatingPoint<System.Decimal>.TryWriteSignificandBigEndian(System.Span`1[byte],byref):bool:this (FullOpts)
           8 (12.31 % of base) : System.Private.CoreLib.dasm - System.Double:System.Numerics.IFloatingPoint<System.Double>.TryWriteSignificandBigEndian(System.Span`1[byte],byref):bool:this (FullOpts)
           8 (12.90 % of base) : System.Private.CoreLib.dasm - System.Double:System.Numerics.IFloatingPoint<System.Double>.TryWriteSignificandLittleEndian(System.Span`1[byte],byref):bool:this (FullOpts)
           8 (23.53 % of base) : System.Private.CoreLib.dasm - System.Single:System.Numerics.IFloatingPoint<System.Single>.TryWriteExponentBigEndian(System.Span`1[byte],byref):bool:this (FullOpts)
           8 (23.53 % of base) : System.Private.CoreLib.dasm - System.Single:System.Numerics.IFloatingPoint<System.Single>.TryWriteExponentLittleEndian(System.Span`1[byte],byref):bool:this (FullOpts)
           6 (12.77 % of base) : System.Private.CoreLib.dasm - System.Double:System.Numerics.IFloatingPoint<System.Double>.TryWriteExponentBigEndian(System.Span`1[byte],byref):bool:this (FullOpts)
           6 (13.95 % of base) : System.Private.CoreLib.dasm - System.Double:System.Numerics.IFloatingPoint<System.Double>.TryWriteExponentLittleEndian(System.Span`1[byte],byref):bool:this (FullOpts)
           6 (12.77 % of base) : System.Private.CoreLib.dasm - System.Runtime.InteropServices.NFloat:System.Numerics.IFloatingPoint<System.Runtime.InteropServices.NFloat>.TryWriteExponentBigEndian(System.Span`1[byte],byref):bool:this (FullOpts)
           6 (13.95 % of base) : System.Private.CoreLib.dasm - System.Runtime.InteropServices.NFloat:System.Numerics.IFloatingPoint<System.Runtime.InteropServices.NFloat>.TryWriteExponentLittleEndian(System.Span`1[byte],byref):bool:this (FullOpts)
           6 (9.68 % of base) : System.Private.CoreLib.dasm - System.Single:System.Numerics.IFloatingPoint<System.Single>.TryWriteSignificandBigEndian(System.Span`1[byte],byref):bool:this (FullOpts)
           6 (10.34 % of base) : System.Private.CoreLib.dasm - System.Single:System.Numerics.IFloatingPoint<System.Single>.TryWriteSignificandLittleEndian(System.Span`1[byte],byref):bool:this (FullOpts)
           4 (1.71 % of base) : System.IO.Hashing.dasm - System.IO.Hashing.XxHash128:Hash(byte[]):byte[] (FullOpts)
           3 (1.23 % of base) : System.IO.Hashing.dasm - System.IO.Hashing.XxHash128:Hash(byte[],long):byte[] (FullOpts)
           3 (1.49 % of base) : System.IO.Hashing.dasm - System.IO.Hashing.XxHash128:Hash(System.ReadOnlySpan`1[byte],long):byte[] (FullOpts)
           3 (1.80 % of base) : System.IO.Hashing.dasm - System.IO.Hashing.XxHash128:Hash(System.ReadOnlySpan`1[byte],System.Span`1[byte],long):int (FullOpts)
           3 (1.70 % of base) : System.IO.Hashing.dasm - System.IO.Hashing.XxHash128:TryHash(System.ReadOnlySpan`1[byte],System.Span`1[byte],byref,long):bool (FullOpts)

Top method improvements (bytes):
        -482 (-100.00 % of base) : System.Private.CoreLib.dasm - System.Double:<RootN>g__NegativeN|235_1(double,int):double (FullOpts) (1 base, 0 diff methods)
        -469 (-100.00 % of base) : System.Private.CoreLib.dasm - System.Double:<RootN>g__PositiveN|235_0(double,int):double (FullOpts) (1 base, 0 diff methods)
        -384 (-100.00 % of base) : System.Private.CoreLib.dasm - System.Single:<RootN>g__NegativeN|235_1(float,int):float (FullOpts) (1 base, 0 diff methods)
        -374 (-100.00 % of base) : System.Private.CoreLib.dasm - System.Single:<RootN>g__PositiveN|235_0(float,int):float (FullOpts) (1 base, 0 diff methods)

Top method regressions (percentages):
         482 (Infinity of base) : System.Private.CoreLib.dasm - System.Double:<RootN>g__NegativeN|239_1(double,int):double (FullOpts) (0 base, 1 diff methods)
         469 (Infinity of base) : System.Private.CoreLib.dasm - System.Double:<RootN>g__PositiveN|239_0(double,int):double (FullOpts) (0 base, 1 diff methods)
          47 (Infinity of base) : System.Private.CoreLib.dasm - System.Double:TryWriteExponentBigEndian(System.Span`1[byte],byref):bool:this (FullOpts) (0 base, 1 diff methods)
          43 (Infinity of base) : System.Private.CoreLib.dasm - System.Double:TryWriteExponentLittleEndian(System.Span`1[byte],byref):bool:this (FullOpts) (0 base, 1 diff methods)
          65 (Infinity of base) : System.Private.CoreLib.dasm - System.Double:TryWriteSignificandBigEndian(System.Span`1[byte],byref):bool:this (FullOpts) (0 base, 1 diff methods)
          62 (Infinity of base) : System.Private.CoreLib.dasm - System.Double:TryWriteSignificandLittleEndian(System.Span`1[byte],byref):bool:this (FullOpts) (0 base, 1 diff methods)
         384 (Infinity of base) : System.Private.CoreLib.dasm - System.Single:<RootN>g__NegativeN|239_1(float,int):float (FullOpts) (0 base, 1 diff methods)
         374 (Infinity of base) : System.Private.CoreLib.dasm - System.Single:<RootN>g__PositiveN|239_0(float,int):float (FullOpts) (0 base, 1 diff methods)
          34 (Infinity of base) : System.Private.CoreLib.dasm - System.Single:TryWriteExponentBigEndian(System.Span`1[byte],byref):bool:this (FullOpts) (0 base, 1 diff methods)
          34 (Infinity of base) : System.Private.CoreLib.dasm - System.Single:TryWriteExponentLittleEndian(System.Span`1[byte],byref):bool:this (FullOpts) (0 base, 1 diff methods)
          62 (Infinity of base) : System.Private.CoreLib.dasm - System.Single:TryWriteSignificandBigEndian(System.Span`1[byte],byref):bool:this (FullOpts) (0 base, 1 diff methods)
          58 (Infinity of base) : System.Private.CoreLib.dasm - System.Single:TryWriteSignificandLittleEndian(System.Span`1[byte],byref):bool:this (FullOpts) (0 base, 1 diff methods)
          37 (176.19 % of base) : System.IO.Hashing.dasm - System.IO.Hashing.XxHash128:WriteBigEndian128(byref,System.Span`1[byte]) (FullOpts)
          54 (158.82 % of base) : System.IO.Hashing.dasm - System.IO.Hashing.XxHash128:GetCurrentHashCore(System.Span`1[byte]):this (FullOpts)
           9 (25.71 % of base) : System.Private.CoreLib.dasm - System.Decimal:System.Numerics.IFloatingPoint<System.Decimal>.TryWriteSignificandLittleEndian(System.Span`1[byte],byref):bool:this (FullOpts)
           8 (23.53 % of base) : System.Private.CoreLib.dasm - System.Single:System.Numerics.IFloatingPoint<System.Single>.TryWriteExponentBigEndian(System.Span`1[byte],byref):bool:this (FullOpts)
           8 (23.53 % of base) : System.Private.CoreLib.dasm - System.Single:System.Numerics.IFloatingPoint<System.Single>.TryWriteExponentLittleEndian(System.Span`1[byte],byref):bool:this (FullOpts)
           8 (20.00 % of base) : System.Private.CoreLib.dasm - System.Decimal:System.Numerics.IFloatingPoint<System.Decimal>.TryWriteSignificandBigEndian(System.Span`1[byte],byref):bool:this (FullOpts)
           9 (14.06 % of base) : System.Private.CoreLib.dasm - System.Runtime.InteropServices.NFloat:System.Numerics.IFloatingPoint<System.Runtime.InteropServices.NFloat>.TryWriteSignificandLittleEndian(System.Span`1[byte],byref):bool:this (FullOpts)
           6 (13.95 % of base) : System.Private.CoreLib.dasm - System.Double:System.Numerics.IFloatingPoint<System.Double>.TryWriteExponentLittleEndian(System.Span`1[byte],byref):bool:this (FullOpts)
           6 (13.95 % of base) : System.Private.CoreLib.dasm - System.Runtime.InteropServices.NFloat:System.Numerics.IFloatingPoint<System.Runtime.InteropServices.NFloat>.TryWriteExponentLittleEndian(System.Span`1[byte],byref):bool:this (FullOpts)
           9 (13.43 % of base) : System.Private.CoreLib.dasm - System.Runtime.InteropServices.NFloat:System.Numerics.IFloatingPoint<System.Runtime.InteropServices.NFloat>.TryWriteSignificandBigEndian(System.Span`1[byte],byref):bool:this (FullOpts)
           8 (12.90 % of base) : System.Private.CoreLib.dasm - System.Double:System.Numerics.IFloatingPoint<System.Double>.TryWriteSignificandLittleEndian(System.Span`1[byte],byref):bool:this (FullOpts)
           6 (12.77 % of base) : System.Private.CoreLib.dasm - System.Double:System.Numerics.IFloatingPoint<System.Double>.TryWriteExponentBigEndian(System.Span`1[byte],byref):bool:this (FullOpts)
           6 (12.77 % of base) : System.Private.CoreLib.dasm - System.Runtime.InteropServices.NFloat:System.Numerics.IFloatingPoint<System.Runtime.InteropServices.NFloat>.TryWriteExponentBigEndian(System.Span`1[byte],byref):bool:this (FullOpts)
           8 (12.31 % of base) : System.Private.CoreLib.dasm - System.Double:System.Numerics.IFloatingPoint<System.Double>.TryWriteSignificandBigEndian(System.Span`1[byte],byref):bool:this (FullOpts)
           6 (10.34 % of base) : System.Private.CoreLib.dasm - System.Single:System.Numerics.IFloatingPoint<System.Single>.TryWriteSignificandLittleEndian(System.Span`1[byte],byref):bool:this (FullOpts)
           6 (9.68 % of base) : System.Private.CoreLib.dasm - System.Single:System.Numerics.IFloatingPoint<System.Single>.TryWriteSignificandBigEndian(System.Span`1[byte],byref):bool:this (FullOpts)
           3 (1.80 % of base) : System.IO.Hashing.dasm - System.IO.Hashing.XxHash128:Hash(System.ReadOnlySpan`1[byte],System.Span`1[byte],long):int (FullOpts)
           4 (1.71 % of base) : System.IO.Hashing.dasm - System.IO.Hashing.XxHash128:Hash(byte[]):byte[] (FullOpts)
           3 (1.70 % of base) : System.IO.Hashing.dasm - System.IO.Hashing.XxHash128:TryHash(System.ReadOnlySpan`1[byte],System.Span`1[byte],byref,long):bool (FullOpts)
           3 (1.49 % of base) : System.IO.Hashing.dasm - System.IO.Hashing.XxHash128:Hash(System.ReadOnlySpan`1[byte],long):byte[] (FullOpts)
           3 (1.23 % of base) : System.IO.Hashing.dasm - System.IO.Hashing.XxHash128:Hash(byte[],long):byte[] (FullOpts)

Top method improvements (percentages):
        -482 (-100.00 % of base) : System.Private.CoreLib.dasm - System.Double:<RootN>g__NegativeN|235_1(double,int):double (FullOpts) (1 base, 0 diff methods)
        -469 (-100.00 % of base) : System.Private.CoreLib.dasm - System.Double:<RootN>g__PositiveN|235_0(double,int):double (FullOpts) (1 base, 0 diff methods)
        -384 (-100.00 % of base) : System.Private.CoreLib.dasm - System.Single:<RootN>g__NegativeN|235_1(float,int):float (FullOpts) (1 base, 0 diff methods)
        -374 (-100.00 % of base) : System.Private.CoreLib.dasm - System.Single:<RootN>g__PositiveN|235_0(float,int):float (FullOpts) (1 base, 0 diff methods)

37 total methods with Code Size differences (4 improved, 33 regressed), 286874 unchanged.

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

Artifacts:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions