Skip to content

[JitDiff X64] [xtqqczze] Optimise bounds check in Replace.ReplaceComparer #1556

@MihuBot

Description

@MihuBot

Job completed in 16 minutes 35 seconds (remote runner delay: 44 seconds).
dotnet/runtime#119560

Diffs

Found 82 files with textual diffs.

Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 41766169
Total bytes of diff: 41764582
Total bytes of delta: -1587 (-0.00 % of base)
Total relative delta: -5.90
    diff is an improvement.
    relative diff is an improvement.


Top file improvements (bytes):
       -1587 : System.Private.CoreLib.dasm (-0.02 % of base)

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

Top method improvements (bytes):
        -149 (-39.31 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:<Replace>g__ReplaceDefaultComparer|176_0[System.__Canon](System.ReadOnlySpan`1[System.__Canon],System.Span`1[System.__Canon],System.__Canon,System.__Canon) (FullOpts)
        -129 (-29.79 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:<Replace>g__ReplaceComparer|176_1[System.__Canon](System.ReadOnlySpan`1[System.__Canon],System.Span`1[System.__Canon],System.__Canon,System.__Canon,System.Collections.Generic.IEqualityComparer`1[System.__Canon]) (FullOpts)
        -119 (-27.80 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:Replace[System.Nullable`1[int]](System.ReadOnlySpan`1[System.Nullable`1[int]],System.Span`1[System.Nullable`1[int]],System.Nullable`1[int],System.Nullable`1[int],System.Collections.Generic.IEqualityComparer`1[System.Nullable`1[int]]) (FullOpts)
        -116 (-44.44 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:<Replace>g__ReplaceDefaultComparer|176_0[System.Nullable`1[int]](System.ReadOnlySpan`1[System.Nullable`1[int]],System.Span`1[System.Nullable`1[int]],System.Nullable`1[int],System.Nullable`1[int]) (FullOpts)
        -111 (-31.81 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:<Replace>g__ReplaceComparer|176_1[System.Numerics.Vector`1[float]](System.ReadOnlySpan`1[System.Numerics.Vector`1[float]],System.Span`1[System.Numerics.Vector`1[float]],System.Numerics.Vector`1[float],System.Numerics.Vector`1[float],System.Collections.Generic.IEqualityComparer`1[System.Numerics.Vector`1[float]]) (FullOpts)
        -110 (-29.97 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:<Replace>g__ReplaceComparer|176_1[System.Nullable`1[int]](System.ReadOnlySpan`1[System.Nullable`1[int]],System.Span`1[System.Nullable`1[int]],System.Nullable`1[int],System.Nullable`1[int],System.Collections.Generic.IEqualityComparer`1[System.Nullable`1[int]]) (FullOpts)
        -108 (-31.12 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:<Replace>g__ReplaceComparer|176_1[short](System.ReadOnlySpan`1[short],System.Span`1[short],short,short,System.Collections.Generic.IEqualityComparer`1[short]) (FullOpts)
        -104 (-30.77 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:<Replace>g__ReplaceComparer|176_1[long](System.ReadOnlySpan`1[long],System.Span`1[long],long,long,System.Collections.Generic.IEqualityComparer`1[long]) (FullOpts)
         -99 (-29.73 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:<Replace>g__ReplaceComparer|176_1[int](System.ReadOnlySpan`1[int],System.Span`1[int],int,int,System.Collections.Generic.IEqualityComparer`1[int]) (FullOpts)
         -96 (-28.32 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:<Replace>g__ReplaceComparer|176_1[byte](System.ReadOnlySpan`1[byte],System.Span`1[byte],byte,byte,System.Collections.Generic.IEqualityComparer`1[byte]) (FullOpts)
         -91 (-28.00 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:<Replace>g__ReplaceComparer|176_1[double](System.ReadOnlySpan`1[double],System.Span`1[double],double,double,System.Collections.Generic.IEqualityComparer`1[double]) (FullOpts)
         -86 (-40.00 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:<Replace>g__ReplaceDefaultComparer|176_0[System.Numerics.Vector`1[float]](System.ReadOnlySpan`1[System.Numerics.Vector`1[float]],System.Span`1[System.Numerics.Vector`1[float]],System.Numerics.Vector`1[float],System.Numerics.Vector`1[float]) (FullOpts)
         -68 (-40.72 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:<Replace>g__ReplaceDefaultComparer|176_0[double](System.ReadOnlySpan`1[double],System.Span`1[double],double,double) (FullOpts)
         -49 (-41.18 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:<Replace>g__ReplaceDefaultComparer|176_0[byte](System.ReadOnlySpan`1[byte],System.Span`1[byte],byte,byte) (FullOpts)
         -46 (-39.66 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:<Replace>g__ReplaceDefaultComparer|176_0[short](System.ReadOnlySpan`1[short],System.Span`1[short],short,short) (FullOpts)
         -46 (-12.81 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:Replace[double](System.ReadOnlySpan`1[double],System.Span`1[double],double,double,System.Collections.Generic.IEqualityComparer`1[double]) (FullOpts)
         -30 (-32.26 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:<Replace>g__ReplaceDefaultComparer|176_0[int](System.ReadOnlySpan`1[int],System.Span`1[int],int,int) (FullOpts)
         -30 (-32.26 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:<Replace>g__ReplaceDefaultComparer|176_0[long](System.ReadOnlySpan`1[long],System.Span`1[long],long,long) (FullOpts)

Top method improvements (percentages):
        -116 (-44.44 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:<Replace>g__ReplaceDefaultComparer|176_0[System.Nullable`1[int]](System.ReadOnlySpan`1[System.Nullable`1[int]],System.Span`1[System.Nullable`1[int]],System.Nullable`1[int],System.Nullable`1[int]) (FullOpts)
         -49 (-41.18 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:<Replace>g__ReplaceDefaultComparer|176_0[byte](System.ReadOnlySpan`1[byte],System.Span`1[byte],byte,byte) (FullOpts)
         -68 (-40.72 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:<Replace>g__ReplaceDefaultComparer|176_0[double](System.ReadOnlySpan`1[double],System.Span`1[double],double,double) (FullOpts)
         -86 (-40.00 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:<Replace>g__ReplaceDefaultComparer|176_0[System.Numerics.Vector`1[float]](System.ReadOnlySpan`1[System.Numerics.Vector`1[float]],System.Span`1[System.Numerics.Vector`1[float]],System.Numerics.Vector`1[float],System.Numerics.Vector`1[float]) (FullOpts)
         -46 (-39.66 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:<Replace>g__ReplaceDefaultComparer|176_0[short](System.ReadOnlySpan`1[short],System.Span`1[short],short,short) (FullOpts)
        -149 (-39.31 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:<Replace>g__ReplaceDefaultComparer|176_0[System.__Canon](System.ReadOnlySpan`1[System.__Canon],System.Span`1[System.__Canon],System.__Canon,System.__Canon) (FullOpts)
         -30 (-32.26 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:<Replace>g__ReplaceDefaultComparer|176_0[int](System.ReadOnlySpan`1[int],System.Span`1[int],int,int) (FullOpts)
         -30 (-32.26 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:<Replace>g__ReplaceDefaultComparer|176_0[long](System.ReadOnlySpan`1[long],System.Span`1[long],long,long) (FullOpts)
        -111 (-31.81 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:<Replace>g__ReplaceComparer|176_1[System.Numerics.Vector`1[float]](System.ReadOnlySpan`1[System.Numerics.Vector`1[float]],System.Span`1[System.Numerics.Vector`1[float]],System.Numerics.Vector`1[float],System.Numerics.Vector`1[float],System.Collections.Generic.IEqualityComparer`1[System.Numerics.Vector`1[float]]) (FullOpts)
        -108 (-31.12 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:<Replace>g__ReplaceComparer|176_1[short](System.ReadOnlySpan`1[short],System.Span`1[short],short,short,System.Collections.Generic.IEqualityComparer`1[short]) (FullOpts)
        -104 (-30.77 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:<Replace>g__ReplaceComparer|176_1[long](System.ReadOnlySpan`1[long],System.Span`1[long],long,long,System.Collections.Generic.IEqualityComparer`1[long]) (FullOpts)
        -110 (-29.97 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:<Replace>g__ReplaceComparer|176_1[System.Nullable`1[int]](System.ReadOnlySpan`1[System.Nullable`1[int]],System.Span`1[System.Nullable`1[int]],System.Nullable`1[int],System.Nullable`1[int],System.Collections.Generic.IEqualityComparer`1[System.Nullable`1[int]]) (FullOpts)
        -129 (-29.79 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:<Replace>g__ReplaceComparer|176_1[System.__Canon](System.ReadOnlySpan`1[System.__Canon],System.Span`1[System.__Canon],System.__Canon,System.__Canon,System.Collections.Generic.IEqualityComparer`1[System.__Canon]) (FullOpts)
         -99 (-29.73 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:<Replace>g__ReplaceComparer|176_1[int](System.ReadOnlySpan`1[int],System.Span`1[int],int,int,System.Collections.Generic.IEqualityComparer`1[int]) (FullOpts)
         -96 (-28.32 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:<Replace>g__ReplaceComparer|176_1[byte](System.ReadOnlySpan`1[byte],System.Span`1[byte],byte,byte,System.Collections.Generic.IEqualityComparer`1[byte]) (FullOpts)
         -91 (-28.00 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:<Replace>g__ReplaceComparer|176_1[double](System.ReadOnlySpan`1[double],System.Span`1[double],double,double,System.Collections.Generic.IEqualityComparer`1[double]) (FullOpts)
        -119 (-27.80 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:Replace[System.Nullable`1[int]](System.ReadOnlySpan`1[System.Nullable`1[int]],System.Span`1[System.Nullable`1[int]],System.Nullable`1[int],System.Nullable`1[int],System.Collections.Generic.IEqualityComparer`1[System.Nullable`1[int]]) (FullOpts)
         -46 (-12.81 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:Replace[double](System.ReadOnlySpan`1[double],System.Span`1[double],double,double,System.Collections.Generic.IEqualityComparer`1[double]) (FullOpts)

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

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

Artifacts:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions