Enable inlining of shared generics code within same type by jkotas · Pull Request #38229 · dotnet/runtime (original) (raw)

Might want to run a wider set of diffs

-f crossgen diffs:

Found 25 files with textual diffs.

Summary of Code Size diffs:
(Lower is better)

Total bytes of diff: 28141 (0.086% of base)
    diff is a regression.

Total byte diff includes -111 bytes from reconciling methods
        Base had    2 unique methods,      111 unique bytes
        Diff had    0 unique methods,        0 unique bytes

Top file regressions (bytes):
       12800 : System.Collections.Immutable.dasm (5.998% of base)
        5146 : System.Memory.dasm (6.358% of base)
        2738 : System.Private.CoreLib.dasm (0.083% of base)
        2735 : System.Collections.dasm (2.930% of base)
         714 : System.Collections.Concurrent.dasm (1.559% of base)
         587 : Microsoft.CodeAnalysis.dasm (0.078% of base)
         473 : System.Reflection.Metadata.dasm (0.147% of base)
         468 : System.Linq.dasm (0.353% of base)
         298 : System.Threading.Tasks.Dataflow.dasm (0.217% of base)
         282 : System.Linq.Expressions.dasm (0.010% of base)
         266 : System.ObjectModel.dasm (1.353% of base)
         202 : Microsoft.CSharp.dasm (0.062% of base)
         179 : System.DirectoryServices.AccountManagement.dasm (0.072% of base)
         171 : Microsoft.Diagnostics.Tracing.TraceEvent.dasm (0.005% of base)
         153 : Newtonsoft.Json.dasm (0.025% of base)
         138 : Microsoft.Extensions.Logging.Abstractions.dasm (0.565% of base)
         135 : Microsoft.Diagnostics.FastSerialization.dasm (0.401% of base)
         126 : System.Private.Xml.dasm (0.004% of base)
         116 : System.Linq.Parallel.dasm (0.020% of base)
         108 : Microsoft.CodeAnalysis.CSharp.dasm (0.005% of base)

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

Top method regressions (bytes):
         554 (45.975% of base) : System.Memory.dasm - ReadOnlySequence`1:TryGet(byref,byref,bool):bool:this (3 methods)
         543 (35.560% of base) : System.Memory.dasm - SequenceReader`1:TryReadTo(byref,__Canon,__Canon,bool):bool:this (2 methods)
         437 (108.168% of base) : System.Collections.Immutable.dasm - Builder:System.Collections.IEnumerable.GetEnumerator():IEnumerator:this (8 methods)
         422 (28.964% of base) : System.Memory.dasm - SequenceReader`1:TryReadToSlow(byref,__Canon,__Canon,int,bool):bool:this (2 methods)
         347 (10.534% of base) : System.Collections.Immutable.dasm - Enumerator:MoveNext():bool:this (15 methods)
         344 (148.276% of base) : System.Collections.Immutable.dasm - Node:System.Collections.IEnumerable.GetEnumerator():IEnumerator:this (4 methods)
         336 (13.925% of base) : System.Memory.dasm - ReadOnlySequence`1:Slice(long,long):ReadOnlySequence`1:this (3 methods)
         330 (23.827% of base) : System.Collections.Immutable.dasm - Enumerator:Reset():this (11 methods)
         323 (21.824% of base) : System.Collections.Immutable.dasm - Builder:AddRange(IEnumerable`1):this (6 methods)
         291 (31.699% of base) : System.Memory.dasm - ReadOnlySequence`1:Slice(long):ReadOnlySequence`1:this (3 methods)
         291 (41.044% of base) : System.Private.CoreLib.dasm - ValueTuple`3:System.IComparable.CompareTo(Object):int:this (3 methods)
         287 (38.013% of base) : System.Reflection.Metadata.dasm - SignatureDecoder`2:DecodeType(byref,bool,int):__Canon:this
         286 (54.476% of base) : System.Memory.dasm - ReadOnlySequence`1:get_FirstSpan():ReadOnlySpan`1:this (3 methods)
         281 (19.957% of base) : System.Memory.dasm - SequenceReader`1:TryReadTo(byref,ReadOnlySpan`1,bool):bool:this (2 methods)
         275 (158.046% of base) : System.Collections.Immutable.dasm - Node:System.Collections.Generic.IEnumerable<T>.GetEnumerator():IEnumerator`1:this (3 methods)
         268 (52.652% of base) : System.Memory.dasm - ReadOnlySequence`1:get_First():ReadOnlyMemory`1:this (3 methods)
         268 (41.358% of base) : System.Memory.dasm - ReadOnlySequence`1:GetPosition(long,SequencePosition):SequencePosition:this (3 methods)
         267 (41.654% of base) : System.Memory.dasm - ReadOnlySequence`1:GetPosition(long):SequencePosition:this (3 methods)
         266 (95.341% of base) : System.Collections.Immutable.dasm - Builder:System.Collections.Generic.IEnumerable<T>.GetEnumerator():IEnumerator`1:this (6 methods)
         265 (24.953% of base) : System.Collections.Immutable.dasm - Node:CopyTo(ref,int):this (3 methods)

Top method improvements (bytes):
        -169 (-26.365% of base) : System.Collections.Immutable.dasm - ImmutableArray`1:InsertRange(int,ImmutableArray`1):ImmutableArray`1:this (2 methods)
        -145 (-27.672% of base) : System.Collections.Immutable.dasm - Node:GetEnumerator():Enumerator:this (4 base, 3 diff methods)
         -94 (-14.506% of base) : System.Private.CoreLib.dasm - ReadOnlySpan`1:op_Implicit(ref):ReadOnlySpan`1 (18 methods)
         -82 (-100.000% of base) : System.Linq.Parallel.dasm - HashLookupValueList`2:CreatePair(__Canon,Pair`2):Pair`2 (1 base, 0 diff methods)
         -73 (-8.120% of base) : System.Private.CoreLib.dasm - Memory`1:Equals(Object):bool:this (4 methods)
         -59 (-62.105% of base) : System.Private.CoreLib.dasm - Vector128`1:get_DisplayString():String:this
         -59 (-62.105% of base) : System.Private.CoreLib.dasm - Vector256`1:get_DisplayString():String:this
         -59 (-62.105% of base) : System.Private.CoreLib.dasm - Vector64`1:get_DisplayString():String:this
         -56 (-29.474% of base) : System.Linq.Parallel.dasm - HashLookupValueList`2:Add(__Canon,int):bool:this
         -52 (-27.083% of base) : System.Linq.Parallel.dasm - HashLookupValueList`2:Add(__Canon,__Canon):bool:this
         -44 (-6.790% of base) : System.Private.CoreLib.dasm - Span`1:op_Implicit(ref):Span`1 (18 methods)
         -42 (-7.420% of base) : System.Collections.Immutable.dasm - ImmutableArray`1:RemoveAll(Predicate`1):ImmutableArray`1:this (2 methods)
         -32 (-46.377% of base) : System.Linq.Parallel.dasm - HashLookupValueList`2:.ctor(__Canon,int):this
         -29 (-100.000% of base) : System.Linq.Parallel.dasm - HashLookupValueList`2:CreatePair(__Canon,int):Pair`2 (1 base, 0 diff methods)
         -26 (-3.641% of base) : System.Private.CoreLib.dasm - ReadOnlySpan`1:op_Inequality(ReadOnlySpan`1,ReadOnlySpan`1):bool (18 methods)
         -26 (-3.641% of base) : System.Private.CoreLib.dasm - Span`1:op_Inequality(Span`1,Span`1):bool (18 methods)
         -22 (-31.884% of base) : System.Linq.Parallel.dasm - HashLookupValueList`2:.ctor(__Canon,__Canon):this
         -21 (-19.444% of base) : System.Linq.Parallel.dasm - OrderedGroupJoinHashLookup:CreateValuePair(GroupKeyData):Pair`2:this
         -19 (-11.515% of base) : Microsoft.CodeAnalysis.CSharp.dasm - SyntaxList`1:Any(ushort):bool:this
         -19 (-13.475% of base) : System.Linq.dasm - SparseArrayBuilder`1:Reserve(int):this

Top method regressions (percentages):
         126 (787.500% of base) : System.DirectoryServices.AccountManagement.dasm - TrackedCollection`1:System.Collections.IEnumerable.GetEnumerator():IEnumerator:this
          92 (575.000% of base) : System.Collections.Immutable.dasm - ImmutableList`1:System.Collections.Immutable.IImmutableList<T>.Remove(KeyValuePair`2,IEqualityComparer`1):IImmutableList`1:this
          63 (393.750% of base) : System.Collections.dasm - SortedList`2:get_Keys():IList`1:this
          63 (393.750% of base) : System.Collections.dasm - SortedList`2:System.Collections.Generic.IDictionary<TKey,TValue>.get_Keys():ICollection`1:this
          63 (393.750% of base) : System.Collections.dasm - SortedList`2:System.Collections.IDictionary.get_Keys():ICollection:this
          63 (393.750% of base) : System.Collections.dasm - SortedList`2:System.Collections.Generic.IReadOnlyDictionary<TKey,TValue>.get_Keys():IEnumerable`1:this
          63 (393.750% of base) : System.Collections.dasm - SortedList`2:get_Values():IList`1:this
          63 (393.750% of base) : System.Collections.dasm - SortedList`2:System.Collections.Generic.IDictionary<TKey,TValue>.get_Values():ICollection`1:this
          63 (393.750% of base) : System.Collections.dasm - SortedList`2:System.Collections.IDictionary.get_Values():ICollection:this
          63 (393.750% of base) : System.Collections.dasm - SortedList`2:System.Collections.Generic.IReadOnlyDictionary<TKey,TValue>.get_Values():IEnumerable`1:this
          62 (387.500% of base) : System.Collections.dasm - SortedDictionary`2:System.Collections.Generic.IDictionary<TKey,TValue>.get_Keys():ICollection`1:this
          62 (387.500% of base) : System.Collections.dasm - SortedDictionary`2:System.Collections.Generic.IReadOnlyDictionary<TKey,TValue>.get_Keys():IEnumerable`1:this
          62 (387.500% of base) : System.Collections.dasm - SortedDictionary`2:System.Collections.Generic.IDictionary<TKey,TValue>.get_Values():ICollection`1:this
          62 (387.500% of base) : System.Collections.dasm - SortedDictionary`2:System.Collections.Generic.IReadOnlyDictionary<TKey,TValue>.get_Values():IEnumerable`1:this
          62 (387.500% of base) : System.Collections.dasm - SortedDictionary`2:System.Collections.IDictionary.get_Keys():ICollection:this
          62 (387.500% of base) : System.Collections.dasm - SortedDictionary`2:System.Collections.IDictionary.get_Values():ICollection:this
          61 (381.250% of base) : Newtonsoft.Json.dasm - EnumerableDictionaryWrapper`2:System.Collections.IEnumerable.GetEnumerator():IEnumerator:this
          61 (381.250% of base) : System.Net.Http.dasm - HttpHeaderValueCollection`1:System.Collections.IEnumerable.GetEnumerator():IEnumerator:this
          60 (375.000% of base) : System.Collections.Immutable.dasm - ImmutableList`1:System.Collections.Immutable.IImmutableList<T>.Remove(__Canon,IEqualityComparer`1):IImmutableList`1:this
          60 (375.000% of base) : System.Collections.Immutable.dasm - ImmutableStack`1:System.Collections.Immutable.IImmutableStack<T>.Push(__Canon):IImmutableStack`1:this

Top method improvements (percentages):
         -82 (-100.000% of base) : System.Linq.Parallel.dasm - HashLookupValueList`2:CreatePair(__Canon,Pair`2):Pair`2 (1 base, 0 diff methods)
         -29 (-100.000% of base) : System.Linq.Parallel.dasm - HashLookupValueList`2:CreatePair(__Canon,int):Pair`2 (1 base, 0 diff methods)
         -59 (-62.105% of base) : System.Private.CoreLib.dasm - Vector128`1:get_DisplayString():String:this
         -59 (-62.105% of base) : System.Private.CoreLib.dasm - Vector256`1:get_DisplayString():String:this
         -59 (-62.105% of base) : System.Private.CoreLib.dasm - Vector64`1:get_DisplayString():String:this
         -32 (-46.377% of base) : System.Linq.Parallel.dasm - HashLookupValueList`2:.ctor(__Canon,int):this
         -22 (-31.884% of base) : System.Linq.Parallel.dasm - HashLookupValueList`2:.ctor(__Canon,__Canon):this
         -56 (-29.474% of base) : System.Linq.Parallel.dasm - HashLookupValueList`2:Add(__Canon,int):bool:this
        -145 (-27.672% of base) : System.Collections.Immutable.dasm - Node:GetEnumerator():Enumerator:this (4 base, 3 diff methods)
         -52 (-27.083% of base) : System.Linq.Parallel.dasm - HashLookupValueList`2:Add(__Canon,__Canon):bool:this
        -169 (-26.365% of base) : System.Collections.Immutable.dasm - ImmutableArray`1:InsertRange(int,ImmutableArray`1):ImmutableArray`1:this (2 methods)
         -21 (-19.444% of base) : System.Linq.Parallel.dasm - OrderedGroupJoinHashLookup:CreateValuePair(GroupKeyData):Pair`2:this
         -94 (-14.506% of base) : System.Private.CoreLib.dasm - ReadOnlySpan`1:op_Implicit(ref):ReadOnlySpan`1 (18 methods)
         -19 (-13.475% of base) : System.Linq.dasm - SparseArrayBuilder`1:Reserve(int):this
         -18 (-12.950% of base) : System.Collections.Immutable.dasm - ImmutableDictionary`2:TryGetValue(__Canon,byref):bool:this
         -18 (-12.950% of base) : System.Collections.Immutable.dasm - ImmutableDictionary`2:TryGetKey(__Canon,byref):bool:this
          -9 (-12.857% of base) : Microsoft.CodeAnalysis.VisualBasic.dasm - _Closure$__17`1:.cctor()
         -13 (-12.745% of base) : System.Collections.Immutable.dasm - ImmutableDictionary`2:Contains(KeyValuePair`2):bool:this
         -19 (-11.515% of base) : Microsoft.CodeAnalysis.CSharp.dasm - SyntaxList`1:Any(ushort):bool:this
         -13 (-10.484% of base) : System.Collections.Immutable.dasm - ImmutableDictionary`2:ContainsKey(__Canon):bool:this

406 total methods with Code Size differences (43 improved, 363 regressed), 186975 unchanged.