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

[arm64] JIT: Recognize sbfiz/ubfiz idioms #61045

Merged
merged 14 commits into from
Nov 4, 2021
Merged

Conversation

EgorBo
Copy link
Member

@EgorBo EgorBo commented Oct 31, 2021

This PR recognizes '(ulong)x << cns' idioms in order to emit sbfiz/ubfiz. This patterns shows up in array accesses and while I am planning to fix array accesses in #61026 differently it still makes sense to have this peephole for explicit patterns.

Example:

// explicit pattern:
static ulong Test1(uint x) => ((ulong)x) << 2;

// implicit pattern:
static int Test2(int[] array, int i) => array[i];

Codegen diff:

; Method Prog:Test1(int):long
G_M16463_IG01:
            stp     fp, lr, [sp,#-16]!
            mov     fp, sp
G_M16463_IG02:
-           mov     w0, w0
-           lsl     x0, x0, #2
+           ubfiz   x0, x0, #2, #32
G_M16463_IG03:
            ldp     fp, lr, [sp],#16
            ret     lr
-; Total bytes of code: 24
+; Total bytes of code: 20


; Method Prog:Test2(System.Int32[],int):int
G_M15622_IG01:
            stp     fp, lr, [sp,#-16]!
            mov     fp, sp
G_M15622_IG02:
            ldr     w2, [x0,#8]
            cmp     w1, w2
            bhs     G_M15622_IG04
-           mov     w1, w1
-           lsl     x1, x1, #2
+           ubfiz   x1, x1, #2, #32
            add     x1, x1, #16
            ldr     w0, [x0, x1]
G_M15622_IG03:
            ldp     fp, lr, [sp],#16
            ret     lr
G_M15622_IG04:
            bl      CORINFO_HELP_RNGCHKFAIL
            bkpt    
-; Total bytes of code: 52
+; Total bytes of code: 48

Diffs are impressive and gives us a hint we should implement proper "addressing modes" for arm64 asap 🙂

coreclr_tests.pmi.Linux.arm64.checked.mch:


Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 165434924 (overridden on cmd)
Total bytes of diff: 165366940 (overridden on cmd)
Total bytes of delta: -67984 (-0.04 % of base)
    diff is an improvement.
    relative diff is an improvement.
Detail diffs


Top file regressions (bytes):
          12 : 250860.dasm (10.71% of base)
          12 : 185092.dasm (12.50% of base)
          12 : 211398.dasm (12.50% of base)
          12 : 242473.dasm (12.50% of base)
          12 : 83105.dasm (12.00% of base)
          12 : 182453.dasm (12.50% of base)
          12 : 236843.dasm (12.50% of base)
          12 : 225688.dasm (12.50% of base)
          12 : 237276.dasm (12.50% of base)
           8 : 111854.dasm (1.90% of base)
           8 : 251153.dasm (0.98% of base)
           4 : 238930.dasm (1.72% of base)
           4 : 242301.dasm (4.76% of base)
           4 : 242302.dasm (2.94% of base)
           4 : 82034.dasm (1.69% of base)
           4 : 84055.dasm (2.44% of base)

Top file improvements (bytes):
        -812 : 243718.dasm (-7.58% of base)
        -768 : 245095.dasm (-6.84% of base)
        -620 : 140.dasm (-5.74% of base)
        -508 : 247784.dasm (-10.06% of base)
        -428 : 233998.dasm (-2.62% of base)
        -372 : 244290.dasm (-3.12% of base)
        -332 : 240630.dasm (-2.03% of base)
        -332 : 192292.dasm (-8.75% of base)
        -256 : 192213.dasm (-9.51% of base)
        -180 : 248170.dasm (-8.64% of base)
        -172 : 253100.dasm (-6.12% of base)
        -152 : 252876.dasm (-7.77% of base)
        -144 : 220913.dasm (-3.88% of base)
        -144 : 214145.dasm (-3.85% of base)
        -128 : 188023.dasm (-4.78% of base)
        -128 : 192041.dasm (-4.78% of base)
        -128 : 187889.dasm (-4.78% of base)
        -120 : 192223.dasm (-4.50% of base)
        -116 : 243699.dasm (-1.15% of base)
        -116 : 238803.dasm (-1.15% of base)

6992 total files with Code Size differences (6976 improved, 16 regressed), 19 unchanged.

Top method regressions (bytes):
          12 (12.50% of base) : 185092.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 211398.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 242473.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 182453.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 236843.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 225688.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 237276.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.00% of base) : 83105.dasm - JitInliningTest.Args2:Main():int
          12 (10.71% of base) : 250860.dasm - X:H():System.Collections.Immutable.ImmutableArray`1[[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]
           8 ( 1.90% of base) : 111854.dasm - JIT.HardwareIntrinsics.Arm.SimpleUnaryOpTest__ReciprocalSquareRootEstimate_Vector128_Double:.ctor():this
           8 ( 0.98% of base) : 251153.dasm - VSTSTest:Worker(System.Object)
           4 ( 1.72% of base) : 238930.dasm - DefaultNamespace.ArrayList:Add(System.Object):int:this
           4 ( 1.69% of base) : 82034.dasm - JitInliningTest.Indexer:Main():int
           4 ( 2.94% of base) : 242302.dasm - N.C:Nested(System.Int32[][]):bool
           4 ( 4.76% of base) : 242301.dasm - N.C:Simple(System.Int32[]):bool
           4 ( 2.44% of base) : 84055.dasm - Program:Main():int

Top method improvements (bytes):
        -812 (-7.58% of base) : 243718.dasm - Benchstone.BenchF.LLoops:Main1(int):this
        -768 (-6.84% of base) : 245095.dasm - SimpleArray_01.Test:Test1()
        -620 (-5.74% of base) : 140.dasm - System.Text.RegularExpressions.RegexInterpreter:Go():this
        -508 (-10.06% of base) : 247784.dasm - Benchstone.BenchI.MulMatrix:Inner(System.Int32[][],System.Int32[][],System.Int32[][])
        -428 (-2.62% of base) : 233998.dasm - StrAccess2:Main():int
        -372 (-3.12% of base) : 244290.dasm - Benchstone.MDBenchF.MDLLoops:Main1(int):this
        -332 (-8.75% of base) : 192292.dasm - LUDecomp:ludcmp(System.Double[][],int,System.Int32[],byref):int
        -332 (-2.03% of base) : 240630.dasm - StrAccess2:Main():int
        -256 (-9.51% of base) : 192213.dasm - AssignJagged:second_assignments(System.Int32[][],System.Int16[][])
        -180 (-8.64% of base) : 248170.dasm - JitTest.LCS:findLCS(byref,byref,byref,byref)
        -172 (-6.12% of base) : 253100.dasm - Complex_Array_Test:Main(System.String[]):int
        -152 (-7.77% of base) : 252876.dasm - Benchstone.BenchF.InvMt:Bench():bool
        -144 (-3.88% of base) : 220913.dasm - VectorTest:Main():int
        -144 (-3.85% of base) : 214145.dasm - VectorTest:Main():int
        -128 (-4.78% of base) : 188023.dasm - IntelHardwareIntrinsicTest.TestTableSse2`2[Byte,Int64][System.Byte,System.Int64]:CheckUnpack(IntelHardwareIntrinsicTest.CheckMethodSixteenOfAll`2[Byte,Int64]):bool:this
        -128 (-4.78% of base) : 192041.dasm - IntelHardwareIntrinsicTest.TestTableSse2`2[Byte,Int64][System.Byte,System.Int64]:CheckUnpack(IntelHardwareIntrinsicTest.CheckMethodSixteenOfAll`2[Byte,Int64]):bool:this
        -128 (-4.78% of base) : 187889.dasm - IntelHardwareIntrinsicTest.TestTableSse2`2[Byte,Int64][System.Byte,System.Int64]:CheckUnpack(IntelHardwareIntrinsicTest.CheckMethodSixteenOfAll`2[Byte,Int64]):bool:this
        -120 (-4.50% of base) : 192223.dasm - AssignRect:second_assignments(System.Int32[,],System.Int16[,])
        -116 (-1.15% of base) : 243699.dasm - StrAccess1:Main():int
        -116 (-1.15% of base) : 238803.dasm - StrAccess1:Main():int

Top method regressions (percentages):
          12 (12.50% of base) : 185092.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 211398.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 242473.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 182453.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 236843.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 225688.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 237276.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.00% of base) : 83105.dasm - JitInliningTest.Args2:Main():int
          12 (10.71% of base) : 250860.dasm - X:H():System.Collections.Immutable.ImmutableArray`1[[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]
           4 ( 4.76% of base) : 242301.dasm - N.C:Simple(System.Int32[]):bool
           4 ( 2.94% of base) : 242302.dasm - N.C:Nested(System.Int32[][]):bool
           4 ( 2.44% of base) : 84055.dasm - Program:Main():int
           8 ( 1.90% of base) : 111854.dasm - JIT.HardwareIntrinsics.Arm.SimpleUnaryOpTest__ReciprocalSquareRootEstimate_Vector128_Double:.ctor():this
           4 ( 1.72% of base) : 238930.dasm - DefaultNamespace.ArrayList:Add(System.Object):int:this
           4 ( 1.69% of base) : 82034.dasm - JitInliningTest.Indexer:Main():int
           8 ( 0.98% of base) : 251153.dasm - VSTSTest:Worker(System.Object)

Top method improvements (percentages):
          -4 (-16.67% of base) : 176065.dasm - LongMulOn32BitTest:LongMul_16(int):long
          -4 (-16.67% of base) : 176032.dasm - LongMulOn32BitTest:LongMul_46(int):long
          -4 (-14.29% of base) : 84443.dasm - LargeObject:get_Size():long:this
          -4 (-14.29% of base) : 246090.dasm - ShiftTest.byte32Test:f2(ubyte):ubyte
          -4 (-14.29% of base) : 245828.dasm - ShiftTest.short32Test:f2(short):short
          -4 (-14.29% of base) : 247182.dasm - ShiftTest.ushort32Test:f2(ushort):ushort
          -4 (-14.29% of base) : 88707.dasm - Test:Add(byref,int):byref
         -12 (-14.29% of base) : 241308.dasm - Vector2Test:Move(System.Numerics.Vector2[],byref)
         -12 (-14.29% of base) : 241304.dasm - Vector4Test:Move(System.Numerics.Vector4[],byref)
         -12 (-14.29% of base) : 241298.dasm - VectorArrayTest`1[Byte][System.Byte]:Move(System.Numerics.Vector`1[System.Byte][],byref)
         -12 (-13.04% of base) : 247725.dasm - DoubLink.DoubLinkNoLeak2:MakeLeak(int):this
         -12 (-13.04% of base) : 248664.dasm - SingLink.SingLinkStay:MakeLeak(int):this
          -4 (-12.50% of base) : 251864.dasm - ShiftTest.byte32Test:f2(byte):byte
         -24 (-11.54% of base) : 248792.dasm - Benchstone.BenchF.Whetsto:P0(System.Double[])
         -12 (-10.71% of base) : 212619.dasm - DispatchTesting:DoubleNumeric_ReturnByRef(ubyte,byref,short,byref,ushort,byref,int,byref,int,byref,long,byref,long,byref):this
        -508 (-10.06% of base) : 247784.dasm - Benchstone.BenchI.MulMatrix:Inner(System.Int32[][],System.Int32[][],System.Int32[][])
          -8 (-10.00% of base) : 238651.dasm - BenchmarksGame.Fasta_2:MakeCumulative(BenchmarksGame.Fasta_2+Frequency[])
         -12 (-10.00% of base) : 145256.dasm - JIT.HardwareIntrinsics.Arm.Helpers:AddPairwiseWideningAndAdd(System.Int32[],System.Int16[],int):int
         -12 (-10.00% of base) : 207375.dasm - JIT.HardwareIntrinsics.Arm.Helpers:AddPairwiseWideningAndAdd(System.Int32[],System.Int16[],int):int
         -12 (-10.00% of base) : 91733.dasm - JIT.HardwareIntrinsics.Arm.Helpers:AddPairwiseWideningAndAdd(System.Int32[],System.Int16[],int):int

6992 total methods with Code Size differences (6976 improved, 16 regressed), 19 unchanged.


libraries.crossgen2.Linux.arm64.checked.mch:


Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 48496876 (overridden on cmd)
Total bytes of diff: 48424328 (overridden on cmd)
Total bytes of delta: -72548 (-0.15 % of base)
    diff is an improvement.
    relative diff is an improvement.
Detail diffs


Top file improvements (bytes):
       -1152 : 90723.dasm (-4.02% of base)
        -640 : 82984.dasm (-4.82% of base)
        -596 : 97646.dasm (-7.38% of base)
        -500 : 65546.dasm (-4.86% of base)
        -340 : 97682.dasm (-7.20% of base)
        -336 : 65200.dasm (-1.19% of base)
        -328 : 118049.dasm (-6.09% of base)
        -304 : 94655.dasm (-3.60% of base)
        -224 : 97660.dasm (-4.22% of base)
        -180 : 94650.dasm (-3.61% of base)
        -136 : 65973.dasm (-2.68% of base)
        -132 : 179333.dasm (-4.37% of base)
        -132 : 28970.dasm (-5.69% of base)
        -132 : 28972.dasm (-6.76% of base)
        -120 : 120694.dasm (-4.57% of base)
        -120 : 120709.dasm (-4.43% of base)
        -120 : 120523.dasm (-4.07% of base)
        -120 : 120541.dasm (-3.96% of base)
        -112 : 94651.dasm (-2.03% of base)
        -100 : 205506.dasm (-5.14% of base)

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

Top method improvements (bytes):
       -1152 (-4.02% of base) : 90723.dasm - Microsoft.VisualBasic.CompilerServices.VBBinder:BindToMethod(int,System.Reflection.MethodBase[],byref,System.Reflection.ParameterModifier[],System.Globalization.CultureInfo,System.String[],byref):System.Reflection.MethodBase:this
        -640 (-4.82% of base) : 82984.dasm - System.DefaultBinder:BindToMethod(int,System.Reflection.MethodBase[],byref,System.Reflection.ParameterModifier[],System.Globalization.CultureInfo,System.String[],byref):System.Reflection.MethodBase:this
        -596 (-7.38% of base) : 97646.dasm - System.Data.RBTree`1:RBInsert(int,int,int,int,bool):int:this
        -500 (-4.86% of base) : 65546.dasm - System.Text.RegularExpressions.RegexInterpreter:Go():this
        -340 (-7.20% of base) : 97682.dasm - System.Data.RBTree`1:RBDeleteFixup(int,int,int,int):int:this
        -336 (-1.19% of base) : 65200.dasm - System.Text.RegularExpressions.RegexCompiler:GenerateOneCode():this
        -328 (-6.09% of base) : 118049.dasm - System.Xml.Schema.XmlSchemaInference:InferSimpleType(System.String,byref):int
        -304 (-3.60% of base) : 94655.dasm - System.Data.RBTree`1:RBInsert(int,int,int,int,bool):int:this
        -224 (-4.22% of base) : 97660.dasm - System.Data.RBTree`1:RBDeleteX(int,int,int):int:this
        -180 (-3.61% of base) : 94650.dasm - System.Data.RBTree`1:RBDeleteFixup(int,int,int,int):int:this
        -136 (-2.68% of base) : 65973.dasm - System.Text.RegularExpressions.Symbolic.SymbolicRegexMatcher`1:FindFinalStatePosition(System.String,int,int,int,byref,byref):int:this
        -132 (-5.69% of base) : 28970.dasm - Filter:populateDstViaMask(System.__Canon[],System.UInt32[],System.__Canon[]):int
        -132 (-6.76% of base) : 28972.dasm - Filter:populateMask(Microsoft.FSharp.Core.FSharpFunc`2[System.__Canon, System.Boolean],System.__Canon[],System.UInt32[]):int
        -132 (-4.37% of base) : 179333.dasm - System.Linq.Parallel.SortHelper`2:MergeSortCooperatively():this
        -120 (-4.07% of base) : 120523.dasm - <ScanAttlist2Async>d__183:MoveNext():this
        -120 (-3.96% of base) : 120541.dasm - <ScanSubsetContentAsync>d__174:MoveNext():this
        -120 (-4.57% of base) : 120694.dasm - System.Xml.DtdParser:ScanAttlist2():int:this
        -120 (-4.43% of base) : 120709.dasm - System.Xml.DtdParser:ScanSubsetContent():int:this
        -112 (-2.03% of base) : 94651.dasm - System.Data.RBTree`1:RBDeleteX(int,int,int):int:this
        -100 (-5.14% of base) : 205506.dasm - Xunit.Sdk.Sha1Digest:ProcessBlock():this

Top method improvements (percentages):
          -4 (-14.29% of base) : 66180.dasm - Internal.Runtime.CompilerServices.Unsafe:Add(byref,int):byref
          -4 (-14.29% of base) : 66178.dasm - Internal.Runtime.CompilerServices.Unsafe:Add(long,int):long
          -4 (-14.29% of base) : 189265.dasm - System.Runtime.CompilerServices.Unsafe:Add(byref,int):byref
          -4 (-14.29% of base) : 189264.dasm - System.Runtime.CompilerServices.Unsafe:Add(long,int):long
          -4 (-14.29% of base) : 189261.dasm - System.Runtime.CompilerServices.Unsafe:Subtract(byref,int):byref
          -4 (-14.29% of base) : 189260.dasm - System.Runtime.CompilerServices.Unsafe:Subtract(long,int):long
          -4 (-12.50% of base) : 59066.dasm - Microsoft.CodeAnalysis.CodeGen.SynthesizedLocalOrdinalsDispenser:MakeKey(int,int):long
          -4 (-11.11% of base) : 163291.dasm - System.Formats.Cbor.CborInitialByte:.ctor(ubyte,ubyte):this
          -4 (-11.11% of base) : 130560.dasm - System.Reflection.Metadata.BlobHandle:FromVirtualIndex(ubyte,ushort):System.Reflection.Metadata.BlobHandle
          -8 (-10.00% of base) : 67388.dasm - System.Diagnostics.Tracing.DataCollector:Enable(long,int,long,int,long,int):this
         -52 (-9.85% of base) : 87360.dasm - System.SpanHelpers:LastIndexOf(byref,int,int):int
         -52 (-9.85% of base) : 87361.dasm - System.SpanHelpers:LastIndexOf(byref,long,int):int
         -52 (-9.63% of base) : 87349.dasm - System.SpanHelpers:LastIndexOf(byref,ushort,int):int
         -16 (-9.52% of base) : 65571.dasm - System.Text.RegularExpressions.RegexInterpreter:TrackPush(int,int,int):this
          -4 (-9.09% of base) : 137811.dasm - CandidateAnalysisResult:SetInferenceLevel(ubyte):this
         -40 (-9.09% of base) : 97672.dasm - System.Data.RBTree`1:ComputeIndexByNode(int):int:this
         -48 (-8.89% of base) : 97671.dasm - System.Data.RBTree`1:ComputeIndexWithSatelliteByNode(int):int:this
         -20 (-8.62% of base) : 66560.dasm - System.Collections.Generic.GenericArraySortHelper`1:InsertionSort(System.Span`1[System.__Canon])
         -12 (-8.57% of base) : 65572.dasm - System.Text.RegularExpressions.RegexInterpreter:TrackPush(int,int):this
         -32 (-8.42% of base) : 97684.dasm - System.Data.RBTree`1:RecomputeSize(int):this

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


libraries.pmi.Linux.arm64.checked.mch:


Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 47408036 (overridden on cmd)
Total bytes of diff: 47250368 (overridden on cmd)
Total bytes of delta: -157668 (-0.33 % of base)
    diff is an improvement.
    relative diff is an improvement.
Detail diffs


Top file regressions (bytes):
          12 : 95896.dasm (12.50% of base)
          12 : 172230.dasm (12.50% of base)
          12 : 183981.dasm (12.50% of base)
          12 : 191597.dasm (12.50% of base)
          12 : 36550.dasm (12.50% of base)
          12 : 194720.dasm (12.50% of base)
          12 : 3930.dasm (12.50% of base)
          12 : 208172.dasm (12.50% of base)
          12 : 161292.dasm (12.50% of base)
          12 : 41012.dasm (12.50% of base)
          12 : 146860.dasm (12.50% of base)
          12 : 149448.dasm (12.50% of base)
           8 : 12746.dasm (4.17% of base)
           4 : 109287.dasm (2.04% of base)
           4 : 18184.dasm (2.63% of base)
           4 : 215788.dasm (0.69% of base)
           4 : 18316.dasm (2.63% of base)
           4 : 18321.dasm (2.63% of base)
           4 : 144679.dasm (0.73% of base)
           4 : 123110.dasm (4.76% of base)

Top file improvements (bytes):
       -1088 : 104310.dasm (-4.38% of base)
        -620 : 140.dasm (-5.74% of base)
        -596 : 73976.dasm (-7.53% of base)
        -344 : 114215.dasm (-6.20% of base)
        -340 : 73981.dasm (-7.42% of base)
        -336 : 782.dasm (-1.84% of base)
        -304 : 73915.dasm (-3.64% of base)
        -232 : 73980.dasm (-4.47% of base)
        -180 : 73920.dasm (-3.72% of base)
        -160 : 94058.dasm (-3.91% of base)
        -160 : 88145.dasm (-3.45% of base)
        -156 : 94045.dasm (-4.09% of base)
        -156 : 86952.dasm (-3.80% of base)
        -152 : 94036.dasm (-4.11% of base)
        -148 : 94083.dasm (-4.17% of base)
        -148 : 94107.dasm (-4.02% of base)
        -144 : 94019.dasm (-4.06% of base)
        -144 : 92866.dasm (-4.09% of base)
        -144 : 92877.dasm (-4.09% of base)
        -144 : 92908.dasm (-4.04% of base)

14400 total files with Code Size differences (14377 improved, 23 regressed), 39 unchanged.

Top method regressions (bytes):
          12 (12.50% of base) : 95896.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 172230.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 183981.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 191597.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 194720.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 3930.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 208172.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 161292.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 41012.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 146860.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 149448.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 36550.dasm - Microsoft.CodeAnalysis.CSharp.Symbols.SynthesizedStringSwitchHashMethod:ComputeStringHash(System.String):int
           8 ( 4.17% of base) : 12746.dasm - Microsoft.FSharp.Collections.ArrayModule:concatArrays(System.__Canon[]):System.__Canon[]
           4 ( 2.63% of base) : 18321.dasm - HashCompare:GenericEqualityCharArray(System.Char[],System.Char[]):bool
           4 ( 2.63% of base) : 18316.dasm - HashCompare:GenericEqualityInt32Array(System.Int32[],System.Int32[]):bool
           4 ( 2.63% of base) : 18184.dasm - HashCompare:GenericEqualityInt64Array(System.Int64[],System.Int64[]):bool
           4 ( 0.73% of base) : 144679.dasm - Newtonsoft.Json.Utilities.DateTimeUtils:GetDateValues(System.DateTime,byref,byref,byref)
           4 ( 1.01% of base) : 204547.dasm - System.Collections.Concurrent.ConcurrentDictionary`2[__Canon,Nullable`1][System.__Canon,System.Nullable`1[System.Int32]]:ToArray():System.Collections.Generic.KeyValuePair`2[System.__Canon,System.Nullable`1[System.Int32]][]:this
           4 ( 0.69% of base) : 215788.dasm - System.Net.CookieContainer:MergeUpdateCollections(byref,System.Net.CookieCollection,int,bool,bool):this
           4 ( 4.76% of base) : 123110.dasm - System.Net.Http.Headers.HeaderUtilities:ContainsNonAscii(System.String):bool

Top method improvements (bytes):
       -1088 (-4.38% of base) : 104310.dasm - Microsoft.VisualBasic.CompilerServices.VBBinder:BindToMethod(int,System.Reflection.MethodBase[],byref,System.Reflection.ParameterModifier[],System.Globalization.CultureInfo,System.String[],byref):System.Reflection.MethodBase:this
        -620 (-5.74% of base) : 140.dasm - System.Text.RegularExpressions.RegexInterpreter:Go():this
        -596 (-7.53% of base) : 73976.dasm - System.Data.RBTree`1[Byte][System.Byte]:RBInsert(int,int,int,int,bool):int:this
        -344 (-6.20% of base) : 114215.dasm - System.Xml.Schema.XmlSchemaInference:InferSimpleType(System.String,byref):int
        -340 (-7.42% of base) : 73981.dasm - System.Data.RBTree`1[Byte][System.Byte]:RBDeleteFixup(int,int,int,int):int:this
        -336 (-1.84% of base) : 782.dasm - System.Text.RegularExpressions.RegexCompiler:GenerateOneCode():this
        -304 (-3.64% of base) : 73915.dasm - System.Data.RBTree`1[__Canon][System.__Canon]:RBInsert(int,int,int,int,bool):int:this
        -232 (-4.47% of base) : 73980.dasm - System.Data.RBTree`1[Byte][System.Byte]:RBDeleteX(int,int,int):int:this
        -180 (-3.72% of base) : 73920.dasm - System.Data.RBTree`1[__Canon][System.__Canon]:RBDeleteFixup(int,int,int,int):int:this
        -160 (-3.91% of base) : 94058.dasm - Microsoft.Diagnostics.Tracing.Parsers.ApplicationServer.Multidata6TemplateHATraceData:ToXml(System.Text.StringBuilder):System.Text.StringBuilder:this
        -160 (-3.45% of base) : 88145.dasm - Microsoft.Diagnostics.Tracing.Parsers.Kernel.MemoryProcessMemInfoTraceData:ToXml(System.Text.StringBuilder):System.Text.StringBuilder:this
        -156 (-4.09% of base) : 94045.dasm - Microsoft.Diagnostics.Tracing.Parsers.ApplicationServer.Multidata3TemplateHATraceData:ToXml(System.Text.StringBuilder):System.Text.StringBuilder:this
        -156 (-3.80% of base) : 86952.dasm - Microsoft.Diagnostics.Tracing.Parsers.MicrosoftWindowsTCPIP.TcpGlobalParametersArgs:ToXml(System.Text.StringBuilder):System.Text.StringBuilder:this
        -152 (-4.11% of base) : 94036.dasm - Microsoft.Diagnostics.Tracing.Parsers.ApplicationServer.Multidata4TemplateHATraceData:ToXml(System.Text.StringBuilder):System.Text.StringBuilder:this
        -148 (-4.02% of base) : 94107.dasm - Microsoft.Diagnostics.Tracing.Parsers.ApplicationServer.Multidata13TemplateHATraceData:ToXml(System.Text.StringBuilder):System.Text.StringBuilder:this
        -148 (-4.17% of base) : 94083.dasm - Microsoft.Diagnostics.Tracing.Parsers.ApplicationServer.Multidata7TemplateHATraceData:ToXml(System.Text.StringBuilder):System.Text.StringBuilder:this
        -144 (-4.06% of base) : 94019.dasm - Microsoft.Diagnostics.Tracing.Parsers.ApplicationServer.Multidata10TemplateHATraceData:ToXml(System.Text.StringBuilder):System.Text.StringBuilder:this
        -144 (-4.09% of base) : 92866.dasm - Microsoft.Diagnostics.Tracing.Parsers.Clr.MethodJitInliningFailedAnsiTraceData:ToXml(System.Text.StringBuilder):System.Text.StringBuilder:this
        -144 (-4.09% of base) : 92877.dasm - Microsoft.Diagnostics.Tracing.Parsers.Clr.MethodJitInliningFailedTraceData:ToXml(System.Text.StringBuilder):System.Text.StringBuilder:this
        -144 (-4.09% of base) : 92917.dasm - Microsoft.Diagnostics.Tracing.Parsers.Clr.MethodJitTailCallFailedAnsiTraceData:ToXml(System.Text.StringBuilder):System.Text.StringBuilder:this

Top method regressions (percentages):
          12 (12.50% of base) : 95896.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 172230.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 183981.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 191597.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 194720.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 3930.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 208172.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 161292.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 41012.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 146860.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 149448.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 36550.dasm - Microsoft.CodeAnalysis.CSharp.Symbols.SynthesizedStringSwitchHashMethod:ComputeStringHash(System.String):int
           4 ( 5.00% of base) : 118999.dasm - System.Xml.Serialization.ReflectionXmlSerializationWriter:FindXmlnsIndex(System.Xml.Serialization.MemberMapping[]):int:this
           4 ( 4.76% of base) : 123110.dasm - System.Net.Http.Headers.HeaderUtilities:ContainsNonAscii(System.String):bool
           8 ( 4.17% of base) : 12746.dasm - Microsoft.FSharp.Collections.ArrayModule:concatArrays(System.__Canon[]):System.__Canon[]
           4 ( 3.57% of base) : 670.dasm - System.Text.RegularExpressions.RegexParser:Escape(System.String):System.String
           4 ( 2.63% of base) : 18321.dasm - HashCompare:GenericEqualityCharArray(System.Char[],System.Char[]):bool
           4 ( 2.63% of base) : 18316.dasm - HashCompare:GenericEqualityInt32Array(System.Int32[],System.Int32[]):bool
           4 ( 2.63% of base) : 18184.dasm - HashCompare:GenericEqualityInt64Array(System.Int64[],System.Int64[]):bool
           4 ( 2.04% of base) : 109287.dasm - System.Xml.XmlTextReaderImpl:GetIndexOfAttributeWithoutPrefix(System.String):int:this

Top method improvements (percentages):
         -20 (-17.86% of base) : 77866.dasm - Microsoft.Diagnostics.Tracing.TraceEventSource:GetContainerID(long):System.String:this
          -4 (-14.29% of base) : 130700.dasm - Internal.Runtime.CompilerServices.Unsafe:Add(byref,int):byref
          -4 (-14.29% of base) : 130702.dasm - Internal.Runtime.CompilerServices.Unsafe:Add(long,int):long
          -4 (-14.29% of base) : 194799.dasm - System.Runtime.CompilerServices.Unsafe:Add(byref,int):byref
          -4 (-14.29% of base) : 194801.dasm - System.Runtime.CompilerServices.Unsafe:Add(long,int):long
          -4 (-14.29% of base) : 194725.dasm - System.Runtime.CompilerServices.Unsafe:Subtract(byref,int):byref
          -4 (-14.29% of base) : 194727.dasm - System.Runtime.CompilerServices.Unsafe:Subtract(long,int):long
          -4 (-12.50% of base) : 140836.dasm - Microsoft.CodeAnalysis.CodeGen.SynthesizedLocalOrdinalsDispenser:MakeKey(int,int):long
         -12 (-12.00% of base) : 184680.dasm - System.IO.Compression.ZipHelper:RequiresUnicode(System.String):bool
         -12 (-12.00% of base) : 121548.dasm - System.Net.Http.HttpResponseMessage:ContainsNewLineCharacter(System.String):bool:this
         -12 (-12.00% of base) : 218218.dasm - System.Net.HttpValidationHelpers:ContainsNonAsciiChars(System.String):bool
         -12 (-12.00% of base) : 194874.dasm - System.Net.HttpValidationHelpers:ContainsNonAsciiChars(System.String):bool
         -12 (-12.00% of base) : 163080.dasm - System.Net.Mime.MailBnfHelper:HasCROrLF(System.String):bool
         -28 (-11.86% of base) : 78398.dasm - Microsoft.Diagnostics.Tracing.Etlx.TraceProcess:CheckJitTables():this
         -24 (-11.54% of base) : 111854.dasm - System.Xml.Schema.BitSet:NextSet(int):int:this
         -20 (-11.36% of base) : 115795.dasm - System.Xml.Xsl.XsltOld.OutputScopeManager:PopScope():this
          -4 (-11.11% of base) : 205967.dasm - System.Formats.Cbor.CborInitialByte:.ctor(ubyte,ubyte):this
          -4 (-11.11% of base) : 101107.dasm - System.Reflection.Metadata.BlobHandle:FromVirtualIndex(ubyte,ushort):System.Reflection.Metadata.BlobHandle
         -12 (-11.11% of base) : 107274.dasm - System.Xml.HtmlUtf8RawTextWriter:WriteChars(System.Char[],int,int):this
         -12 (-10.34% of base) : 107718.dasm - System.Xml.XmlUtf8RawTextWriterIndent:WriteChars(System.Char[],int,int):this

14400 total methods with Code Size differences (14377 improved, 23 regressed), 39 unchanged.


libraries_tests.pmi.Linux.arm64.checked.mch:


Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 112547708 (overridden on cmd)
Total bytes of diff: 112421940 (overridden on cmd)
Total bytes of delta: -125768 (-0.11 % of base)
    diff is an improvement.
    relative diff is an improvement.
Detail diffs


Top file regressions (bytes):
          12 : 317792.dasm (12.50% of base)
          12 : 333857.dasm (12.50% of base)
          12 : 86055.dasm (12.50% of base)
          12 : 140685.dasm (12.50% of base)
          12 : 217323.dasm (12.50% of base)
          12 : 67007.dasm (12.50% of base)
          12 : 916.dasm (12.50% of base)
          12 : 188036.dasm (12.50% of base)
          12 : 213391.dasm (12.50% of base)
          12 : 320474.dasm (12.50% of base)
          12 : 95198.dasm (1.58% of base)
          12 : 129229.dasm (12.50% of base)
          12 : 272505.dasm (12.50% of base)
          12 : 285559.dasm (3.26% of base)
          12 : 285565.dasm (3.26% of base)
          12 : 285619.dasm (3.26% of base)
          12 : 285625.dasm (3.26% of base)
          12 : 325928.dasm (12.50% of base)
          12 : 325995.dasm (12.50% of base)
          12 : 194924.dasm (12.50% of base)

Top file improvements (bytes):
        -620 : 140.dasm (-5.74% of base)
        -240 : 213671.dasm (-5.80% of base)
        -204 : 315021.dasm (-0.99% of base)
        -180 : 299530.dasm (-3.15% of base)
        -156 : 183391.dasm (-1.68% of base)
        -152 : 183223.dasm (-1.44% of base)
        -144 : 62189.dasm (-1.51% of base)
        -144 : 183264.dasm (-1.10% of base)
        -132 : 183222.dasm (-1.28% of base)
        -124 : 125406.dasm (-4.10% of base)
        -124 : 142840.dasm (-1.84% of base)
        -108 : 212959.dasm (-0.28% of base)
        -108 : 24036.dasm (-1.83% of base)
        -104 : 171845.dasm (-0.97% of base)
        -100 : 171140.dasm (-1.67% of base)
         -96 : 61339.dasm (-2.43% of base)
         -96 : 2110.dasm (-2.36% of base)
         -96 : 185966.dasm (-1.95% of base)
         -96 : 328200.dasm (-1.39% of base)
         -96 : 92125.dasm (-2.26% of base)

15993 total files with Code Size differences (15943 improved, 50 regressed), 19 unchanged.

Top method regressions (bytes):
          12 (12.50% of base) : 317792.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 333857.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 86055.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 140685.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 217323.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 67007.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 916.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 188036.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 213391.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 320474.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 129229.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 272505.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 325928.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 325995.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 194924.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 277349.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 292946.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 295585.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 270627.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 338116.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int

Top method improvements (bytes):
        -620 (-5.74% of base) : 140.dasm - System.Text.RegularExpressions.RegexInterpreter:Go():this
        -240 (-5.80% of base) : 213671.dasm - RegexTestNamespace.RegexRunnerTestClass:Go():this
        -204 (-0.99% of base) : 315021.dasm - System.Text.RegularExpressions.Generator.RegexGenerator:<EmitCompleteGo>g__EmitOneCode|11_2(System.String,byref)
        -180 (-3.15% of base) : 299530.dasm - System.Diagnostics.Metrics.Tests.MetricsTests:InstrumentPassingVariableTagsParametersTest(System.Diagnostics.Metrics.Instrument`1[Byte],System.Func`4[[System.Diagnostics.Metrics.Instrument`1[[System.Byte, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Diagnostics.DiagnosticSource, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51],[System.Byte, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Collections.Generic.KeyValuePair`2[[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Object, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]][], System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Byte, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]):this
        -156 (-1.68% of base) : 183391.dasm - System.Data.Tests.DataTableTest:ImportRowTest():this
        -152 (-1.44% of base) : 183223.dasm - System.Data.Tests.DataTableLoadRowTest:LoadRowTestOverwriteChanges():this
        -144 (-1.10% of base) : 183264.dasm - System.Data.Tests.DataTableReaderTest:TestSchemaTable():this
        -144 (-1.51% of base) : 62189.dasm - System.Text.Json.Tests.Utf8JsonWriterTests:WriteNumbers(bool,bool,System.String):this
        -132 (-1.28% of base) : 183222.dasm - System.Data.Tests.DataTableLoadRowTest:LoadRowTestUpsert():this
        -124 (-1.84% of base) : 142840.dasm - <Alpn_TestData>d__15:MoveNext():bool:this
        -124 (-4.10% of base) : 125406.dasm - Microsoft.Build.Evaluation.ExpressionShredder:GetReferencedItemNamesAndMetadata(System.String,int,int,byref,int)
        -108 (-1.83% of base) : 24036.dasm - <>c__DisplayClass20_0:<GetAsync_ManyDifferentResponseHeaders_ParsedCorrectly>b__1(System.Net.Test.Common.LoopbackServer):System.Threading.Tasks.Task:this
        -108 (-0.28% of base) : 212959.dasm - System.Numerics.Tests.Driver:RunTests()
        -104 (-0.97% of base) : 171845.dasm - Directory_ReparsePoints_MountVolume:runTest()
        -100 (-1.67% of base) : 171140.dasm - System.Security.Cryptography.Xml.Tests.KeyInfoTest:ImportKeyNode():this
         -96 (-2.36% of base) : 2110.dasm - DataContractSerializerTests:DCS_BasicPerSerializerRoundTripAndCompare_CollectionDataContract()
         -96 (-2.26% of base) : 92125.dasm - DataContractSerializerTests:DCS_BasicPerSerializerRoundTripAndCompare_CollectionDataContract()
         -96 (-1.95% of base) : 185966.dasm - System.ComponentModel.TypeConverterTests.FontConverterTest:ArgumentExceptionFontConverterData():Xunit.TheoryData`3[[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]
         -96 (-1.39% of base) : 328200.dasm - System.Runtime.InteropServices.RuntimeInformationTests.DescriptionNameTests:DumpRuntimeInformationToConsole():this
         -96 (-2.43% of base) : 61339.dasm - System.Text.Json.Nodes.Tests.ToStringTests:NodeToString()

Top method regressions (percentages):
          12 (12.50% of base) : 317792.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 333857.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 86055.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 140685.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 217323.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 67007.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 916.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 188036.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 213391.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 320474.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 129229.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 272505.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 325928.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 325995.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 194924.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 277349.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 292946.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 295585.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 270627.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 338116.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int

Top method improvements (percentages):
          -4 (-14.29% of base) : 227892.dasm - <>c:<SignDataArray_UsesHashDataAndSignHash>b__6_11(ubyte):ubyte:this
         -12 (-12.00% of base) : 83001.dasm - Microsoft.CodeAnalysis.Formatting.FormattingExtensions:GetFirstNonWhitespaceIndexInString(System.String):int
         -12 (-12.00% of base) : 81780.dasm - Microsoft.CodeAnalysis.PatternMatching.PatternMatcher:ContainsSpaceOrAsterisk(System.String):bool
         -12 (-12.00% of base) : 81152.dasm - Microsoft.CodeAnalysis.Shared.Extensions.StringExtensions:ContainsLineBreak(System.String):bool
         -12 (-12.00% of base) : 138348.dasm - System.Net.Http.HttpResponseMessage:ContainsNewLineCharacter(System.String):bool:this
         -12 (-12.00% of base) : 137991.dasm - System.Net.HttpKnownHeaderNames:EqualsOrdinal(System.String,long,int):bool
         -12 (-12.00% of base) : 325114.dasm - System.Net.HttpKnownHeaderNames:EqualsOrdinal(System.String,long,int):bool
         -12 (-12.00% of base) : 246390.dasm - System.Net.Mime.MailBnfHelper:HasCROrLF(System.String):bool
          -4 (-10.00% of base) : 90689.dasm - DirectMemoryAccessStreamReader:.ctor(long,int):this
          -8 (-10.00% of base) : 179839.dasm - System.Data.SqlClient.SqlBuffer:Clear(System.Data.SqlClient.SqlBuffer[])
          -8 (-10.00% of base) : 210263.dasm - System.Data.SqlClient.SqlBuffer:Clear(System.Data.SqlClient.SqlBuffer[])
          -8 (-9.09% of base) : 84369.dasm - Microsoft.CodeAnalysis.Differencing.LongestCommonSubstring:ItemsEqual(System.String,int,System.String,int):bool:this
          -8 (-8.33% of base) : 84329.dasm - Microsoft.CodeAnalysis.Differencing.LongestCommonImmutableArraySubsequence`1[__Canon][System.__Canon]:ItemsEqual(System.Collections.Immutable.ImmutableArray`1[__Canon],int,System.Collections.Immutable.ImmutableArray`1[__Canon],int):bool:this
         -32 (-8.08% of base) : 125568.dasm - Microsoft.Build.Internal.Utilities:ContainsNoTagsOtherThanComments(System.String,int):bool
          -8 (-8.00% of base) : 229833.dasm - Microsoft.CodeAnalysis.VisualBasic.Extensions.SyntaxKindExtensions:Contains(Microsoft.CodeAnalysis.VisualBasic.SyntaxKind[],ushort):bool
          -8 (-8.00% of base) : 143.dasm - System.Text.RegularExpressions.RegexInterpreter:TrackPush(int):this
          -4 (-7.69% of base) : 140723.dasm - <>c:<TryGetHeaderName>b__85_0(System.Char[],int):ushort:this
          -8 (-7.69% of base) : 80002.dasm - Microsoft.CodeAnalysis.PooledObjects.ObjectPool`1[__Canon][System.__Canon]:FreeSlow(System.__Canon):this
          -8 (-7.69% of base) : 147699.dasm - Piles@527-4:Invoke(int,int):Microsoft.FSharp.Core.Unit:this
          -8 (-7.41% of base) : 94459.dasm - System.Text.Encodings.Web.SpanUtility:TryWriteBytes(System.Span`1[Byte],ubyte,ubyte,ubyte,ubyte,ubyte,ubyte):bool

15993 total methods with Code Size differences (15943 improved, 50 regressed), 19 unchanged.


@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Oct 31, 2021
@ghost
Copy link

ghost commented Oct 31, 2021

Tagging subscribers to this area: @JulieLeeMSFT
See info in area-owners.md if you want to be subscribed.

Issue Details

This PR recognizes '(ulong)x << cns' idioms in order to emit sbfiz/ubfiz. This patterns shows up in array accesses and while I am planning to fix array accesses in #61026 differently it still makes sense to have it.
Example:

// explicit pattern:
static ulong Test1(uint x) => ((ulong)x) << 2;

// implicit pattern:
static int Test2(int[] array, int i) => array[i];

Codegen diff:

; Method Prog:Test1(int):long
G_M16463_IG01:
            stp     fp, lr, [sp,#-16]!
            mov     fp, sp
G_M16463_IG02:
-           mov     w0, w0
-           lsl     x0, x0, #2
+           ubfiz   x0, x0, #2, #32
G_M16463_IG03:
            ldp     fp, lr, [sp],#16
            ret     lr
-; Total bytes of code: 24
+; Total bytes of code: 20


; Method Prog:Test2(System.Int32[],int):int
G_M15622_IG01:
            stp     fp, lr, [sp,#-16]!
            mov     fp, sp
G_M15622_IG02:
            ldr     w2, [x0,#8]
            cmp     w1, w2
            bhs     G_M15622_IG04
-           mov     w1, w1
-           lsl     x1, x1, #2
+           ubfiz   x1, x1, #2, #32
            add     x1, x1, #16
            ldr     w0, [x0, x1]
G_M15622_IG03:
            ldp     fp, lr, [sp],#16
            ret     lr
G_M15622_IG04:
            bl      CORINFO_HELP_RNGCHKFAIL
            bkpt    
-; Total bytes of code: 52
+; Total bytes of code: 48

Diffs are impressive and gives us a hint we should implement proper "addressing modes" for arm64 asap 🙂

coreclr_tests.pmi.Linux.arm64.checked.mch:


Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 165434712 (overridden on cmd)
Total bytes of diff: 165366808 (overridden on cmd)
Total bytes of delta: -67904 (-0.04 % of base)
    diff is an improvement.
    relative diff is an improvement.
Detail diffs


Top file regressions (bytes):
          28 : 228736.dasm (1.28% of base)
          24 : 248951.dasm (2.65% of base)
          12 : 236843.dasm (12.50% of base)
          12 : 185092.dasm (12.50% of base)
          12 : 211398.dasm (12.50% of base)
          12 : 237276.dasm (12.50% of base)
          12 : 250860.dasm (10.71% of base)
          12 : 182453.dasm (12.50% of base)
          12 : 225688.dasm (12.50% of base)
          12 : 242473.dasm (12.50% of base)
          12 : 83105.dasm (12.00% of base)
           8 : 86091.dasm (0.55% of base)
           4 : 238930.dasm (1.72% of base)
           4 : 82034.dasm (1.69% of base)
           4 : 84055.dasm (2.44% of base)
           4 : 242301.dasm (4.76% of base)
           4 : 242302.dasm (2.94% of base)

Top file improvements (bytes):
        -812 : 243718.dasm (-7.58% of base)
        -768 : 245095.dasm (-6.84% of base)
        -620 : 140.dasm (-5.74% of base)
        -508 : 247784.dasm (-10.06% of base)
        -428 : 233998.dasm (-2.62% of base)
        -428 : 240630.dasm (-2.62% of base)
        -372 : 244290.dasm (-3.12% of base)
        -332 : 192292.dasm (-8.75% of base)
        -256 : 192213.dasm (-9.51% of base)
        -180 : 248170.dasm (-8.64% of base)
        -172 : 253100.dasm (-6.12% of base)
        -152 : 252876.dasm (-7.77% of base)
        -144 : 220913.dasm (-3.88% of base)
        -144 : 214145.dasm (-3.85% of base)
        -128 : 188023.dasm (-4.78% of base)
        -128 : 187889.dasm (-4.78% of base)
        -128 : 192041.dasm (-4.78% of base)
        -120 : 192223.dasm (-4.50% of base)
        -116 : 238803.dasm (-1.15% of base)
        -116 : 243699.dasm (-1.15% of base)

6979 total files with Code Size differences (6962 improved, 17 regressed), 19 unchanged.

Top method regressions (bytes):
          28 ( 1.28% of base) : 228736.dasm - Span.IndexerBench:Main(System.String[]):int
          24 ( 2.65% of base) : 248951.dasm - SustainedLowLatencyTest.SLL:Main(System.String[]):int
          12 (12.50% of base) : 236843.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 185092.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 211398.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 237276.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 182453.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 225688.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 242473.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.00% of base) : 83105.dasm - JitInliningTest.Args2:Main():int
          12 (10.71% of base) : 250860.dasm - X:H():System.Collections.Immutable.ImmutableArray`1[[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]
           8 ( 0.55% of base) : 86091.dasm - ILGEN_0x1dd8d826:Method_0x1830b93d(int):int
           4 ( 1.72% of base) : 238930.dasm - DefaultNamespace.ArrayList:Add(System.Object):int:this
           4 ( 1.69% of base) : 82034.dasm - JitInliningTest.Indexer:Main():int
           4 ( 2.94% of base) : 242302.dasm - N.C:Nested(System.Int32[][]):bool
           4 ( 4.76% of base) : 242301.dasm - N.C:Simple(System.Int32[]):bool
           4 ( 2.44% of base) : 84055.dasm - Program:Main():int

Top method improvements (bytes):
        -812 (-7.58% of base) : 243718.dasm - Benchstone.BenchF.LLoops:Main1(int):this
        -768 (-6.84% of base) : 245095.dasm - SimpleArray_01.Test:Test1()
        -620 (-5.74% of base) : 140.dasm - System.Text.RegularExpressions.RegexInterpreter:Go():this
        -508 (-10.06% of base) : 247784.dasm - Benchstone.BenchI.MulMatrix:Inner(System.Int32[][],System.Int32[][],System.Int32[][])
        -428 (-2.62% of base) : 233998.dasm - StrAccess2:Main():int
        -428 (-2.62% of base) : 240630.dasm - StrAccess2:Main():int
        -372 (-3.12% of base) : 244290.dasm - Benchstone.MDBenchF.MDLLoops:Main1(int):this
        -332 (-8.75% of base) : 192292.dasm - LUDecomp:ludcmp(System.Double[][],int,System.Int32[],byref):int
        -256 (-9.51% of base) : 192213.dasm - AssignJagged:second_assignments(System.Int32[][],System.Int16[][])
        -180 (-8.64% of base) : 248170.dasm - JitTest.LCS:findLCS(byref,byref,byref,byref)
        -172 (-6.12% of base) : 253100.dasm - Complex_Array_Test:Main(System.String[]):int
        -152 (-7.77% of base) : 252876.dasm - Benchstone.BenchF.InvMt:Bench():bool
        -144 (-3.88% of base) : 220913.dasm - VectorTest:Main():int
        -144 (-3.85% of base) : 214145.dasm - VectorTest:Main():int
        -128 (-4.78% of base) : 188023.dasm - IntelHardwareIntrinsicTest.TestTableSse2`2[Byte,Int64][System.Byte,System.Int64]:CheckUnpack(IntelHardwareIntrinsicTest.CheckMethodSixteenOfAll`2[Byte,Int64]):bool:this
        -128 (-4.78% of base) : 187889.dasm - IntelHardwareIntrinsicTest.TestTableSse2`2[Byte,Int64][System.Byte,System.Int64]:CheckUnpack(IntelHardwareIntrinsicTest.CheckMethodSixteenOfAll`2[Byte,Int64]):bool:this
        -128 (-4.78% of base) : 192041.dasm - IntelHardwareIntrinsicTest.TestTableSse2`2[Byte,Int64][System.Byte,System.Int64]:CheckUnpack(IntelHardwareIntrinsicTest.CheckMethodSixteenOfAll`2[Byte,Int64]):bool:this
        -120 (-4.50% of base) : 192223.dasm - AssignRect:second_assignments(System.Int32[,],System.Int16[,])
        -116 (-1.15% of base) : 238803.dasm - StrAccess1:Main():int
        -116 (-1.15% of base) : 243699.dasm - StrAccess1:Main():int

Top method regressions (percentages):
          12 (12.50% of base) : 236843.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 185092.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 211398.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 237276.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 182453.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 225688.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 242473.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.00% of base) : 83105.dasm - JitInliningTest.Args2:Main():int
          12 (10.71% of base) : 250860.dasm - X:H():System.Collections.Immutable.ImmutableArray`1[[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]
           4 ( 4.76% of base) : 242301.dasm - N.C:Simple(System.Int32[]):bool
           4 ( 2.94% of base) : 242302.dasm - N.C:Nested(System.Int32[][]):bool
          24 ( 2.65% of base) : 248951.dasm - SustainedLowLatencyTest.SLL:Main(System.String[]):int
           4 ( 2.44% of base) : 84055.dasm - Program:Main():int
           4 ( 1.72% of base) : 238930.dasm - DefaultNamespace.ArrayList:Add(System.Object):int:this
           4 ( 1.69% of base) : 82034.dasm - JitInliningTest.Indexer:Main():int
          28 ( 1.28% of base) : 228736.dasm - Span.IndexerBench:Main(System.String[]):int
           8 ( 0.55% of base) : 86091.dasm - ILGEN_0x1dd8d826:Method_0x1830b93d(int):int

Top method improvements (percentages):
          -4 (-16.67% of base) : 176065.dasm - LongMulOn32BitTest:LongMul_16(int):long
          -4 (-16.67% of base) : 176032.dasm - LongMulOn32BitTest:LongMul_46(int):long
          -4 (-14.29% of base) : 84443.dasm - LargeObject:get_Size():long:this
          -4 (-14.29% of base) : 88707.dasm - Test:Add(byref,int):byref
         -12 (-14.29% of base) : 241308.dasm - Vector2Test:Move(System.Numerics.Vector2[],byref)
         -12 (-14.29% of base) : 241304.dasm - Vector4Test:Move(System.Numerics.Vector4[],byref)
         -12 (-14.29% of base) : 241298.dasm - VectorArrayTest`1[Byte][System.Byte]:Move(System.Numerics.Vector`1[System.Byte][],byref)
         -12 (-13.04% of base) : 247725.dasm - DoubLink.DoubLinkNoLeak2:MakeLeak(int):this
         -12 (-13.04% of base) : 248664.dasm - SingLink.SingLinkStay:MakeLeak(int):this
         -24 (-11.54% of base) : 248792.dasm - Benchstone.BenchF.Whetsto:P0(System.Double[])
        -508 (-10.06% of base) : 247784.dasm - Benchstone.BenchI.MulMatrix:Inner(System.Int32[][],System.Int32[][],System.Int32[][])
          -8 (-10.00% of base) : 238651.dasm - BenchmarksGame.Fasta_2:MakeCumulative(BenchmarksGame.Fasta_2+Frequency[])
         -12 (-10.00% of base) : 189127.dasm - JIT.HardwareIntrinsics.Arm.Helpers:AddPairwiseWideningAndAdd(System.Int32[],System.Int16[],int):int
         -12 (-10.00% of base) : 91733.dasm - JIT.HardwareIntrinsics.Arm.Helpers:AddPairwiseWideningAndAdd(System.Int32[],System.Int16[],int):int
         -12 (-10.00% of base) : 190271.dasm - JIT.HardwareIntrinsics.Arm.Helpers:AddPairwiseWideningAndAdd(System.Int32[],System.Int16[],int):int
         -12 (-10.00% of base) : 102456.dasm - JIT.HardwareIntrinsics.Arm.Helpers:AddPairwiseWideningAndAdd(System.Int32[],System.Int16[],int):int
         -12 (-10.00% of base) : 129002.dasm - JIT.HardwareIntrinsics.Arm.Helpers:AddPairwiseWideningAndAdd(System.Int32[],System.Int16[],int):int
         -12 (-10.00% of base) : 182010.dasm - JIT.HardwareIntrinsics.Arm.Helpers:AddPairwiseWideningAndAdd(System.Int32[],System.Int16[],int):int
         -12 (-10.00% of base) : 202822.dasm - JIT.HardwareIntrinsics.Arm.Helpers:AddPairwiseWideningAndAdd(System.Int32[],System.Int16[],int):int
         -12 (-10.00% of base) : 172954.dasm - JIT.HardwareIntrinsics.Arm.Helpers:AddPairwiseWideningAndAdd(System.Int32[],System.Int16[],int):int

6979 total methods with Code Size differences (6962 improved, 17 regressed), 19 unchanged.


libraries.crossgen2.Linux.arm64.checked.mch:


Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 48496876 (overridden on cmd)
Total bytes of diff: 48424400 (overridden on cmd)
Total bytes of delta: -72476 (-0.15 % of base)
    diff is an improvement.
    relative diff is an improvement.
Detail diffs


Top file improvements (bytes):
       -1152 : 90723.dasm (-4.02% of base)
        -640 : 82984.dasm (-4.82% of base)
        -596 : 97646.dasm (-7.38% of base)
        -500 : 65546.dasm (-4.86% of base)
        -340 : 97682.dasm (-7.20% of base)
        -336 : 65200.dasm (-1.19% of base)
        -328 : 118049.dasm (-6.09% of base)
        -304 : 94655.dasm (-3.60% of base)
        -224 : 97660.dasm (-4.22% of base)
        -180 : 94650.dasm (-3.61% of base)
        -136 : 65973.dasm (-2.68% of base)
        -132 : 179333.dasm (-4.37% of base)
        -132 : 28972.dasm (-6.76% of base)
        -132 : 28970.dasm (-5.69% of base)
        -120 : 120523.dasm (-4.07% of base)
        -120 : 120541.dasm (-3.96% of base)
        -120 : 120709.dasm (-4.43% of base)
        -120 : 120694.dasm (-4.57% of base)
        -112 : 94651.dasm (-2.03% of base)
        -100 : 205506.dasm (-5.14% of base)

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

Top method improvements (bytes):
       -1152 (-4.02% of base) : 90723.dasm - Microsoft.VisualBasic.CompilerServices.VBBinder:BindToMethod(int,System.Reflection.MethodBase[],byref,System.Reflection.ParameterModifier[],System.Globalization.CultureInfo,System.String[],byref):System.Reflection.MethodBase:this
        -640 (-4.82% of base) : 82984.dasm - System.DefaultBinder:BindToMethod(int,System.Reflection.MethodBase[],byref,System.Reflection.ParameterModifier[],System.Globalization.CultureInfo,System.String[],byref):System.Reflection.MethodBase:this
        -596 (-7.38% of base) : 97646.dasm - System.Data.RBTree`1:RBInsert(int,int,int,int,bool):int:this
        -500 (-4.86% of base) : 65546.dasm - System.Text.RegularExpressions.RegexInterpreter:Go():this
        -340 (-7.20% of base) : 97682.dasm - System.Data.RBTree`1:RBDeleteFixup(int,int,int,int):int:this
        -336 (-1.19% of base) : 65200.dasm - System.Text.RegularExpressions.RegexCompiler:GenerateOneCode():this
        -328 (-6.09% of base) : 118049.dasm - System.Xml.Schema.XmlSchemaInference:InferSimpleType(System.String,byref):int
        -304 (-3.60% of base) : 94655.dasm - System.Data.RBTree`1:RBInsert(int,int,int,int,bool):int:this
        -224 (-4.22% of base) : 97660.dasm - System.Data.RBTree`1:RBDeleteX(int,int,int):int:this
        -180 (-3.61% of base) : 94650.dasm - System.Data.RBTree`1:RBDeleteFixup(int,int,int,int):int:this
        -136 (-2.68% of base) : 65973.dasm - System.Text.RegularExpressions.Symbolic.SymbolicRegexMatcher`1:FindFinalStatePosition(System.String,int,int,int,byref,byref):int:this
        -132 (-5.69% of base) : 28970.dasm - Filter:populateDstViaMask(System.__Canon[],System.UInt32[],System.__Canon[]):int
        -132 (-6.76% of base) : 28972.dasm - Filter:populateMask(Microsoft.FSharp.Core.FSharpFunc`2[System.__Canon, System.Boolean],System.__Canon[],System.UInt32[]):int
        -132 (-4.37% of base) : 179333.dasm - System.Linq.Parallel.SortHelper`2:MergeSortCooperatively():this
        -120 (-4.07% of base) : 120523.dasm - <ScanAttlist2Async>d__183:MoveNext():this
        -120 (-3.96% of base) : 120541.dasm - <ScanSubsetContentAsync>d__174:MoveNext():this
        -120 (-4.57% of base) : 120694.dasm - System.Xml.DtdParser:ScanAttlist2():int:this
        -120 (-4.43% of base) : 120709.dasm - System.Xml.DtdParser:ScanSubsetContent():int:this
        -112 (-2.03% of base) : 94651.dasm - System.Data.RBTree`1:RBDeleteX(int,int,int):int:this
        -100 (-5.14% of base) : 205506.dasm - Xunit.Sdk.Sha1Digest:ProcessBlock():this

Top method improvements (percentages):
          -4 (-14.29% of base) : 66180.dasm - Internal.Runtime.CompilerServices.Unsafe:Add(byref,int):byref
          -4 (-14.29% of base) : 66178.dasm - Internal.Runtime.CompilerServices.Unsafe:Add(long,int):long
          -4 (-14.29% of base) : 189265.dasm - System.Runtime.CompilerServices.Unsafe:Add(byref,int):byref
          -4 (-14.29% of base) : 189264.dasm - System.Runtime.CompilerServices.Unsafe:Add(long,int):long
          -4 (-14.29% of base) : 189261.dasm - System.Runtime.CompilerServices.Unsafe:Subtract(byref,int):byref
          -4 (-14.29% of base) : 189260.dasm - System.Runtime.CompilerServices.Unsafe:Subtract(long,int):long
          -4 (-12.50% of base) : 59066.dasm - Microsoft.CodeAnalysis.CodeGen.SynthesizedLocalOrdinalsDispenser:MakeKey(int,int):long
          -8 (-10.00% of base) : 67388.dasm - System.Diagnostics.Tracing.DataCollector:Enable(long,int,long,int,long,int):this
         -52 (-9.85% of base) : 87360.dasm - System.SpanHelpers:LastIndexOf(byref,int,int):int
         -52 (-9.85% of base) : 87361.dasm - System.SpanHelpers:LastIndexOf(byref,long,int):int
         -52 (-9.63% of base) : 87349.dasm - System.SpanHelpers:LastIndexOf(byref,ushort,int):int
         -16 (-9.52% of base) : 65571.dasm - System.Text.RegularExpressions.RegexInterpreter:TrackPush(int,int,int):this
         -40 (-9.09% of base) : 97672.dasm - System.Data.RBTree`1:ComputeIndexByNode(int):int:this
         -48 (-8.89% of base) : 97671.dasm - System.Data.RBTree`1:ComputeIndexWithSatelliteByNode(int):int:this
         -20 (-8.62% of base) : 66560.dasm - System.Collections.Generic.GenericArraySortHelper`1:InsertionSort(System.Span`1[System.__Canon])
         -12 (-8.57% of base) : 65572.dasm - System.Text.RegularExpressions.RegexInterpreter:TrackPush(int,int):this
         -32 (-8.42% of base) : 97684.dasm - System.Data.RBTree`1:RecomputeSize(int):this
         -72 (-8.41% of base) : 209570.dasm - System.Runtime.Caching.UsageBucket:RemoveEntryFromLastRefList(System.Runtime.Caching.UsageEntryRef):this
         -20 (-8.33% of base) : 91664.dasm - FixedExistanceList:MoveToFront(int):this
         -12 (-8.33% of base) : 65569.dasm - System.Text.RegularExpressions.RegexInterpreter:TrackPush2(int,int):this

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


libraries.pmi.Linux.arm64.checked.mch:


Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 47408036 (overridden on cmd)
Total bytes of diff: 47250428 (overridden on cmd)
Total bytes of delta: -157608 (-0.33 % of base)
    diff is an improvement.
    relative diff is an improvement.
Detail diffs


Top file regressions (bytes):
          12 : 36550.dasm (12.50% of base)
          12 : 191597.dasm (12.50% of base)
          12 : 146860.dasm (12.50% of base)
          12 : 3930.dasm (12.50% of base)
          12 : 95896.dasm (12.50% of base)
          12 : 149448.dasm (12.50% of base)
          12 : 161292.dasm (12.50% of base)
          12 : 183981.dasm (12.50% of base)
          12 : 208172.dasm (12.50% of base)
          12 : 172230.dasm (12.50% of base)
          12 : 194720.dasm (12.50% of base)
          12 : 41012.dasm (12.50% of base)
           8 : 12746.dasm (4.17% of base)
           4 : 18184.dasm (2.63% of base)
           4 : 204547.dasm (1.01% of base)
           4 : 109287.dasm (2.04% of base)
           4 : 18316.dasm (2.63% of base)
           4 : 18321.dasm (2.63% of base)
           4 : 670.dasm (3.57% of base)
           4 : 144679.dasm (0.73% of base)

Top file improvements (bytes):
       -1088 : 104310.dasm (-4.38% of base)
        -620 : 140.dasm (-5.74% of base)
        -596 : 73976.dasm (-7.53% of base)
        -344 : 114215.dasm (-6.20% of base)
        -340 : 73981.dasm (-7.42% of base)
        -336 : 782.dasm (-1.84% of base)
        -304 : 73915.dasm (-3.64% of base)
        -232 : 73980.dasm (-4.47% of base)
        -180 : 73920.dasm (-3.72% of base)
        -160 : 88145.dasm (-3.45% of base)
        -160 : 94058.dasm (-3.91% of base)
        -156 : 94045.dasm (-4.09% of base)
        -156 : 86952.dasm (-3.80% of base)
        -152 : 94036.dasm (-4.11% of base)
        -148 : 94083.dasm (-4.17% of base)
        -148 : 94107.dasm (-4.02% of base)
        -144 : 94019.dasm (-4.06% of base)
        -144 : 92866.dasm (-4.09% of base)
        -144 : 92877.dasm (-4.09% of base)
        -144 : 92908.dasm (-4.04% of base)

14391 total files with Code Size differences (14368 improved, 23 regressed), 39 unchanged.

Top method regressions (bytes):
          12 (12.50% of base) : 191597.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 146860.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 3930.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 95896.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 149448.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 161292.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 183981.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 208172.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 172230.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 194720.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 41012.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 36550.dasm - Microsoft.CodeAnalysis.CSharp.Symbols.SynthesizedStringSwitchHashMethod:ComputeStringHash(System.String):int
           8 ( 4.17% of base) : 12746.dasm - Microsoft.FSharp.Collections.ArrayModule:concatArrays(System.__Canon[]):System.__Canon[]
           4 ( 2.63% of base) : 18321.dasm - HashCompare:GenericEqualityCharArray(System.Char[],System.Char[]):bool
           4 ( 2.63% of base) : 18316.dasm - HashCompare:GenericEqualityInt32Array(System.Int32[],System.Int32[]):bool
           4 ( 2.63% of base) : 18184.dasm - HashCompare:GenericEqualityInt64Array(System.Int64[],System.Int64[]):bool
           4 ( 0.73% of base) : 144679.dasm - Newtonsoft.Json.Utilities.DateTimeUtils:GetDateValues(System.DateTime,byref,byref,byref)
           4 ( 1.01% of base) : 204547.dasm - System.Collections.Concurrent.ConcurrentDictionary`2[__Canon,Nullable`1][System.__Canon,System.Nullable`1[System.Int32]]:ToArray():System.Collections.Generic.KeyValuePair`2[System.__Canon,System.Nullable`1[System.Int32]][]:this
           4 ( 0.69% of base) : 215788.dasm - System.Net.CookieContainer:MergeUpdateCollections(byref,System.Net.CookieCollection,int,bool,bool):this
           4 ( 4.76% of base) : 123110.dasm - System.Net.Http.Headers.HeaderUtilities:ContainsNonAscii(System.String):bool

Top method improvements (bytes):
       -1088 (-4.38% of base) : 104310.dasm - Microsoft.VisualBasic.CompilerServices.VBBinder:BindToMethod(int,System.Reflection.MethodBase[],byref,System.Reflection.ParameterModifier[],System.Globalization.CultureInfo,System.String[],byref):System.Reflection.MethodBase:this
        -620 (-5.74% of base) : 140.dasm - System.Text.RegularExpressions.RegexInterpreter:Go():this
        -596 (-7.53% of base) : 73976.dasm - System.Data.RBTree`1[Byte][System.Byte]:RBInsert(int,int,int,int,bool):int:this
        -344 (-6.20% of base) : 114215.dasm - System.Xml.Schema.XmlSchemaInference:InferSimpleType(System.String,byref):int
        -340 (-7.42% of base) : 73981.dasm - System.Data.RBTree`1[Byte][System.Byte]:RBDeleteFixup(int,int,int,int):int:this
        -336 (-1.84% of base) : 782.dasm - System.Text.RegularExpressions.RegexCompiler:GenerateOneCode():this
        -304 (-3.64% of base) : 73915.dasm - System.Data.RBTree`1[__Canon][System.__Canon]:RBInsert(int,int,int,int,bool):int:this
        -232 (-4.47% of base) : 73980.dasm - System.Data.RBTree`1[Byte][System.Byte]:RBDeleteX(int,int,int):int:this
        -180 (-3.72% of base) : 73920.dasm - System.Data.RBTree`1[__Canon][System.__Canon]:RBDeleteFixup(int,int,int,int):int:this
        -160 (-3.91% of base) : 94058.dasm - Microsoft.Diagnostics.Tracing.Parsers.ApplicationServer.Multidata6TemplateHATraceData:ToXml(System.Text.StringBuilder):System.Text.StringBuilder:this
        -160 (-3.45% of base) : 88145.dasm - Microsoft.Diagnostics.Tracing.Parsers.Kernel.MemoryProcessMemInfoTraceData:ToXml(System.Text.StringBuilder):System.Text.StringBuilder:this
        -156 (-4.09% of base) : 94045.dasm - Microsoft.Diagnostics.Tracing.Parsers.ApplicationServer.Multidata3TemplateHATraceData:ToXml(System.Text.StringBuilder):System.Text.StringBuilder:this
        -156 (-3.80% of base) : 86952.dasm - Microsoft.Diagnostics.Tracing.Parsers.MicrosoftWindowsTCPIP.TcpGlobalParametersArgs:ToXml(System.Text.StringBuilder):System.Text.StringBuilder:this
        -152 (-4.11% of base) : 94036.dasm - Microsoft.Diagnostics.Tracing.Parsers.ApplicationServer.Multidata4TemplateHATraceData:ToXml(System.Text.StringBuilder):System.Text.StringBuilder:this
        -148 (-4.02% of base) : 94107.dasm - Microsoft.Diagnostics.Tracing.Parsers.ApplicationServer.Multidata13TemplateHATraceData:ToXml(System.Text.StringBuilder):System.Text.StringBuilder:this
        -148 (-4.17% of base) : 94083.dasm - Microsoft.Diagnostics.Tracing.Parsers.ApplicationServer.Multidata7TemplateHATraceData:ToXml(System.Text.StringBuilder):System.Text.StringBuilder:this
        -144 (-4.06% of base) : 94019.dasm - Microsoft.Diagnostics.Tracing.Parsers.ApplicationServer.Multidata10TemplateHATraceData:ToXml(System.Text.StringBuilder):System.Text.StringBuilder:this
        -144 (-4.09% of base) : 92866.dasm - Microsoft.Diagnostics.Tracing.Parsers.Clr.MethodJitInliningFailedAnsiTraceData:ToXml(System.Text.StringBuilder):System.Text.StringBuilder:this
        -144 (-4.09% of base) : 92877.dasm - Microsoft.Diagnostics.Tracing.Parsers.Clr.MethodJitInliningFailedTraceData:ToXml(System.Text.StringBuilder):System.Text.StringBuilder:this
        -144 (-4.09% of base) : 92917.dasm - Microsoft.Diagnostics.Tracing.Parsers.Clr.MethodJitTailCallFailedAnsiTraceData:ToXml(System.Text.StringBuilder):System.Text.StringBuilder:this

Top method regressions (percentages):
          12 (12.50% of base) : 191597.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 146860.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 3930.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 95896.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 149448.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 161292.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 183981.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 208172.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 172230.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 194720.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 41012.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 36550.dasm - Microsoft.CodeAnalysis.CSharp.Symbols.SynthesizedStringSwitchHashMethod:ComputeStringHash(System.String):int
           4 ( 5.00% of base) : 118999.dasm - System.Xml.Serialization.ReflectionXmlSerializationWriter:FindXmlnsIndex(System.Xml.Serialization.MemberMapping[]):int:this
           4 ( 4.76% of base) : 123110.dasm - System.Net.Http.Headers.HeaderUtilities:ContainsNonAscii(System.String):bool
           8 ( 4.17% of base) : 12746.dasm - Microsoft.FSharp.Collections.ArrayModule:concatArrays(System.__Canon[]):System.__Canon[]
           4 ( 3.57% of base) : 670.dasm - System.Text.RegularExpressions.RegexParser:Escape(System.String):System.String
           4 ( 2.63% of base) : 18321.dasm - HashCompare:GenericEqualityCharArray(System.Char[],System.Char[]):bool
           4 ( 2.63% of base) : 18316.dasm - HashCompare:GenericEqualityInt32Array(System.Int32[],System.Int32[]):bool
           4 ( 2.63% of base) : 18184.dasm - HashCompare:GenericEqualityInt64Array(System.Int64[],System.Int64[]):bool
           4 ( 2.04% of base) : 109287.dasm - System.Xml.XmlTextReaderImpl:GetIndexOfAttributeWithoutPrefix(System.String):int:this

Top method improvements (percentages):
         -20 (-17.86% of base) : 77866.dasm - Microsoft.Diagnostics.Tracing.TraceEventSource:GetContainerID(long):System.String:this
          -4 (-14.29% of base) : 130700.dasm - Internal.Runtime.CompilerServices.Unsafe:Add(byref,int):byref
          -4 (-14.29% of base) : 130702.dasm - Internal.Runtime.CompilerServices.Unsafe:Add(long,int):long
          -4 (-14.29% of base) : 194799.dasm - System.Runtime.CompilerServices.Unsafe:Add(byref,int):byref
          -4 (-14.29% of base) : 194801.dasm - System.Runtime.CompilerServices.Unsafe:Add(long,int):long
          -4 (-14.29% of base) : 194725.dasm - System.Runtime.CompilerServices.Unsafe:Subtract(byref,int):byref
          -4 (-14.29% of base) : 194727.dasm - System.Runtime.CompilerServices.Unsafe:Subtract(long,int):long
          -4 (-12.50% of base) : 140836.dasm - Microsoft.CodeAnalysis.CodeGen.SynthesizedLocalOrdinalsDispenser:MakeKey(int,int):long
         -12 (-12.00% of base) : 184680.dasm - System.IO.Compression.ZipHelper:RequiresUnicode(System.String):bool
         -12 (-12.00% of base) : 121548.dasm - System.Net.Http.HttpResponseMessage:ContainsNewLineCharacter(System.String):bool:this
         -12 (-12.00% of base) : 218218.dasm - System.Net.HttpValidationHelpers:ContainsNonAsciiChars(System.String):bool
         -12 (-12.00% of base) : 194874.dasm - System.Net.HttpValidationHelpers:ContainsNonAsciiChars(System.String):bool
         -12 (-12.00% of base) : 163080.dasm - System.Net.Mime.MailBnfHelper:HasCROrLF(System.String):bool
         -28 (-11.86% of base) : 78398.dasm - Microsoft.Diagnostics.Tracing.Etlx.TraceProcess:CheckJitTables():this
         -24 (-11.54% of base) : 111854.dasm - System.Xml.Schema.BitSet:NextSet(int):int:this
         -20 (-11.36% of base) : 115795.dasm - System.Xml.Xsl.XsltOld.OutputScopeManager:PopScope():this
         -12 (-11.11% of base) : 107274.dasm - System.Xml.HtmlUtf8RawTextWriter:WriteChars(System.Char[],int,int):this
         -12 (-10.34% of base) : 107718.dasm - System.Xml.XmlUtf8RawTextWriterIndent:WriteChars(System.Char[],int,int):this
         -16 (-10.26% of base) : 542.dasm - System.Text.RegularExpressions.RegexInterpreter:TrackPush(int,int,int):this
         -52 (-10.00% of base) : 124808.dasm - System.SpanHelpers:LastIndexOf(byref,short,int):int

14391 total methods with Code Size differences (14368 improved, 23 regressed), 39 unchanged.


libraries_tests.pmi.Linux.arm64.checked.mch:


Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 112547776 (overridden on cmd)
Total bytes of diff: 112422112 (overridden on cmd)
Total bytes of delta: -125664 (-0.11 % of base)
    diff is an improvement.
    relative diff is an improvement.
Detail diffs


Top file regressions (bytes):
          12 : 194924.dasm (12.50% of base)
          12 : 333857.dasm (12.50% of base)
          12 : 272505.dasm (12.50% of base)
          12 : 285676.dasm (3.26% of base)
          12 : 285682.dasm (3.26% of base)
          12 : 285732.dasm (3.26% of base)
          12 : 285738.dasm (3.26% of base)
          12 : 317792.dasm (12.50% of base)
          12 : 86055.dasm (12.50% of base)
          12 : 140685.dasm (12.50% of base)
          12 : 270627.dasm (12.50% of base)
          12 : 285559.dasm (3.26% of base)
          12 : 285565.dasm (3.26% of base)
          12 : 285619.dasm (3.26% of base)
          12 : 285625.dasm (3.26% of base)
          12 : 95198.dasm (1.58% of base)
          12 : 188036.dasm (12.50% of base)
          12 : 23759.dasm (12.50% of base)
          12 : 295585.dasm (12.50% of base)
          12 : 67007.dasm (12.50% of base)

Top file improvements (bytes):
        -620 : 140.dasm (-5.74% of base)
        -240 : 213671.dasm (-5.80% of base)
        -204 : 315021.dasm (-0.99% of base)
        -180 : 299530.dasm (-3.15% of base)
        -156 : 183391.dasm (-1.68% of base)
        -152 : 183223.dasm (-1.44% of base)
        -144 : 62189.dasm (-1.51% of base)
        -144 : 183264.dasm (-1.10% of base)
        -132 : 183222.dasm (-1.28% of base)
        -124 : 142840.dasm (-1.84% of base)
        -124 : 125406.dasm (-4.10% of base)
        -112 : 79296.dasm (-6.62% of base)
        -108 : 212959.dasm (-0.28% of base)
        -108 : 24036.dasm (-1.83% of base)
        -104 : 171845.dasm (-0.97% of base)
        -100 : 171140.dasm (-1.67% of base)
         -96 : 185966.dasm (-1.95% of base)
         -96 : 61339.dasm (-2.43% of base)
         -96 : 328200.dasm (-1.39% of base)
         -96 : 2110.dasm (-2.36% of base)

15978 total files with Code Size differences (15928 improved, 50 regressed), 19 unchanged.

Top method regressions (bytes):
          12 (12.50% of base) : 194924.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 333857.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 272505.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 317792.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 86055.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 140685.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 270627.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 188036.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 23759.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 295585.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 67007.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 129229.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 217323.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 277349.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 320474.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 325928.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 325995.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 916.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 213391.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 338116.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int

Top method improvements (bytes):
        -620 (-5.74% of base) : 140.dasm - System.Text.RegularExpressions.RegexInterpreter:Go():this
        -240 (-5.80% of base) : 213671.dasm - RegexTestNamespace.RegexRunnerTestClass:Go():this
        -204 (-0.99% of base) : 315021.dasm - System.Text.RegularExpressions.Generator.RegexGenerator:<EmitCompleteGo>g__EmitOneCode|11_2(System.String,byref)
        -180 (-3.15% of base) : 299530.dasm - System.Diagnostics.Metrics.Tests.MetricsTests:InstrumentPassingVariableTagsParametersTest(System.Diagnostics.Metrics.Instrument`1[Byte],System.Func`4[[System.Diagnostics.Metrics.Instrument`1[[System.Byte, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Diagnostics.DiagnosticSource, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51],[System.Byte, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Collections.Generic.KeyValuePair`2[[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Object, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]][], System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Byte, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]):this
        -156 (-1.68% of base) : 183391.dasm - System.Data.Tests.DataTableTest:ImportRowTest():this
        -152 (-1.44% of base) : 183223.dasm - System.Data.Tests.DataTableLoadRowTest:LoadRowTestOverwriteChanges():this
        -144 (-1.10% of base) : 183264.dasm - System.Data.Tests.DataTableReaderTest:TestSchemaTable():this
        -144 (-1.51% of base) : 62189.dasm - System.Text.Json.Tests.Utf8JsonWriterTests:WriteNumbers(bool,bool,System.String):this
        -132 (-1.28% of base) : 183222.dasm - System.Data.Tests.DataTableLoadRowTest:LoadRowTestUpsert():this
        -124 (-1.84% of base) : 142840.dasm - <Alpn_TestData>d__15:MoveNext():bool:this
        -124 (-4.10% of base) : 125406.dasm - Microsoft.Build.Evaluation.ExpressionShredder:GetReferencedItemNamesAndMetadata(System.String,int,int,byref,int)
        -112 (-6.62% of base) : 79296.dasm - Microsoft.CodeAnalysis.Collections.SegmentedDictionary`2[Double,Nullable`1][System.Double,System.Nullable`1[System.Int32]]:TryInsert(double,System.Nullable`1[Int32],ubyte):bool:this
        -108 (-1.83% of base) : 24036.dasm - <>c__DisplayClass20_0:<GetAsync_ManyDifferentResponseHeaders_ParsedCorrectly>b__1(System.Net.Test.Common.LoopbackServer):System.Threading.Tasks.Task:this
        -108 (-0.28% of base) : 212959.dasm - System.Numerics.Tests.Driver:RunTests()
        -104 (-0.97% of base) : 171845.dasm - Directory_ReparsePoints_MountVolume:runTest()
        -100 (-1.67% of base) : 171140.dasm - System.Security.Cryptography.Xml.Tests.KeyInfoTest:ImportKeyNode():this
         -96 (-2.36% of base) : 2110.dasm - DataContractSerializerTests:DCS_BasicPerSerializerRoundTripAndCompare_CollectionDataContract()
         -96 (-2.26% of base) : 92125.dasm - DataContractSerializerTests:DCS_BasicPerSerializerRoundTripAndCompare_CollectionDataContract()
         -96 (-1.95% of base) : 185966.dasm - System.ComponentModel.TypeConverterTests.FontConverterTest:ArgumentExceptionFontConverterData():Xunit.TheoryData`3[[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]
         -96 (-1.39% of base) : 328200.dasm - System.Runtime.InteropServices.RuntimeInformationTests.DescriptionNameTests:DumpRuntimeInformationToConsole():this

Top method regressions (percentages):
          12 (12.50% of base) : 194924.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 333857.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 272505.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 317792.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 86055.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 140685.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 270627.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 188036.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 23759.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 295585.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 67007.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 129229.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 217323.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 277349.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 320474.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 325928.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 325995.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 916.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 213391.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int
          12 (12.50% of base) : 338116.dasm - <PrivateImplementationDetails>:ComputeStringHash(System.String):int

Top method improvements (percentages):
         -12 (-12.00% of base) : 83001.dasm - Microsoft.CodeAnalysis.Formatting.FormattingExtensions:GetFirstNonWhitespaceIndexInString(System.String):int
         -12 (-12.00% of base) : 81780.dasm - Microsoft.CodeAnalysis.PatternMatching.PatternMatcher:ContainsSpaceOrAsterisk(System.String):bool
         -12 (-12.00% of base) : 81152.dasm - Microsoft.CodeAnalysis.Shared.Extensions.StringExtensions:ContainsLineBreak(System.String):bool
         -12 (-12.00% of base) : 138348.dasm - System.Net.Http.HttpResponseMessage:ContainsNewLineCharacter(System.String):bool:this
         -12 (-12.00% of base) : 137991.dasm - System.Net.HttpKnownHeaderNames:EqualsOrdinal(System.String,long,int):bool
         -12 (-12.00% of base) : 325114.dasm - System.Net.HttpKnownHeaderNames:EqualsOrdinal(System.String,long,int):bool
         -12 (-12.00% of base) : 246390.dasm - System.Net.Mime.MailBnfHelper:HasCROrLF(System.String):bool
          -4 (-10.00% of base) : 90689.dasm - DirectMemoryAccessStreamReader:.ctor(long,int):this
          -8 (-10.00% of base) : 210263.dasm - System.Data.SqlClient.SqlBuffer:Clear(System.Data.SqlClient.SqlBuffer[])
          -8 (-10.00% of base) : 179839.dasm - System.Data.SqlClient.SqlBuffer:Clear(System.Data.SqlClient.SqlBuffer[])
          -8 (-9.09% of base) : 84369.dasm - Microsoft.CodeAnalysis.Differencing.LongestCommonSubstring:ItemsEqual(System.String,int,System.String,int):bool:this
          -8 (-8.33% of base) : 84329.dasm - Microsoft.CodeAnalysis.Differencing.LongestCommonImmutableArraySubsequence`1[__Canon][System.__Canon]:ItemsEqual(System.Collections.Immutable.ImmutableArray`1[__Canon],int,System.Collections.Immutable.ImmutableArray`1[__Canon],int):bool:this
         -32 (-8.08% of base) : 125568.dasm - Microsoft.Build.Internal.Utilities:ContainsNoTagsOtherThanComments(System.String,int):bool
          -8 (-8.00% of base) : 229833.dasm - Microsoft.CodeAnalysis.VisualBasic.Extensions.SyntaxKindExtensions:Contains(Microsoft.CodeAnalysis.VisualBasic.SyntaxKind[],ushort):bool
          -8 (-8.00% of base) : 143.dasm - System.Text.RegularExpressions.RegexInterpreter:TrackPush(int):this
          -4 (-7.69% of base) : 140723.dasm - <>c:<TryGetHeaderName>b__85_0(System.Char[],int):ushort:this
          -8 (-7.69% of base) : 80002.dasm - Microsoft.CodeAnalysis.PooledObjects.ObjectPool`1[__Canon][System.__Canon]:FreeSlow(System.__Canon):this
          -8 (-7.69% of base) : 147699.dasm - Piles@527-4:Invoke(int,int):Microsoft.FSharp.Core.Unit:this
          -4 (-7.14% of base) : 142963.dasm - <>c:<VerifyEventCounters>b__4_11(System.Collections.Generic.KeyValuePair`2[[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Double[], System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]):double:this
          -4 (-7.14% of base) : 161646.dasm - <>c__1`1[Double][System.Double]:<ToArray>b__1_0(double,int,System.Double[]):System.Double[]:this

15978 total methods with Code Size differences (15928 improved, 50 regressed), 19 unchanged.


Author: EgorBo
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@kasperk81
Copy link
Contributor


has most regressions. is there anything special about this pattern which disagrees with bfiz optimization?

src/coreclr/jit/lower.cpp Outdated Show resolved Hide resolved
src/coreclr/jit/lower.cpp Outdated Show resolved Hide resolved
src/coreclr/jit/lower.cpp Outdated Show resolved Hide resolved
src/coreclr/jit/lower.cpp Outdated Show resolved Hide resolved
@EgorBo
Copy link
Member Author

EgorBo commented Oct 31, 2021

has most regressions. is there anything special about this pattern which disagrees with bfiz optimization?

@kasperk81 it's loop-alignment artifacts, e.g. https://www.diffchecker.com/La4x8Sgz

@EgorBo
Copy link
Member Author

EgorBo commented Oct 31, 2021

@SingleAccretion could you please take another look, I added smallint support (diffs are updated) and removed redundant checks.

src/coreclr/jit/lower.cpp Outdated Show resolved Hide resolved
src/coreclr/jit/lower.cpp Outdated Show resolved Hide resolved
src/coreclr/jit/lower.cpp Outdated Show resolved Hide resolved
src/coreclr/jit/lower.cpp Outdated Show resolved Hide resolved
src/coreclr/jit/codegenarmarch.cpp Outdated Show resolved Hide resolved
@EgorBo
Copy link
Member Author

EgorBo commented Nov 1, 2021

#61045 + #61035 combined:

using System.Collections.Generic;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;

public class Program
{
    static void Main(string[] args) =>
        BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(args);

    public IEnumerable<object[]> TestData()
    {
        yield return new object[] { new int[100], new int[100] };
        yield return new object[] { new int[1000], new int[1000] };
        yield return new object[] { new int[100000], new int[100000] };
    }


    [Benchmark]
    [ArgumentsSource(nameof(TestData))]
    public void CopyArray(int[] src, int[] dst)
    {
        for (int i = 0; i < src.Length; i++)
            dst[i] = src[i];
    }
}

Results on Apple M1 arm64:

|    Method |                   Toolchain |           src |           dst |         Mean |
|---------- |---------------------------- |-------------- |-------------- |-------------:|
| CopyArray | /Core_Root_BASELINE/corerun | Int32[100000] | Int32[100000] | 54,131.14 ns |
| CopyArray |     /Core_Root_EGOR/corerun | Int32[100000] | Int32[100000] | 36,413.37 ns | 33% faster

| CopyArray | /Core_Root_BASELINE/corerun |   Int32[1000] |   Int32[1000] |    483.82 ns |
| CopyArray |     /Core_Root_EGOR/corerun |   Int32[1000] |   Int32[1000] |    341.74 ns | 29% faster

| CopyArray | /Core_Root_BASELINE/corerun |    Int32[100] |    Int32[100] |     48.93 ns |
| CopyArray |     /Core_Root_EGOR/corerun |    Int32[100] |    Int32[100] |     34.09 ns | 31% faster

(tested with and without loop alignment)

codegen diff: https://www.diffchecker.com/pLkuGMn6 (yes, address calculation is still not perfect and is not hoisted, but I work on it)

Copy link
Contributor

@SingleAccretion SingleAccretion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me (modulo one note)!

src/coreclr/jit/lower.cpp Outdated Show resolved Hide resolved
@EgorBo
Copy link
Member Author

EgorBo commented Nov 2, 2021

@dotnet/jit-contrib PTAL, should be ready to review/merge

src/coreclr/jit/lower.cpp Show resolved Hide resolved
@EgorBo
Copy link
Member Author

EgorBo commented Nov 11, 2021

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants