Skip to content

[X64] [xtqqczze] BinaryWriter perf improvements #345

@MihuBot

Description

@MihuBot

Build completed in 28 minutes.
dotnet/runtime#99775

Diffs

Found 268 files with textual diffs.

Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 38735399
Total bytes of diff: 38736701
Total bytes of delta: 1302 (0.00 % of base)
Total relative delta: -1.26
    diff is a regression.
    relative diff is an improvement.


Total byte diff includes 248 bytes from reconciling methods
	Base had    1 unique methods,       37 unique bytes
	Diff had    7 unique methods,      285 unique bytes

Top file regressions (bytes):
         841 : System.IO.Compression.dasm (0.89 % of base)
         314 : System.Private.Xml.dasm (0.01 % of base)
         269 : System.Security.Cryptography.dasm (0.02 % of base)
          32 : System.Private.CoreLib.dasm (0.00 % of base)
          11 : System.IO.IsolatedStorage.dasm (0.05 % of base)
          11 : System.Configuration.ConfigurationManager.dasm (0.00 % of base)
           9 : System.ComponentModel.TypeConverter.dasm (0.00 % of base)

Top file improvements (bytes):
        -127 : System.Resources.Writer.dasm (-1.32 % of base)
         -58 : System.Resources.Extensions.dasm (-0.17 % of base)

9 total files with Code Size differences (2 improved, 7 regressed), 247 unchanged.

Top method regressions (bytes):
         291 (14.72 % of base) : System.Private.Xml.dasm - System.Xml.Xsl.Runtime.XmlQueryStaticData:GetObjectData(byref,byref):this (FullOpts)
         269 (16.00 % of base) : System.Security.Cryptography.dasm - System.Security.Cryptography.CapiHelper:ToKeyBlob(System.Security.Cryptography.DSAParameters):ubyte[] (FullOpts)
         186 (14.26 % of base) : System.IO.Compression.dasm - System.IO.Compression.ZipArchiveEntry:WriteCentralDirectoryFileHeader():this (FullOpts)
         154 (18.03 % of base) : System.IO.Compression.dasm - System.IO.Compression.ZipArchiveEntry:WriteCrcAndSizesInLocalHeader(ubyte):this (FullOpts)
         113 (24.30 % of base) : System.IO.Compression.dasm - System.IO.Compression.Zip64EndOfCentralDirectoryRecord:WriteBlock(System.IO.Stream,long,long,long) (FullOpts)
         101 (9.22 % of base) : System.IO.Compression.dasm - System.IO.Compression.ZipArchiveEntry:WriteLocalFileHeader(ubyte):ubyte:this (FullOpts)
          69 (16.67 % of base) : System.IO.Compression.dasm - System.IO.Compression.Zip64ExtraField:WriteBlock(System.IO.Stream):this (FullOpts)
          69 (17.25 % of base) : System.IO.Compression.dasm - System.IO.Compression.ZipArchiveEntry:WriteDataDescriptor():this (FullOpts)
          63 (11.95 % of base) : System.IO.Compression.dasm - System.IO.Compression.ZipEndOfCentralDirectoryBlock:WriteBlock(System.IO.Stream,long,long,long,ubyte[]) (FullOpts)
          49 (14.98 % of base) : System.IO.Compression.dasm - System.IO.Compression.Zip64EndOfCentralDirectoryLocator:WriteBlock(System.IO.Stream,long) (FullOpts)
          45 (Infinity of base) : System.Private.CoreLib.dasm - System.IO.BinaryWriter:WriteBytes[double](double):this (FullOpts) (0 base, 1 diff methods)
          44 (Infinity of base) : System.Private.CoreLib.dasm - System.IO.BinaryWriter:WriteBytes[long](long):this (FullOpts) (0 base, 1 diff methods)
          43 (Infinity of base) : System.Private.CoreLib.dasm - System.IO.BinaryWriter:WriteBytes[int](int):this (FullOpts) (0 base, 1 diff methods)
          43 (Infinity of base) : System.Private.CoreLib.dasm - System.IO.BinaryWriter:WriteBytes[short](short):this (FullOpts) (0 base, 1 diff methods)
          43 (Infinity of base) : System.Private.CoreLib.dasm - System.IO.BinaryWriter:WriteBytes[ubyte](ubyte):this (FullOpts) (0 base, 1 diff methods)
          37 (Infinity of base) : System.Private.CoreLib.dasm - System.IO.BinaryWriter:<WriteCharsCommonWithoutLengthPrefix>g__WriteToOutStream|40_0(ubyte[],int,int,ubyte):this (FullOpts) (0 base, 1 diff methods)
          37 (10.45 % of base) : System.IO.Compression.dasm - System.IO.Compression.ZipGenericExtraField:WriteBlock(System.IO.Stream):this (FullOpts)
          30 (Infinity of base) : System.Private.CoreLib.dasm - System.IO.BinaryWriter:WriteBytes[System.Numerics.Vector`1[float]](System.Numerics.Vector`1[float]):this (FullOpts) (0 base, 1 diff methods)
          23 (3.19 % of base) : System.Private.Xml.dasm - System.Xml.XmlWriterSettings:GetObjectData(System.Xml.Xsl.Runtime.XmlQueryDataWriter):this (FullOpts)
          14 (0.30 % of base) : System.Private.CoreLib.dasm - System.Reflection.Emit.CustomAttributeBuilder:.ctor(System.Reflection.ConstructorInfo,System.Object[],System.Reflection.PropertyInfo[],System.Object[],System.Reflection.FieldInfo[],System.Object[]):this (FullOpts)
          11 (1.85 % of base) : System.IO.IsolatedStorage.dasm - System.Security.IdentityHelper:GetNormalizedStrongNameHash(System.Reflection.AssemblyName):System.String (FullOpts)
          11 (1.85 % of base) : System.Configuration.ConfigurationManager.dasm - System.Security.IdentityHelper:GetNormalizedStrongNameHash(System.Reflection.AssemblyName):System.String (FullOpts)
           9 (1.16 % of base) : System.ComponentModel.TypeConverter.dasm - System.ComponentModel.Design.DesigntimeLicenseContextSerializer:Serialize(System.IO.Stream,System.String,System.ComponentModel.Design.DesigntimeLicenseContext) (FullOpts)

Top method improvements (bytes):
        -127 (-3.73 % of base) : System.Resources.Writer.dasm - System.Resources.ResourceWriter:Generate():this (FullOpts)
         -58 (-1.76 % of base) : System.Resources.Extensions.dasm - System.Resources.Extensions.PreserializedResourceWriter:Generate():this (FullOpts)
         -37 (-100.00 % of base) : System.Private.CoreLib.dasm - System.IO.BinaryWriter:<WriteCharsCommonWithoutLengthPrefix>g__WriteToOutStream|39_0(ubyte[],int,int,ubyte):this (FullOpts) (1 base, 0 diff methods)
         -29 (-39.73 % of base) : System.Private.CoreLib.dasm - System.IO.BinaryWriter:Write(short):this (FullOpts)
         -29 (-39.73 % of base) : System.Private.CoreLib.dasm - System.IO.BinaryWriter:Write(System.Half):this (FullOpts)
         -28 (-5.44 % of base) : System.Private.CoreLib.dasm - System.IO.BinaryWriter:Write(ushort):this (FullOpts) (2 methods)
         -25 (-36.76 % of base) : System.Private.CoreLib.dasm - System.IO.BinaryWriter:Write(int):this (FullOpts)
         -25 (-36.23 % of base) : System.Private.CoreLib.dasm - System.IO.BinaryWriter:Write(long):this (FullOpts)
         -25 (-36.76 % of base) : System.Private.CoreLib.dasm - System.IO.BinaryWriter:Write(uint):this (FullOpts)
         -25 (-36.23 % of base) : System.Private.CoreLib.dasm - System.IO.BinaryWriter:Write(ulong):this (FullOpts)
         -22 (-32.84 % of base) : System.Private.CoreLib.dasm - System.IO.BinaryWriter:Write(double):this (FullOpts)
         -22 (-32.84 % of base) : System.Private.CoreLib.dasm - System.IO.BinaryWriter:Write(float):this (FullOpts)

Top method regressions (percentages):
          37 (Infinity of base) : System.Private.CoreLib.dasm - System.IO.BinaryWriter:<WriteCharsCommonWithoutLengthPrefix>g__WriteToOutStream|40_0(ubyte[],int,int,ubyte):this (FullOpts) (0 base, 1 diff methods)
          45 (Infinity of base) : System.Private.CoreLib.dasm - System.IO.BinaryWriter:WriteBytes[double](double):this (FullOpts) (0 base, 1 diff methods)
          43 (Infinity of base) : System.Private.CoreLib.dasm - System.IO.BinaryWriter:WriteBytes[int](int):this (FullOpts) (0 base, 1 diff methods)
          44 (Infinity of base) : System.Private.CoreLib.dasm - System.IO.BinaryWriter:WriteBytes[long](long):this (FullOpts) (0 base, 1 diff methods)
          43 (Infinity of base) : System.Private.CoreLib.dasm - System.IO.BinaryWriter:WriteBytes[short](short):this (FullOpts) (0 base, 1 diff methods)
          30 (Infinity of base) : System.Private.CoreLib.dasm - System.IO.BinaryWriter:WriteBytes[System.Numerics.Vector`1[float]](System.Numerics.Vector`1[float]):this (FullOpts) (0 base, 1 diff methods)
          43 (Infinity of base) : System.Private.CoreLib.dasm - System.IO.BinaryWriter:WriteBytes[ubyte](ubyte):this (FullOpts) (0 base, 1 diff methods)
         113 (24.30 % of base) : System.IO.Compression.dasm - System.IO.Compression.Zip64EndOfCentralDirectoryRecord:WriteBlock(System.IO.Stream,long,long,long) (FullOpts)
         154 (18.03 % of base) : System.IO.Compression.dasm - System.IO.Compression.ZipArchiveEntry:WriteCrcAndSizesInLocalHeader(ubyte):this (FullOpts)
          69 (17.25 % of base) : System.IO.Compression.dasm - System.IO.Compression.ZipArchiveEntry:WriteDataDescriptor():this (FullOpts)
          69 (16.67 % of base) : System.IO.Compression.dasm - System.IO.Compression.Zip64ExtraField:WriteBlock(System.IO.Stream):this (FullOpts)
         269 (16.00 % of base) : System.Security.Cryptography.dasm - System.Security.Cryptography.CapiHelper:ToKeyBlob(System.Security.Cryptography.DSAParameters):ubyte[] (FullOpts)
          49 (14.98 % of base) : System.IO.Compression.dasm - System.IO.Compression.Zip64EndOfCentralDirectoryLocator:WriteBlock(System.IO.Stream,long) (FullOpts)
         291 (14.72 % of base) : System.Private.Xml.dasm - System.Xml.Xsl.Runtime.XmlQueryStaticData:GetObjectData(byref,byref):this (FullOpts)
         186 (14.26 % of base) : System.IO.Compression.dasm - System.IO.Compression.ZipArchiveEntry:WriteCentralDirectoryFileHeader():this (FullOpts)
          63 (11.95 % of base) : System.IO.Compression.dasm - System.IO.Compression.ZipEndOfCentralDirectoryBlock:WriteBlock(System.IO.Stream,long,long,long,ubyte[]) (FullOpts)
          37 (10.45 % of base) : System.IO.Compression.dasm - System.IO.Compression.ZipGenericExtraField:WriteBlock(System.IO.Stream):this (FullOpts)
         101 (9.22 % of base) : System.IO.Compression.dasm - System.IO.Compression.ZipArchiveEntry:WriteLocalFileHeader(ubyte):ubyte:this (FullOpts)
          23 (3.19 % of base) : System.Private.Xml.dasm - System.Xml.XmlWriterSettings:GetObjectData(System.Xml.Xsl.Runtime.XmlQueryDataWriter):this (FullOpts)
          11 (1.85 % of base) : System.IO.IsolatedStorage.dasm - System.Security.IdentityHelper:GetNormalizedStrongNameHash(System.Reflection.AssemblyName):System.String (FullOpts)
          11 (1.85 % of base) : System.Configuration.ConfigurationManager.dasm - System.Security.IdentityHelper:GetNormalizedStrongNameHash(System.Reflection.AssemblyName):System.String (FullOpts)
           9 (1.16 % of base) : System.ComponentModel.TypeConverter.dasm - System.ComponentModel.Design.DesigntimeLicenseContextSerializer:Serialize(System.IO.Stream,System.String,System.ComponentModel.Design.DesigntimeLicenseContext) (FullOpts)
          14 (0.30 % of base) : System.Private.CoreLib.dasm - System.Reflection.Emit.CustomAttributeBuilder:.ctor(System.Reflection.ConstructorInfo,System.Object[],System.Reflection.PropertyInfo[],System.Object[],System.Reflection.FieldInfo[],System.Object[]):this (FullOpts)

Top method improvements (percentages):
         -37 (-100.00 % of base) : System.Private.CoreLib.dasm - System.IO.BinaryWriter:<WriteCharsCommonWithoutLengthPrefix>g__WriteToOutStream|39_0(ubyte[],int,int,ubyte):this (FullOpts) (1 base, 0 diff methods)
         -29 (-39.73 % of base) : System.Private.CoreLib.dasm - System.IO.BinaryWriter:Write(short):this (FullOpts)
         -29 (-39.73 % of base) : System.Private.CoreLib.dasm - System.IO.BinaryWriter:Write(System.Half):this (FullOpts)
         -25 (-36.76 % of base) : System.Private.CoreLib.dasm - System.IO.BinaryWriter:Write(int):this (FullOpts)
         -25 (-36.76 % of base) : System.Private.CoreLib.dasm - System.IO.BinaryWriter:Write(uint):this (FullOpts)
         -25 (-36.23 % of base) : System.Private.CoreLib.dasm - System.IO.BinaryWriter:Write(long):this (FullOpts)
         -25 (-36.23 % of base) : System.Private.CoreLib.dasm - System.IO.BinaryWriter:Write(ulong):this (FullOpts)
         -22 (-32.84 % of base) : System.Private.CoreLib.dasm - System.IO.BinaryWriter:Write(double):this (FullOpts)
         -22 (-32.84 % of base) : System.Private.CoreLib.dasm - System.IO.BinaryWriter:Write(float):this (FullOpts)
         -28 (-5.44 % of base) : System.Private.CoreLib.dasm - System.IO.BinaryWriter:Write(ushort):this (FullOpts) (2 methods)
        -127 (-3.73 % of base) : System.Resources.Writer.dasm - System.Resources.ResourceWriter:Generate():this (FullOpts)
         -58 (-1.76 % of base) : System.Resources.Extensions.dasm - System.Resources.Extensions.PreserializedResourceWriter:Generate():this (FullOpts)

35 total methods with Code Size differences (12 improved, 23 regressed), 239854 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