Skip to content

Faster unsigned division by constants #49585

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

Merged
11 commits merged into from
May 18, 2021
Merged

Faster unsigned division by constants #49585

11 commits merged into from
May 18, 2021

Conversation

pentp
Copy link
Contributor

@pentp pentp commented Mar 13, 2021

Improved magic number calculation based on "Faster Unsigned Division by Constants" by ridiculous_fish.
https://ridiculousfish.com/files/faster_unsigned_division_by_constants.pdf
https://github.com/ridiculousfish/libdivide/blob/master/doc/divide_by_constants_codegen_reference.c

Raw performance is 12-40% faster for "uncooperative" divisors and register pressure is also reduced.
DateTime.Year for example is 38% faster.

Perf stats on a i7-7700K CPU 4.20GHz:

Method Main PR Speedup
3 1.129 ns 1.113 ns 1.01
7 1.792 ns 1.113 ns 1.61
10 1.129 ns 1.112 ns 1.02
14 1.790 ns 1.113 ns 1.61
56 1.791 ns 1.112 ns 1.61
3ul 1.112 ns 1.112 ns
7ul 1.798 ns 1.595 ns 1.13
10ul 1.112 ns 1.112 ns
14ul 1.799 ns 1.336 ns 1.35
56ul 1.800 ns 1.112 ns 1.62
DateTime.Year 5.756 ns 3.599 ns 1.60

@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Mar 13, 2021
@danmoseley
Copy link
Member

@tannergooding

@tannergooding
Copy link
Member

Still a draft so I'm not going to review in depth yet. I'd definitely be interested in seeing some perf numbers and assembly diffs 😄

I'd also be interested in how this compares to say udiv.exe and sdiv.exe which AMD provides code listings for in their software optimization manual (https://www.amd.com/system/files/TechDocs/47414_15h_sw_opt_guide.pdf, 9.6 Derivation of Algorithm, Multiplier, and Shift
Factor for Integer Division by Constants). These programs are themselves based on Granlund, T.; Montgomery, P.L.: "Division by Invariant Integers using Multiplication." SIGPLAN Notices, Vol. 29, June 1994, page 61. and Magenheimer, D.J.; et al: "Integer Multiplication and Division on the HP Precision Architecture." IEEE Transactions on Computers, Vol. 37, No. 8, August 1988, page 980.

@GrabYourPitchforks
Copy link
Member

Somebody smarter than me needs to validate license information. There's license text at the top of https://github.com/ridiculousfish/libdivide/blob/master/doc/divide_by_constants_codegen_reference.c which does not match the license text within https://github.com/ridiculousfish/libdivide/blob/master/LICENSE.txt.

@pentp
Copy link
Contributor Author

pentp commented Mar 13, 2021

That should be the current implementation from dotnet/coreclr#10996 (at least the comments in code referenced the same paper by Torbjorn Granlund and Peter L. Montgomery).
There are some microbenchmark perf numbers in the linked PDF by ridiculous_fish (10-15% faster for "uncooperative" divisors), but in real code the gains could be even bigger because of reduced register pressure.

This is the first time I'm dealing with ARM assembly and I'm having trouble figuring out how to emit conditional mvnhs (clang does it somehow). Do I need to extend emitIns_R_R_COND to add support for this in Arm64 and create an entirely new emit method for A32?

@pentp
Copy link
Contributor Author

pentp commented Mar 13, 2021

Somebody smarter than me needs to validate license information. There's license text at the top of https://github.com/ridiculousfish/libdivide/blob/master/doc/divide_by_constants_codegen_reference.c which does not match the license text within https://github.com/ridiculousfish/libdivide/blob/master/LICENSE.txt.

The repo license is for the libdivide library. The codegen reference file from the 2011 paper is separate from that and in the public domain.

@pentp pentp marked this pull request as ready for review March 14, 2021 10:01
@pentp
Copy link
Contributor Author

pentp commented Mar 16, 2021

@tannergooding here are some diffs highlighting the change. I'll try to get a PMI diff also.

ASM diff for DateTime.GetDatePart (DateTime.Year)
        mov      rcx, 0xD1FFAB1E
        mov      rax, rdx
        mul      rdx:rax, rcx
        shr      rdx, 39
        mov      ecx, edx
-       mov      edx, 0xD1FFAB1E
        mov      eax, ecx
-       mul      edx:eax, edx
-       mov      r9d, edx
-       shr      r9d, 15
+       imul     r9, rax, 0xD1FFAB1E
+       shr      r9, 47
        imul     eax, r9d, 0x23AB1
        sub      ecx, eax
-       mov      edx, 0xD1FFAB1E
        mov      eax, ecx
-       mul      edx:eax, edx
+       shr      eax, 2
+       imul     r10, rax, 0xD1FFAB1E
+       shr      r10, 43
-       mov      r10d, ecx
-       sub      r10d, edx
-       shr      r10d, 1
-       add      r10d, edx
-       shr      r10d, 15
        cmp      r10d, 4
        jne      SHORT G_M19507_IG04
-						;; bbWeight=1    PerfScore 19.75
+						;; bbWeight=1    PerfScore 16.25
 G_M19507_IG03:
        mov      r10d, 3
 						;; bbWeight=0.50 PerfScore 0.13
 G_M19507_IG04:
        imul     eax, r10d, 0x8EAC
        sub      ecx, eax
-       mov      edx, 0xD1FFAB1E
        mov      eax, ecx
-       mul      edx:eax, edx
-       mov      r11d, edx
-       shr      r11d, 7
+       imul     r11, rax, 0xD1FFAB1E
+       shr      r11, 39
        imul     eax, r11d, 0x5B5
        sub      ecx, eax
-       mov      edx, 0xD1FFAB1E
-       mov      eax, ecx
-       mul      edx:eax, edx
+       mov      rdx, 0xD1FFAB1E
        mov      eax, ecx
-       sub      eax, edx
-       shr      eax, 1
-       add      edx, eax
-       shr      edx, 8
+       mul      rdx:rax, rdx
        cmp      edx, 4
        jne      SHORT G_M19507_IG06
-						;; bbWeight=1    PerfScore 15.25
+						;; bbWeight=1    PerfScore 12.00
 G_M19507_IG05:
        mov      edx, 3
 						;; bbWeight=0.50 PerfScore 0.13
 G_M19507_IG06:
        test     r8d, r8d
@@ -8869,11 +8813,11 @@
        cmp      eax, r9d
        jae      SHORT G_M19507_IG20
        movsxd   r10, eax
        cmp      dword ptr [rdx+4*r10+16], ecx
        ja       SHORT G_M19507_IG16
-       align    [0 bytes]
+       align    [10 bytes]
 						;; bbWeight=0.50 PerfScore 3.88
 G_M19507_IG15:
        inc      eax
        cmp      eax, r9d
        jae      SHORT G_M19507_IG20
@@ -8904,37 +8848,35 @@
 G_M19507_IG20:
        call     CORINFO_HELP_RNGCHKFAIL
        int3     
 						;; bbWeight=0    PerfScore 0.00
 
-; Total bytes of code 354, prolog size 7, PerfScore 110.65, instruction count 106, allocated bytes for code 354 (MethodHash=710eb3cc) for method DateTime:GetDatePart(int):int:this
+; Total bytes of code 344, prolog size 7, PerfScore 102.90, instruction count 93, allocated bytes for code 344 (MethodHash=710eb3cc) for method DateTime:GetDatePart(int):int:this

Diffs for UDIV by 3, 7, 14, 56 and 64-bit 7, 14, 56

; 3 (normal divisor; but can be improved by converting to 64bit MUL)
-       mov      edx, 0xD1FFAB1E
-       mov      eax, ecx
-       mul      edx:eax, edx
-       mov      eax, edx
-       shr      eax, 1
+       mov      eax, 0xD1FFAB1E
+       mov      edx, ecx
+       imul     rax, rdx
+       shr      rax, 33
-; Total bytes of code 14, prolog size 0, PerfScore 6.65, instruction count 6
+; Total bytes of code 16, prolog size 0, PerfScore 5.60, instruction count 5

; 7 (uncooperative divisor; after extending to 64bit becomes easy)
-       mov      edx, 0xD1FFAB1E
+       mov      rdx, 0xD1FFAB1E
        mov      eax, ecx
-       mul      edx:eax, edx
-       sub      ecx, edx
-       shr      ecx, 1
-       lea      eax, [rcx+rdx]
-       shr      eax, 2
+       mul      rdx:rax, rdx
+       mov      eax, edx
-; Total bytes of code 20, prolog size 0, PerfScore 8.25, instruction count 8
+; Total bytes of code 18, prolog size 0, PerfScore 6.55, instruction count 5
 
; 14 (needs multiple shifts; after extending to 64bit becomes easy)
-       mov      edx, 0xD1FFAB1E
+       mov      rdx, 0xD1FFAB1E
        mov      eax, ecx
-       mul      edx:eax, edx
-       sub      ecx, edx
-       shr      ecx, 1
-       lea      eax, [rcx+rdx]
-       shr      eax, 3
+       mul      rdx:rax, rdx
+       mov      eax, edx
-; Total bytes of code 20, prolog size 0, PerfScore 8.25, instruction count 8
+; Total bytes of code 18, prolog size 0, PerfScore 6.55, instruction count 5

; 56 (needs a pre-shift)
-       mov      edx, 0xD1FFAB1E
-       mov      eax, ecx
-       mul      edx:eax, edx
-       sub      ecx, edx
-       shr      ecx, 1
-       lea      eax, [rcx+rdx]
-       shr      eax, 5
+       shr      ecx, 3
+       imul     rax, rcx, 0xD1FFAB1E
+       shr      rax, 32
-; Total bytes of code 20, prolog size 0, PerfScore 8.25, instruction count 8
+; Total bytes of code 15, prolog size 0, PerfScore 5.50, instruction count 4

; 7ul (uncooperative divisor; but improves with saturating increment)
        mov      rdx, 0xD1FFAB1E
        mov      rax, rcx
+       add      rax, 1
+       sbb      rax, 0
        mul      rdx:rax, rdx
-       sub      rcx, rdx
-       shr      rcx, 1
-       lea      rax, [rcx+rdx]
+       mov      rax, rdx
        shr      rax, 2
-; Total bytes of code 31, prolog size 0, PerfScore 9.35, instruction count 8
+; Total bytes of code 32, prolog size 0, PerfScore 8.95, instruction count 8

; 14ul (needs multiple shifts)
        mov      rdx, 0xD1FFAB1E
        mov      rax, rcx
+       shr      rax, 1
        mul      rdx:rax, rdx
-       sub      rcx, rdx
-       shr      rcx, 1
-       lea      rax, [rcx+rdx]
-       shr      rax, 3
+       mov      rax, rdx
+       shr      rax, 1
-; Total bytes of code 31, prolog size 0, PerfScore 9.35, instruction count 8
+; Total bytes of code 26, prolog size 0, PerfScore 8.35, instruction count 7

; 56ul (needs a pre-shift)
        mov      rdx, 0xD1FFAB1E
        mov      rax, rcx
+       shr      rax, 3
        mul      rdx:rax, rdx
-       sub      rcx, rdx
-       shr      rcx, 1
-       lea      rax, [rcx+rdx]
-       shr      rax, 5
+       mov      rax, rdx
-; Total bytes of code 31, prolog size 0, PerfScore 9.35, instruction count 8
+; Total bytes of code 24, prolog size 0, PerfScore 7.65, instruction count 6

@EgorBo
Copy link
Member

EgorBo commented Mar 17, 2021

Nice work! Are there any jit-diffs?

E.g. via superpmi:

build.cmd Clr -c Checked
python src\coreclr\scripts\superpmi.py download
python src\coreclr\scripts\superpmi.py asmdiffs

I assume failures on CI are related

@pentp
Copy link
Contributor Author

pentp commented Mar 17, 2021

@EgorBo Is it expected that running these commands takes a day to run? So far it has downloaded 8 GBs of mch files and produced a couple of diff outputs:

aspnet.run.windows.x64.checked
Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 27456
Total bytes of diff: 27221
Total bytes of delta: -235 (-0,86% of base)
    diff is an improvement.


Top file regressions (bytes):
          13 : 38321.dasm (2,36% of base)
           8 : 34936.dasm (3,92% of base)
           7 : 34823.dasm (2,13% of base)
           7 : 12611.dasm (2,13% of base)
           7 : 32159.dasm (2,13% of base)
           5 : 20725.dasm (1,00% of base)
           5 : 38667.dasm (1,47% of base)
           4 : 38486.dasm (1,24% of base)
           4 : 4874.dasm (0,49% of base)
           4 : 23133.dasm (1,24% of base)
           3 : 13046.dasm (1,42% of base)
           2 : 34814.dasm (1,67% of base)
           2 : 3417.dasm (0,24% of base)
           1 : 32160.dasm (1,18% of base)
           1 : 37846.dasm (1,18% of base)
           1 : 12608.dasm (0,82% of base)
           1 : 23143.dasm (1,18% of base)
           1 : 12613.dasm (3,23% of base)
           1 : 12612.dasm (1,18% of base)
           1 : 34824.dasm (1,18% of base)

Top file improvements (bytes):
         -32 : 4862.dasm (-1,37% of base)
         -16 : 34935.dasm (-1,80% of base)
         -13 : 13044.dasm (-3,95% of base)
         -13 : 33598.dasm (-1,12% of base)
         -13 : 3359.dasm (-4,04% of base)
         -13 : 34797.dasm (-3,44% of base)
         -13 : 23723.dasm (-3,43% of base)
         -13 : 33600.dasm (-3,95% of base)
         -13 : 34834.dasm (-3,95% of base)
         -13 : 37886.dasm (-1,12% of base)
         -13 : 32508.dasm (-1,12% of base)
         -13 : 34939.dasm (-1,12% of base)
         -13 : 24516.dasm (-3,95% of base)
         -13 : 32510.dasm (-3,95% of base)
         -13 : 13042.dasm (-1,12% of base)
         -13 : 24514.dasm (-1,12% of base)
         -13 : 37891.dasm (-3,95% of base)
         -10 : 4599.dasm (-2,82% of base)
          -9 : 37574.dasm (-2,41% of base)
          -5 : 32065.dasm (-1,26% of base)

58 total files with Code Size differences (37 improved, 21 regressed), 3 unchanged.

Top method regressions (bytes):
          13 ( 2,36% of base) : 38321.dasm - System.DateTime:TryCreate(int,int,int,int,int,int,int,byref):bool
           8 ( 3,92% of base) : 34936.dasm - System.Buffers.Text.FormattingHelpers:WriteFourDecimalDigits(int,System.Span`1[Byte],int)
           7 ( 2,13% of base) : 34823.dasm - System.DateTime:CreateDateTimeFromSystemTime(byref,long):System.DateTime
           7 ( 2,13% of base) : 12611.dasm - System.DateTime:CreateDateTimeFromSystemTime(byref,long):System.DateTime
           7 ( 2,13% of base) : 32159.dasm - System.DateTime:CreateDateTimeFromSystemTime(byref,long):System.DateTime
           5 ( 1,00% of base) : 20725.dasm - System.DateTime:TryCreate(int,int,int,int,int,int,int,byref):bool
           5 ( 1,47% of base) : 38667.dasm - System.Number:UInt32ToDecStr(int):System.String
           4 ( 1,24% of base) : 38486.dasm - System.DateTime:CreateDateTimeFromSystemTime(byref,long):System.DateTime
           4 ( 0,49% of base) : 4874.dasm - System.DateTimeOffset:.ctor(int,int,int,int,int,int,System.TimeSpan):this
           4 ( 1,24% of base) : 23133.dasm - System.DateTime:CreateDateTimeFromSystemTime(byref,long):System.DateTime
           3 ( 1,42% of base) : 13046.dasm - System.DateTimeFormat:WriteFourDecimalDigits(int,System.Span`1[Char],int)
           2 ( 1,67% of base) : 34814.dasm - System.Buffers.Text.FormattingHelpers:WriteTwoDecimalDigits(int,System.Span`1[Byte],int)
           2 ( 0,24% of base) : 3417.dasm - System.Buffers.Text.Utf8Formatter:TryFormatDateTimeR(System.DateTime,System.Span`1[Byte],byref):bool
           1 ( 1,18% of base) : 32160.dasm - System.DateTime:IsLeapYear(int):bool
           1 ( 1,18% of base) : 37846.dasm - System.DateTime:IsLeapYear(int):bool
           1 ( 0,82% of base) : 12608.dasm - System.DateTimeFormat:WriteTwoDecimalDigits(int,System.Span`1[Char],int)
           1 ( 1,18% of base) : 23143.dasm - System.DateTime:IsLeapYear(int):bool
           1 ( 3,23% of base) : 12613.dasm - System.DateTime:DaysToYear(int):int
           1 ( 1,18% of base) : 12612.dasm - System.DateTime:IsLeapYear(int):bool
           1 ( 1,18% of base) : 34824.dasm - System.DateTime:IsLeapYear(int):bool

Top method improvements (bytes):
         -32 (-1,37% of base) : 4862.dasm - System.TimeZoneInfo:GetIsDaylightSavingsFromUtc(System.DateTime,int,System.TimeSpan,AdjustmentRule,System.Nullable`1[Int32],byref,System.TimeZoneInfo):bool
         -16 (-1,80% of base) : 34935.dasm - System.Buffers.Text.Utf8Formatter:TryFormatDateTimeR(System.DateTime,System.Span`1[Byte],byref):bool
         -13 (-3,95% of base) : 13044.dasm - System.DateTime:GetDate(byref,byref,byref):this
         -13 (-1,12% of base) : 33598.dasm - System.DateTimeFormat:TryFormatR(System.DateTime,System.TimeSpan,System.Span`1[Char],byref):bool
         -13 (-4,04% of base) : 3359.dasm - System.DateTime:GetDate(byref,byref,byref):this
         -13 (-3,44% of base) : 34797.dasm - System.Number:TryUInt32ToDecStr(int,int,System.Span`1[Char],byref):bool
         -13 (-3,43% of base) : 23723.dasm - System.Number:TryUInt32ToDecStr(int,int,System.Span`1[Char],byref):bool
         -13 (-3,95% of base) : 33600.dasm - System.DateTime:GetDate(byref,byref,byref):this
         -13 (-3,95% of base) : 34834.dasm - System.DateTime:GetDate(byref,byref,byref):this
         -13 (-1,12% of base) : 37886.dasm - System.DateTimeFormat:TryFormatR(System.DateTime,System.TimeSpan,System.Span`1[Char],byref):bool
         -13 (-1,12% of base) : 32508.dasm - System.DateTimeFormat:TryFormatR(System.DateTime,System.TimeSpan,System.Span`1[Char],byref):bool
         -13 (-1,12% of base) : 34939.dasm - System.DateTimeFormat:TryFormatR(System.DateTime,System.TimeSpan,System.Span`1[Char],byref):bool
         -13 (-3,95% of base) : 24516.dasm - System.DateTime:GetDate(byref,byref,byref):this
         -13 (-3,95% of base) : 32510.dasm - System.DateTime:GetDate(byref,byref,byref):this
         -13 (-1,12% of base) : 13042.dasm - System.DateTimeFormat:TryFormatR(System.DateTime,System.TimeSpan,System.Span`1[Char],byref):bool
         -13 (-1,12% of base) : 24514.dasm - System.DateTimeFormat:TryFormatR(System.DateTime,System.TimeSpan,System.Span`1[Char],byref):bool
         -13 (-3,95% of base) : 37891.dasm - System.DateTime:GetDate(byref,byref,byref):this
         -10 (-2,82% of base) : 4599.dasm - System.DateTime:GetDatePart(int):int:this
          -9 (-2,41% of base) : 37574.dasm - System.Number:TryUInt32ToDecStr(int,int,System.Span`1[Char],byref):bool
          -5 (-1,26% of base) : 32065.dasm - System.Number:TryUInt32ToDecStr(int,int,System.Span`1[Char],byref):bool

Top method regressions (percentages):
           8 ( 3,92% of base) : 34936.dasm - System.Buffers.Text.FormattingHelpers:WriteFourDecimalDigits(int,System.Span`1[Byte],int)
           1 ( 3,23% of base) : 12613.dasm - System.DateTime:DaysToYear(int):int
          13 ( 2,36% of base) : 38321.dasm - System.DateTime:TryCreate(int,int,int,int,int,int,int,byref):bool
           7 ( 2,13% of base) : 34823.dasm - System.DateTime:CreateDateTimeFromSystemTime(byref,long):System.DateTime
           7 ( 2,13% of base) : 12611.dasm - System.DateTime:CreateDateTimeFromSystemTime(byref,long):System.DateTime
           7 ( 2,13% of base) : 32159.dasm - System.DateTime:CreateDateTimeFromSystemTime(byref,long):System.DateTime
           1 ( 1,72% of base) : 4896.dasm - System.DateTime:get_Hour():int:this
           2 ( 1,67% of base) : 34814.dasm - System.Buffers.Text.FormattingHelpers:WriteTwoDecimalDigits(int,System.Span`1[Byte],int)
           5 ( 1,47% of base) : 38667.dasm - System.Number:UInt32ToDecStr(int):System.String
           3 ( 1,42% of base) : 13046.dasm - System.DateTimeFormat:WriteFourDecimalDigits(int,System.Span`1[Char],int)
           4 ( 1,24% of base) : 38486.dasm - System.DateTime:CreateDateTimeFromSystemTime(byref,long):System.DateTime
           4 ( 1,24% of base) : 23133.dasm - System.DateTime:CreateDateTimeFromSystemTime(byref,long):System.DateTime
           1 ( 1,18% of base) : 32160.dasm - System.DateTime:IsLeapYear(int):bool
           1 ( 1,18% of base) : 37846.dasm - System.DateTime:IsLeapYear(int):bool
           1 ( 1,18% of base) : 23143.dasm - System.DateTime:IsLeapYear(int):bool
           1 ( 1,18% of base) : 12612.dasm - System.DateTime:IsLeapYear(int):bool
           1 ( 1,18% of base) : 34824.dasm - System.DateTime:IsLeapYear(int):bool
           5 ( 1,00% of base) : 20725.dasm - System.DateTime:TryCreate(int,int,int,int,int,int,int,byref):bool
           1 ( 0,82% of base) : 12608.dasm - System.DateTimeFormat:WriteTwoDecimalDigits(int,System.Span`1[Char],int)
           4 ( 0,49% of base) : 4874.dasm - System.DateTimeOffset:.ctor(int,int,int,int,int,int,System.TimeSpan):this

Top method improvements (percentages):
          -5 (-7,35% of base) : 3360.dasm - System.DateTime:get_DayOfWeek():int:this
         -13 (-4,04% of base) : 3359.dasm - System.DateTime:GetDate(byref,byref,byref):this
         -13 (-3,95% of base) : 13044.dasm - System.DateTime:GetDate(byref,byref,byref):this
         -13 (-3,95% of base) : 33600.dasm - System.DateTime:GetDate(byref,byref,byref):this
         -13 (-3,95% of base) : 34834.dasm - System.DateTime:GetDate(byref,byref,byref):this
         -13 (-3,95% of base) : 24516.dasm - System.DateTime:GetDate(byref,byref,byref):this
         -13 (-3,95% of base) : 32510.dasm - System.DateTime:GetDate(byref,byref,byref):this
         -13 (-3,95% of base) : 37891.dasm - System.DateTime:GetDate(byref,byref,byref):this
          -4 (-3,60% of base) : 34798.dasm - System.Buffers.Text.FormattingHelpers:CountDigits(int):int
          -4 (-3,54% of base) : 22822.dasm - System.Buffers.Text.FormattingHelpers:CountDigits(int):int
          -2 (-3,45% of base) : 4682.dasm - System.Number:UInt32ToDecChars(long,int,int):long
         -13 (-3,44% of base) : 34797.dasm - System.Number:TryUInt32ToDecStr(int,int,System.Span`1[Char],byref):bool
         -13 (-3,43% of base) : 23723.dasm - System.Number:TryUInt32ToDecStr(int,int,System.Span`1[Char],byref):bool
          -4 (-3,01% of base) : 37575.dasm - System.Buffers.Text.FormattingHelpers:CountDigits(int):int
          -4 (-3,01% of base) : 32066.dasm - System.Buffers.Text.FormattingHelpers:CountDigits(int):int
         -10 (-2,82% of base) : 4599.dasm - System.DateTime:GetDatePart(int):int:this
          -9 (-2,41% of base) : 37574.dasm - System.Number:TryUInt32ToDecStr(int,int,System.Span`1[Char],byref):bool
         -16 (-1,80% of base) : 34935.dasm - System.Buffers.Text.Utf8Formatter:TryFormatDateTimeR(System.DateTime,System.Span`1[Byte],byref):bool
         -32 (-1,37% of base) : 4862.dasm - System.TimeZoneInfo:GetIsDaylightSavingsFromUtc(System.DateTime,int,System.TimeSpan,AdjustmentRule,System.Nullable`1[Int32],byref,System.TimeZoneInfo):bool
          -5 (-1,26% of base) : 32065.dasm - System.Number:TryUInt32ToDecStr(int,int,System.Span`1[Char],byref):bool

58 total methods with Code Size differences (37 improved, 21 regressed), 3 unchanged.
benchmarks.run.windows.x64.checked
Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 145433
Total bytes of diff: 145683
Total bytes of delta: 250 (0,17% of base)
    diff is a regression.


Top file regressions (bytes):
         164 : 16123.dasm (0,60% of base)
          96 : 3058.dasm (3,24% of base)
          93 : 15474.dasm (0,32% of base)
          80 : 13630.dasm (0,36% of base)
          65 : 23693.dasm (0,39% of base)
          25 : 9386.dasm (5,83% of base)
          12 : 10184.dasm (0,27% of base)
           7 : 26070.dasm (2,11% of base)
           6 : 25187.dasm (0,35% of base)
           5 : 22034.dasm (0,12% of base)
           3 : 9385.dasm (0,21% of base)
           3 : 14625.dasm (0,49% of base)
           2 : 2008.dasm (0,45% of base)
           2 : 738.dasm (0,60% of base)
           2 : 25186.dasm (0,54% of base)
           2 : 9031.dasm (0,09% of base)
           1 : 5080.dasm (1,72% of base)
           1 : 14009.dasm (0,20% of base)

Top file improvements (bytes):
         -50 : 21861.dasm (-2,07% of base)
         -32 : 5075.dasm (-7,77% of base)
         -32 : 4349.dasm (-2,34% of base)
         -27 : 26607.dasm (-3,66% of base)
         -20 : 6752.dasm (-9,13% of base)
         -19 : 14909.dasm (-4,03% of base)
         -14 : 11854.dasm (-10,29% of base)
         -14 : 25789.dasm (-0,77% of base)
         -13 : 6519.dasm (-14,94% of base)
         -13 : 2009.dasm (-4,04% of base)
         -13 : 1993.dasm (-3,71% of base)
         -13 : 873.dasm (-1,37% of base)
         -12 : 14174.dasm (-2,91% of base)
          -8 : 22558.dasm (-0,90% of base)
          -7 : 6716.dasm (-5,69% of base)
          -6 : 21660.dasm (-0,55% of base)
          -5 : 12923.dasm (-7,35% of base)
          -4 : 23155.dasm (-1,42% of base)
          -4 : 1065.dasm (-1,70% of base)
          -3 : 15475.dasm (-1,35% of base)

45 total files with Code Size differences (27 improved, 18 regressed), 6 unchanged.

Top method regressions (bytes):
         164 ( 0,60% of base) : 16123.dasm - DynamicClass:_DynamicMethod0(System.IO.TextWriter,MicroBenchmarks.Serializers.MyEventsListerItem,int)
          96 ( 3,24% of base) : 3058.dasm - System.Globalization.TimeSpanFormat:TryFormatStandard(System.TimeSpan,int,System.String,System.Span`1[Char],byref):bool
          93 ( 0,32% of base) : 15474.dasm - DynamicClass:_DynamicMethod0(byref,MicroBenchmarks.Serializers.MyEventsListerItem,int)
          80 ( 0,36% of base) : 13630.dasm - DynamicClass:_DynamicMethod0(byref,MicroBenchmarks.Serializers.IndexViewModel,int)
          65 ( 0,39% of base) : 23693.dasm - DynamicClass:_DynamicMethod0(System.IO.TextWriter,MicroBenchmarks.Serializers.IndexViewModel,int)
          25 ( 5,83% of base) : 9386.dasm - System.Text.Json.JsonWriterHelper:TrimDateTimeOffset(System.Span`1[Byte],byref)
          12 ( 0,27% of base) : 10184.dasm - DynamicClass:_DynamicMethod0(System.IO.TextWriter,MicroBenchmarks.Serializers.CollectionsOfPrimitives,int)
           7 ( 2,11% of base) : 26070.dasm - System.Globalization.EraInfo:.ctor(int,int,int,int,int,int,int,System.String,System.String,System.String):this
           6 ( 0,35% of base) : 25187.dasm - System.Xml.Schema.XsdDateTime:op_Implicit(System.Xml.Schema.XsdDateTime):System.DateTime
           5 ( 0,12% of base) : 22034.dasm - Utf8Json.Formatters.ISO8601DateTimeFormatter:Deserialize(byref,Utf8Json.IJsonFormatterResolver):System.DateTime:this
           3 ( 0,21% of base) : 9385.dasm - System.Buffers.Text.Utf8Formatter:TryFormatDateTimeO(System.DateTime,System.TimeSpan,System.Span`1[Byte],byref):bool
           3 ( 0,49% of base) : 14625.dasm - System.DateTime:TryCreate(int,int,int,int,int,int,int,byref):bool
           2 ( 0,45% of base) : 2008.dasm - System.DateTime:AddYears(int):System.DateTime:this
           2 ( 0,60% of base) : 738.dasm - System.Number:UInt32ToDecStr(int):System.String
           2 ( 0,54% of base) : 25186.dasm - System.Xml.Schema.XsdDateTime:InitiateXsdDateTime(Parser):this
           2 ( 0,09% of base) : 9031.dasm - System.TimeZoneInfo:TryCreateAdjustmentRules(System.String,byref,byref,byref,int):bool
           1 ( 1,72% of base) : 5080.dasm - System.DateTime:get_Hour():int:this
           1 ( 0,20% of base) : 14009.dasm - System.Text.Json.JsonHelpers:TryCreateDateTime(DateTimeParseData,int,byref):bool

Top method improvements (bytes):
         -50 (-2,07% of base) : 21861.dasm - System.Numerics.BigNumber:FormatBigInteger(bool,System.Numerics.BigInteger,System.String,System.ReadOnlySpan`1[Char],System.Globalization.NumberFormatInfo,System.Span`1[Char],byref,byref):System.String
         -32 (-7,77% of base) : 5075.dasm - System.DateTime:GetDatePart(int):int:this
         -32 (-2,34% of base) : 4349.dasm - Grisu3:TryDigitGenShortest(byref,byref,byref,System.Span`1[Byte],byref,byref):bool
         -27 (-3,66% of base) : 26607.dasm - DecCalc:InternalRound(byref,int,int)
         -20 (-9,13% of base) : 6752.dasm - Newtonsoft.Json.JsonTextWriter:WriteNumberToBuffer(int,bool):int:this
         -19 (-4,03% of base) : 14909.dasm - System.DateTime:.ctor(int,int,int,int,int,int,int,int):this
         -14 (-10,29% of base) : 11854.dasm - DecCalc:DecDivMod1E9(byref):int
         -14 (-0,77% of base) : 25789.dasm - DecCalc:VarDecDiv(byref,byref)
         -13 (-14,94% of base) : 6519.dasm - System.Number:Int64DivMod1E9(byref):int
         -13 (-4,04% of base) : 2009.dasm - System.DateTime:GetDate(byref,byref,byref):this
         -13 (-3,71% of base) : 1993.dasm - System.DateTime:.ctor(int,int,int,int,int,int,int):this
         -13 (-1,37% of base) : 873.dasm - Grisu3:TryDigitGenCounted(byref,int,System.Span`1[Byte],byref,byref):bool
         -12 (-2,91% of base) : 14174.dasm - Newtonsoft.Json.Utilities.DateTimeUtils:CreateDateTime(Newtonsoft.Json.Utilities.DateTimeParser):System.DateTime
          -8 (-0,90% of base) : 22558.dasm - DecCalc:VarDecFromR8(double,byref)
          -7 (-5,69% of base) : 6716.dasm - System.DateTime:DaysInMonth(int,int):int
          -6 (-0,55% of base) : 21660.dasm - System.Buffers.Text.Utf8Formatter:TryFormatDateTimeG(System.DateTime,System.TimeSpan,System.Span`1[Byte],byref):bool
          -5 (-7,35% of base) : 12923.dasm - System.DateTime:get_DayOfWeek():int:this
          -4 (-1,42% of base) : 23155.dasm - System.Number:UInt32ToDecStr(int,int):System.String
          -4 (-1,70% of base) : 1065.dasm - System.DateTime:.ctor(int,int,int):this
          -3 (-1,35% of base) : 15475.dasm - System.DateTime:DateToTicks(int,int,int):long

Top method regressions (percentages):
          25 ( 5,83% of base) : 9386.dasm - System.Text.Json.JsonWriterHelper:TrimDateTimeOffset(System.Span`1[Byte],byref)
          96 ( 3,24% of base) : 3058.dasm - System.Globalization.TimeSpanFormat:TryFormatStandard(System.TimeSpan,int,System.String,System.Span`1[Char],byref):bool
           7 ( 2,11% of base) : 26070.dasm - System.Globalization.EraInfo:.ctor(int,int,int,int,int,int,int,System.String,System.String,System.String):this
           1 ( 1,72% of base) : 5080.dasm - System.DateTime:get_Hour():int:this
         164 ( 0,60% of base) : 16123.dasm - DynamicClass:_DynamicMethod0(System.IO.TextWriter,MicroBenchmarks.Serializers.MyEventsListerItem,int)
           2 ( 0,60% of base) : 738.dasm - System.Number:UInt32ToDecStr(int):System.String
           2 ( 0,54% of base) : 25186.dasm - System.Xml.Schema.XsdDateTime:InitiateXsdDateTime(Parser):this
           3 ( 0,49% of base) : 14625.dasm - System.DateTime:TryCreate(int,int,int,int,int,int,int,byref):bool
           2 ( 0,45% of base) : 2008.dasm - System.DateTime:AddYears(int):System.DateTime:this
          65 ( 0,39% of base) : 23693.dasm - DynamicClass:_DynamicMethod0(System.IO.TextWriter,MicroBenchmarks.Serializers.IndexViewModel,int)
          80 ( 0,36% of base) : 13630.dasm - DynamicClass:_DynamicMethod0(byref,MicroBenchmarks.Serializers.IndexViewModel,int)
           6 ( 0,35% of base) : 25187.dasm - System.Xml.Schema.XsdDateTime:op_Implicit(System.Xml.Schema.XsdDateTime):System.DateTime
          93 ( 0,32% of base) : 15474.dasm - DynamicClass:_DynamicMethod0(byref,MicroBenchmarks.Serializers.MyEventsListerItem,int)
          12 ( 0,27% of base) : 10184.dasm - DynamicClass:_DynamicMethod0(System.IO.TextWriter,MicroBenchmarks.Serializers.CollectionsOfPrimitives,int)
           3 ( 0,21% of base) : 9385.dasm - System.Buffers.Text.Utf8Formatter:TryFormatDateTimeO(System.DateTime,System.TimeSpan,System.Span`1[Byte],byref):bool
           1 ( 0,20% of base) : 14009.dasm - System.Text.Json.JsonHelpers:TryCreateDateTime(DateTimeParseData,int,byref):bool
           5 ( 0,12% of base) : 22034.dasm - Utf8Json.Formatters.ISO8601DateTimeFormatter:Deserialize(byref,Utf8Json.IJsonFormatterResolver):System.DateTime:this
           2 ( 0,09% of base) : 9031.dasm - System.TimeZoneInfo:TryCreateAdjustmentRules(System.String,byref,byref,byref,int):bool

Top method improvements (percentages):
         -13 (-14,94% of base) : 6519.dasm - System.Number:Int64DivMod1E9(byref):int
         -14 (-10,29% of base) : 11854.dasm - DecCalc:DecDivMod1E9(byref):int
         -20 (-9,13% of base) : 6752.dasm - Newtonsoft.Json.JsonTextWriter:WriteNumberToBuffer(int,bool):int:this
         -32 (-7,77% of base) : 5075.dasm - System.DateTime:GetDatePart(int):int:this
          -5 (-7,35% of base) : 12923.dasm - System.DateTime:get_DayOfWeek():int:this
          -7 (-5,69% of base) : 6716.dasm - System.DateTime:DaysInMonth(int,int):int
         -13 (-4,04% of base) : 2009.dasm - System.DateTime:GetDate(byref,byref,byref):this
         -19 (-4,03% of base) : 14909.dasm - System.DateTime:.ctor(int,int,int,int,int,int,int,int):this
         -13 (-3,71% of base) : 1993.dasm - System.DateTime:.ctor(int,int,int,int,int,int,int):this
         -27 (-3,66% of base) : 26607.dasm - DecCalc:InternalRound(byref,int,int)
          -2 (-3,57% of base) : 11855.dasm - System.Number:UInt32ToDecChars(long,int,int):long
          -2 (-3,45% of base) : 967.dasm - System.Number:UInt32ToDecChars(long,int,int):long
         -12 (-2,91% of base) : 14174.dasm - Newtonsoft.Json.Utilities.DateTimeUtils:CreateDateTime(Newtonsoft.Json.Utilities.DateTimeParser):System.DateTime
         -32 (-2,34% of base) : 4349.dasm - Grisu3:TryDigitGenShortest(byref,byref,byref,System.Span`1[Byte],byref,byref):bool
         -50 (-2,07% of base) : 21861.dasm - System.Numerics.BigNumber:FormatBigInteger(bool,System.Numerics.BigInteger,System.String,System.ReadOnlySpan`1[Char],System.Globalization.NumberFormatInfo,System.Span`1[Char],byref,byref):System.String
          -4 (-1,70% of base) : 1065.dasm - System.DateTime:.ctor(int,int,int):this
          -4 (-1,42% of base) : 23155.dasm - System.Number:UInt32ToDecStr(int,int):System.String
         -13 (-1,37% of base) : 873.dasm - Grisu3:TryDigitGenCounted(byref,int,System.Span`1[Byte],byref,byref):bool
          -3 (-1,35% of base) : 15475.dasm - System.DateTime:DateToTicks(int,int,int):long
          -8 (-0,90% of base) : 22558.dasm - DecCalc:VarDecFromR8(double,byref)

45 total methods with Code Size differences (27 improved, 18 regressed), 6 unchanged.
libraries.crossgen.windows.x64.checked
Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 53429
Total bytes of diff: 53186
Total bytes of delta: -243 (-0,45% of base)
    diff is an improvement.


Top file regressions (bytes):
         110 : 15750.dasm (4,25% of base)
          12 : 15718.dasm (1,11% of base)
          11 : 10325.dasm (1,03% of base)
           8 : 12977.dasm (0,60% of base)
           8 : 171680.dasm (1,72% of base)
           7 : 7843.dasm (0,88% of base)
           7 : 14999.dasm (1,13% of base)
           5 : 79999.dasm (0,44% of base)
           4 : 15711.dasm (2,04% of base)
           3 : 76002.dasm (0,54% of base)
           3 : 10061.dasm (0,36% of base)
           3 : 10327.dasm (1,50% of base)
           3 : 9922.dasm (0,61% of base)
           2 : 9945.dasm (0,88% of base)
           2 : 15035.dasm (0,57% of base)
           2 : 15499.dasm (0,43% of base)
           2 : 15530.dasm (0,82% of base)
           2 : 14894.dasm (0,42% of base)
           2 : 15712.dasm (1,68% of base)
           2 : 9920.dasm (0,83% of base)

Top file improvements (bytes):
         -65 : 162619.dasm (-2,70% of base)
         -45 : 7833.dasm (-3,21% of base)
         -32 : 12980.dasm (-1,32% of base)
         -29 : 7851.dasm (-4,04% of base)
         -27 : 11254.dasm (-1,98% of base)
         -22 : 9962.dasm (-6,08% of base)
         -21 : 7847.dasm (-3,94% of base)
         -19 : 13008.dasm (-0,83% of base)
         -18 : 9963.dasm (-5,42% of base)
         -15 : 7828.dasm (-3,46% of base)
         -14 : 7848.dasm (-0,79% of base)
         -14 : 69369.dasm (-7,14% of base)
         -14 : 7852.dasm (-10,29% of base)
         -13 : 11133.dasm (-14,94% of base)
         -13 : 94820.dasm (-1,84% of base)
         -11 : 95219.dasm (-0,45% of base)
         -10 : 10324.dasm (-0,68% of base)
         -10 : 154370.dasm (-6,49% of base)
          -8 : 7844.dasm (-0,94% of base)
          -8 : 9974.dasm (-9,52% of base)

82 total files with Code Size differences (40 improved, 42 regressed), 6 unchanged.

Top method regressions (bytes):
         110 ( 4,25% of base) : 15750.dasm - System.Buffers.Text.Utf8Formatter:TryFormat(System.TimeSpan,System.Span`1[Byte],byref,System.Buffers.StandardFormat):bool
          12 ( 1,11% of base) : 15718.dasm - System.Buffers.Text.Utf8Formatter:TryFormatDateTimeG(System.DateTime,System.TimeSpan,System.Span`1[Byte],byref):bool
          11 ( 1,03% of base) : 10325.dasm - System.DateTimeFormat:TryFormatR(System.DateTime,System.TimeSpan,System.Span`1[Char],byref):bool
           8 ( 0,60% of base) : 12977.dasm - System.TimeZoneInfo:GetIsDaylightSavings(System.DateTime,AdjustmentRule,System.Globalization.DaylightTimeStruct):bool
           8 ( 1,72% of base) : 171680.dasm - System.Text.Json.JsonWriterHelper:TrimDateTimeOffset(System.Span`1[Byte],byref)
           7 ( 0,88% of base) : 7843.dasm - DecCalc:VarDecFromR4(float,byref)
           7 ( 1,13% of base) : 14999.dasm - System.Globalization.ISOWeek:ToDateTime(int,int,int):System.DateTime
           5 ( 0,44% of base) : 79999.dasm - System.Net.Http.HttpWindowsProxy:.ctor(System.Net.Http.WinInetProxyHelper,SafeWinHttpHandle):this
           4 ( 2,04% of base) : 15711.dasm - System.Buffers.Text.FormattingHelpers:WriteFourDecimalDigits(int,System.Span`1[Byte],int)
           3 ( 0,54% of base) : 76002.dasm - System.Data.SqlTypes.SqlDecimal:Round(System.Data.SqlTypes.SqlDecimal,int,bool):System.Data.SqlTypes.SqlDecimal
           3 ( 0,36% of base) : 10061.dasm - System.DateTimeOffset:.ctor(int,int,int,int,int,int,System.TimeSpan):this
           3 ( 1,50% of base) : 10327.dasm - System.DateTimeFormat:WriteFourDecimalDigits(int,System.Span`1[Char],int)
           3 ( 0,61% of base) : 9922.dasm - System.DateTime:.ctor(int,int,int,int,int,int,int):this
           2 ( 0,88% of base) : 9945.dasm - System.DateTime:DateToTicks(int,int,int):long
           2 ( 0,57% of base) : 15035.dasm - System.Globalization.JapaneseCalendar:GetJapaneseEraStartDate(int,byref):bool
           2 ( 0,43% of base) : 15499.dasm - System.Globalization.UmAlQuraCalendar:InitDateMapping():System.Globalization.UmAlQuraCalendar+DateMapping[]
           2 ( 0,82% of base) : 15530.dasm - DateMapping:.ctor(int,int,int,int):this
           2 ( 0,42% of base) : 14894.dasm - System.Globalization.HebrewCalendar:HebrewToGregorian(int,int,int,int,int,int,int):System.DateTime
           2 ( 1,68% of base) : 15712.dasm - System.Buffers.Text.FormattingHelpers:WriteTwoDecimalDigits(int,System.Span`1[Byte],int)
           2 ( 0,83% of base) : 9920.dasm - System.DateTime:.ctor(int,int,int):this

Top method improvements (bytes):
         -65 (-2,70% of base) : 162619.dasm - System.Numerics.BigNumber:FormatBigInteger(bool,System.Numerics.BigInteger,System.String,System.ReadOnlySpan`1[Char],System.Globalization.NumberFormatInfo,System.Span`1[Char],byref,byref):System.String
         -45 (-3,21% of base) : 7833.dasm - DecCalc:ScaleResult(long,int,int):int
         -32 (-1,32% of base) : 12980.dasm - System.TimeZoneInfo:GetIsDaylightSavingsFromUtc(System.DateTime,int,System.TimeSpan,AdjustmentRule,System.Nullable`1[Int32],byref,System.TimeZoneInfo):bool
         -29 (-4,04% of base) : 7851.dasm - DecCalc:InternalRound(byref,int,int)
         -27 (-1,98% of base) : 11254.dasm - Grisu3:TryDigitGenShortest(byref,byref,byref,System.Span`1[Byte],byref,byref):bool
         -22 (-6,08% of base) : 9962.dasm - System.DateTime:GetDatePart(int):int:this
         -21 (-3,94% of base) : 7847.dasm - DecCalc:GetHashCode(byref):int
         -19 (-0,83% of base) : 13008.dasm - System.TimeZoneInfo:TryCreateAdjustmentRules(System.String,byref,byref,byref,int):bool
         -18 (-5,42% of base) : 9963.dasm - System.DateTime:GetDate(byref,byref,byref):this
         -15 (-3,46% of base) : 7828.dasm - DecCalc:Unscale(byref,byref,byref)
         -14 (-0,79% of base) : 7848.dasm - DecCalc:VarDecDiv(byref,byref)
         -14 (-7,14% of base) : 69369.dasm - Newtonsoft.Json.JsonTextWriter:WriteNumberToBuffer(int,bool):int:this
         -14 (-10,29% of base) : 7852.dasm - DecCalc:DecDivMod1E9(byref):int
         -13 (-14,94% of base) : 11133.dasm - System.Number:Int64DivMod1E9(byref):int
         -13 (-1,84% of base) : 94820.dasm - System.Xml.Schema.XsdDuration:TryToTimeSpan(int,byref):System.Exception:this
         -11 (-0,45% of base) : 95219.dasm - BigNumber:DblToRgbFast(double,System.Byte[],byref,byref):bool
         -10 (-0,68% of base) : 10324.dasm - System.DateTimeFormat:TryFormatO(System.DateTime,System.TimeSpan,System.Span`1[Char],byref):bool
         -10 (-6,49% of base) : 154370.dasm - System.Net.Sockets.IOControlKeepAlive:Get(System.Net.Sockets.SafeSocketHandle,int):int
          -8 (-0,94% of base) : 7844.dasm - DecCalc:VarDecFromR8(double,byref)
          -8 (-9,52% of base) : 9974.dasm - System.DateTime:get_Millisecond():int:this

Top method regressions (percentages):
         110 ( 4,25% of base) : 15750.dasm - System.Buffers.Text.Utf8Formatter:TryFormat(System.TimeSpan,System.Span`1[Byte],byref,System.Buffers.StandardFormat):bool
           1 ( 3,23% of base) : 9946.dasm - System.DateTime:DaysToYear(int):int
           4 ( 2,04% of base) : 15711.dasm - System.Buffers.Text.FormattingHelpers:WriteFourDecimalDigits(int,System.Span`1[Byte],int)
           1 ( 1,72% of base) : 9971.dasm - System.DateTime:get_Hour():int:this
           8 ( 1,72% of base) : 171680.dasm - System.Text.Json.JsonWriterHelper:TrimDateTimeOffset(System.Span`1[Byte],byref)
           2 ( 1,68% of base) : 15712.dasm - System.Buffers.Text.FormattingHelpers:WriteTwoDecimalDigits(int,System.Span`1[Byte],int)
           2 ( 1,63% of base) : 15710.dasm - System.Buffers.Text.FormattingHelpers:WriteDigits(int,System.Span`1[Byte])
           3 ( 1,50% of base) : 10327.dasm - System.DateTimeFormat:WriteFourDecimalDigits(int,System.Span`1[Char],int)
           1 ( 1,32% of base) : 162379.dasm - Number:Int32ToDecChars(long,byref,int,int)
           1 ( 1,16% of base) : 9983.dasm - System.DateTime:IsLeapYear(int):bool
           7 ( 1,13% of base) : 14999.dasm - System.Globalization.ISOWeek:ToDateTime(int,int,int):System.DateTime
          12 ( 1,11% of base) : 15718.dasm - System.Buffers.Text.Utf8Formatter:TryFormatDateTimeG(System.DateTime,System.TimeSpan,System.Span`1[Byte],byref):bool
          11 ( 1,03% of base) : 10325.dasm - System.DateTimeFormat:TryFormatR(System.DateTime,System.TimeSpan,System.Span`1[Char],byref):bool
           1 ( 0,97% of base) : 15425.dasm - System.Globalization.TimeSpanFormat:WriteTwoDigits(int,System.Span`1[Char])
           2 ( 0,95% of base) : 14133.dasm - System.Globalization.CalendricalCalculationsHelper:CenturiesFrom1900(int):double
           2 ( 0,88% of base) : 9945.dasm - System.DateTime:DateToTicks(int,int,int):long
           7 ( 0,88% of base) : 7843.dasm - DecCalc:VarDecFromR4(float,byref)
           2 ( 0,83% of base) : 9920.dasm - System.DateTime:.ctor(int,int,int):this
           1 ( 0,83% of base) : 10326.dasm - System.DateTimeFormat:WriteTwoDecimalDigits(int,System.Span`1[Char],int)
           2 ( 0,82% of base) : 15530.dasm - DateMapping:.ctor(int,int,int,int):this

Top method improvements (percentages):
         -13 (-14,94% of base) : 11133.dasm - System.Number:Int64DivMod1E9(byref):int
         -14 (-10,29% of base) : 7852.dasm - DecCalc:DecDivMod1E9(byref):int
          -8 (-9,52% of base) : 9974.dasm - System.DateTime:get_Millisecond():int:this
          -5 (-7,35% of base) : 9968.dasm - System.DateTime:get_DayOfWeek():int:this
         -14 (-7,14% of base) : 69369.dasm - Newtonsoft.Json.JsonTextWriter:WriteNumberToBuffer(int,bool):int:this
          -1 (-6,67% of base) : 154374.dasm - System.Net.Sockets.IOControlKeepAlive:MillisecondsToSeconds(int):int
         -10 (-6,49% of base) : 154370.dasm - System.Net.Sockets.IOControlKeepAlive:Get(System.Net.Sockets.SafeSocketHandle,int):int
         -22 (-6,08% of base) : 9962.dasm - System.DateTime:GetDatePart(int):int:this
          -7 (-5,88% of base) : 9948.dasm - System.DateTime:DaysInMonth(int,int):int
         -18 (-5,42% of base) : 9963.dasm - System.DateTime:GetDate(byref,byref,byref):this
          -8 (-4,47% of base) : 9965.dasm - System.DateTime:GetTime(byref,byref,byref,byref):this
         -29 (-4,04% of base) : 7851.dasm - DecCalc:InternalRound(byref,int,int)
         -21 (-3,94% of base) : 7847.dasm - DecCalc:GetHashCode(byref):int
          -2 (-3,57% of base) : 11105.dasm - System.Number:UInt32ToDecChars(long,int,int):long
         -15 (-3,46% of base) : 7828.dasm - DecCalc:Unscale(byref,byref,byref)
          -2 (-3,45% of base) : 11106.dasm - System.Number:UInt32ToDecChars(long,int,int):long
         -45 (-3,21% of base) : 7833.dasm - DecCalc:ScaleResult(long,int,int):int
          -4 (-3,08% of base) : 15703.dasm - System.Buffers.Text.FormattingHelpers:CountDigits(int):int
         -65 (-2,70% of base) : 162619.dasm - System.Numerics.BigNumber:FormatBigInteger(bool,System.Numerics.BigInteger,System.String,System.ReadOnlySpan`1[Char],System.Globalization.NumberFormatInfo,System.Span`1[Char],byref,byref):System.String
         -27 (-1,98% of base) : 11254.dasm - Grisu3:TryDigitGenShortest(byref,byref,byref,System.Span`1[Byte],byref,byref):bool

82 total methods with Code Size differences (40 improved, 42 regressed), 6 unchanged.
libraries.crossgen2.windows.x64.checked
Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 55880
Total bytes of diff: 55651
Total bytes of delta: -229 (-0,41% of base)
    diff is an improvement.


Top file regressions (bytes):
         110 : 60379.dasm (4,25% of base)
          15 : 185501.dasm (3,10% of base)
          12 : 60411.dasm (1,11% of base)
          11 : 65675.dasm (1,03% of base)
           8 : 63120.dasm (0,60% of base)
           7 : 67993.dasm (0,95% of base)
           7 : 61138.dasm (1,16% of base)
           5 : 200009.dasm (0,19% of base)
           5 : 146170.dasm (0,44% of base)
           4 : 60417.dasm (2,03% of base)
           3 : 66040.dasm (0,61% of base)
           3 : 65917.dasm (0,36% of base)
           3 : 4939.dasm (0,54% of base)
           3 : 65673.dasm (1,49% of base)
           2 : 65926.dasm (0,45% of base)
           2 : 60597.dasm (0,81% of base)
           2 : 61104.dasm (0,56% of base)
           2 : 61302.dasm (0,56% of base)
           2 : 66042.dasm (0,83% of base)
           2 : 60416.dasm (1,67% of base)

Top file improvements (bytes):
         -62 : 194318.dasm (-2,59% of base)
         -45 : 68003.dasm (-3,24% of base)
         -32 : 63117.dasm (-1,31% of base)
         -29 : 67985.dasm (-4,04% of base)
         -27 : 64775.dasm (-1,98% of base)
         -22 : 66002.dasm (-6,06% of base)
         -21 : 67989.dasm (-3,94% of base)
         -19 : 63089.dasm (-0,82% of base)
         -18 : 66001.dasm (-5,41% of base)
         -15 : 68008.dasm (-3,46% of base)
         -14 : 67984.dasm (-10,29% of base)
         -14 : 81837.dasm (-7,11% of base)
         -14 : 67988.dasm (-0,79% of base)
         -13 : 14850.dasm (-1,84% of base)
         -13 : 64893.dasm (-14,94% of base)
         -11 : 14449.dasm (-0,45% of base)
         -10 : 160047.dasm (-6,49% of base)
         -10 : 65676.dasm (-0,68% of base)
          -8 : 65999.dasm (-4,47% of base)
          -8 : 65990.dasm (-9,52% of base)

84 total files with Code Size differences (41 improved, 43 regressed), 5 unchanged.

Top method regressions (bytes):
         110 ( 4,25% of base) : 60379.dasm - System.Buffers.Text.Utf8Formatter:TryFormat(System.TimeSpan,System.Span`1[System.Byte],byref,System.Buffers.StandardFormat):bool
          15 ( 3,10% of base) : 185501.dasm - System.Text.Json.JsonWriterHelper:TrimDateTimeOffset(System.Span`1[System.Byte],byref)
          12 ( 1,11% of base) : 60411.dasm - System.Buffers.Text.Utf8Formatter:TryFormatDateTimeG(System.DateTime,System.TimeSpan,System.Span`1[System.Byte],byref):bool
          11 ( 1,03% of base) : 65675.dasm - System.DateTimeFormat:TryFormatR(System.DateTime,System.TimeSpan,System.Span`1[System.Char],byref):bool
           8 ( 0,60% of base) : 63120.dasm - System.TimeZoneInfo:GetIsDaylightSavings(System.DateTime,System.TimeZoneInfo+AdjustmentRule,System.Globalization.DaylightTimeStruct):bool
           7 ( 0,95% of base) : 67993.dasm - DecCalc:VarDecFromR4(float,byref)
           7 ( 1,16% of base) : 61138.dasm - System.Globalization.ISOWeek:ToDateTime(int,int,int):System.DateTime
           5 ( 0,19% of base) : 200009.dasm - System.Formats.Asn1.AsnDecoder:ParseGeneralizedTime(int,System.ReadOnlySpan`1[System.Byte]):System.DateTimeOffset
           5 ( 0,44% of base) : 146170.dasm - System.Net.Http.HttpWindowsProxy:.ctor(System.Net.Http.WinInetProxyHelper,Interop+WinHttp+SafeWinHttpHandle):this
           4 ( 2,03% of base) : 60417.dasm - System.Buffers.Text.FormattingHelpers:WriteFourDecimalDigits(int,System.Span`1[System.Byte],int)
           3 ( 0,61% of base) : 66040.dasm - System.DateTime:.ctor(int,int,int,int,int,int,int):this
           3 ( 0,36% of base) : 65917.dasm - System.DateTimeOffset:.ctor(int,int,int,int,int,int,System.TimeSpan):this
           3 ( 0,54% of base) : 4939.dasm - System.Data.SqlTypes.SqlDecimal:Round(System.Data.SqlTypes.SqlDecimal,int,bool):System.Data.SqlTypes.SqlDecimal
           3 ( 1,49% of base) : 65673.dasm - System.DateTimeFormat:WriteFourDecimalDigits(int,System.Span`1[System.Char],int)
           2 ( 0,45% of base) : 65926.dasm - System.DateTime:FromFileTimeLeapSecondsAware(long):System.DateTime
           2 ( 0,81% of base) : 60597.dasm - DateMapping:.ctor(int,int,int,int):this
           2 ( 0,56% of base) : 61104.dasm - System.Globalization.JapaneseCalendar:GetJapaneseEraStartDate(int,byref):bool
           2 ( 0,56% of base) : 61302.dasm - System.Globalization.EraInfo:.ctor(int,int,int,int,int,int,int,System.String,System.String,System.String):this
           2 ( 0,83% of base) : 66042.dasm - System.DateTime:.ctor(int,int,int):this
           2 ( 1,67% of base) : 60416.dasm - System.Buffers.Text.FormattingHelpers:WriteTwoDecimalDigits(int,System.Span`1[System.Byte],int)

Top method improvements (bytes):
         -62 (-2,59% of base) : 194318.dasm - System.Numerics.BigNumber:FormatBigInteger(bool,System.Numerics.BigInteger,System.String,System.ReadOnlySpan`1[System.Char],System.Globalization.NumberFormatInfo,System.Span`1[System.Char],byref,byref):System.String
         -45 (-3,24% of base) : 68003.dasm - DecCalc:ScaleResult(long,int,int):int
         -32 (-1,31% of base) : 63117.dasm - System.TimeZoneInfo:GetIsDaylightSavingsFromUtc(System.DateTime,int,System.TimeSpan,System.TimeZoneInfo+AdjustmentRule,System.Nullable`1[System.Int32],byref,System.TimeZoneInfo):bool
         -29 (-4,04% of base) : 67985.dasm - DecCalc:InternalRound(byref,int,int)
         -27 (-1,98% of base) : 64775.dasm - Grisu3:TryDigitGenShortest(byref,byref,byref,System.Span`1[System.Byte],byref,byref):bool
         -22 (-6,06% of base) : 66002.dasm - System.DateTime:GetDatePart(int):int:this
         -21 (-3,94% of base) : 67989.dasm - DecCalc:GetHashCode(byref):int
         -19 (-0,82% of base) : 63089.dasm - System.TimeZoneInfo:TryCreateAdjustmentRules(System.String,byref,byref,byref,int):bool
         -18 (-5,41% of base) : 66001.dasm - System.DateTime:GetDate(byref,byref,byref):this
         -15 (-3,46% of base) : 68008.dasm - DecCalc:Unscale(byref,byref,byref)
         -14 (-10,29% of base) : 67984.dasm - DecCalc:DecDivMod1E9(byref):int
         -14 (-7,11% of base) : 81837.dasm - Newtonsoft.Json.JsonTextWriter:WriteNumberToBuffer(int,bool):int:this
         -14 (-0,79% of base) : 67988.dasm - DecCalc:VarDecDiv(byref,byref)
         -13 (-1,84% of base) : 14850.dasm - System.Xml.Schema.XsdDuration:TryToTimeSpan(int,byref):System.Exception:this
         -13 (-14,94% of base) : 64893.dasm - System.Number:Int64DivMod1E9(byref):int
         -11 (-0,45% of base) : 14449.dasm - BigNumber:DblToRgbFast(double,System.Byte[],byref,byref):bool
         -10 (-6,49% of base) : 160047.dasm - System.Net.Sockets.IOControlKeepAlive:Get(System.Net.Sockets.SafeSocketHandle,int):int
         -10 (-0,68% of base) : 65676.dasm - System.DateTimeFormat:TryFormatO(System.DateTime,System.TimeSpan,System.Span`1[System.Char],byref):bool
          -8 (-4,47% of base) : 65999.dasm - System.DateTime:GetTime(byref,byref,byref,byref):this
          -8 (-9,52% of base) : 65990.dasm - System.DateTime:get_Millisecond():int:this

Top method regressions (percentages):
         110 ( 4,25% of base) : 60379.dasm - System.Buffers.Text.Utf8Formatter:TryFormat(System.TimeSpan,System.Span`1[System.Byte],byref,System.Buffers.StandardFormat):bool
           1 ( 3,23% of base) : 66017.dasm - System.DateTime:DaysToYear(int):int
          15 ( 3,10% of base) : 185501.dasm - System.Text.Json.JsonWriterHelper:TrimDateTimeOffset(System.Span`1[System.Byte],byref)
           4 ( 2,03% of base) : 60417.dasm - System.Buffers.Text.FormattingHelpers:WriteFourDecimalDigits(int,System.Span`1[System.Byte],int)
           1 ( 1,72% of base) : 65993.dasm - System.DateTime:get_Hour():int:this
           2 ( 1,67% of base) : 60416.dasm - System.Buffers.Text.FormattingHelpers:WriteTwoDecimalDigits(int,System.Span`1[System.Byte],int)
           2 ( 1,61% of base) : 60418.dasm - System.Buffers.Text.FormattingHelpers:WriteDigits(int,System.Span`1[System.Byte])
           3 ( 1,49% of base) : 65673.dasm - System.DateTimeFormat:WriteFourDecimalDigits(int,System.Span`1[System.Char],int)
           1 ( 1,32% of base) : 194557.dasm - Number:Int32ToDecChars(long,byref,int,int)
           1 ( 1,16% of base) : 65981.dasm - System.DateTime:IsLeapYear(int):bool
           7 ( 1,16% of base) : 61138.dasm - System.Globalization.ISOWeek:ToDateTime(int,int,int):System.DateTime
          12 ( 1,11% of base) : 60411.dasm - System.Buffers.Text.Utf8Formatter:TryFormatDateTimeG(System.DateTime,System.TimeSpan,System.Span`1[System.Byte],byref):bool
          11 ( 1,03% of base) : 65675.dasm - System.DateTimeFormat:TryFormatR(System.DateTime,System.TimeSpan,System.Span`1[System.Char],byref):bool
           1 ( 0,96% of base) : 60708.dasm - System.Globalization.TimeSpanFormat:WriteTwoDigits(int,System.Span`1[System.Char])
           7 ( 0,95% of base) : 67993.dasm - DecCalc:VarDecFromR4(float,byref)
           2 ( 0,94% of base) : 61994.dasm - System.Globalization.CalendricalCalculationsHelper:CenturiesFrom1900(int):double
           2 ( 0,88% of base) : 66018.dasm - System.DateTime:DateToTicks(int,int,int):long
           2 ( 0,83% of base) : 66042.dasm - System.DateTime:.ctor(int,int,int):this
           1 ( 0,82% of base) : 65674.dasm - System.DateTimeFormat:WriteTwoDecimalDigits(int,System.Span`1[System.Char],int)
           2 ( 0,81% of base) : 60597.dasm - DateMapping:.ctor(int,int,int,int):this

Top method improvements (percentages):
         -13 (-14,94% of base) : 64893.dasm - System.Number:Int64DivMod1E9(byref):int
         -14 (-10,29% of base) : 67984.dasm - DecCalc:DecDivMod1E9(byref):int
          -8 (-9,52% of base) : 65990.dasm - System.DateTime:get_Millisecond():int:this
          -5 (-7,35% of base) : 65996.dasm - System.DateTime:get_DayOfWeek():int:this
         -14 (-7,11% of base) : 81837.dasm - Newtonsoft.Json.JsonTextWriter:WriteNumberToBuffer(int,bool):int:this
          -1 (-6,67% of base) : 160043.dasm - System.Net.Sockets.IOControlKeepAlive:MillisecondsToSeconds(int):int
         -10 (-6,49% of base) : 160047.dasm - System.Net.Sockets.IOControlKeepAlive:Get(System.Net.Sockets.SafeSocketHandle,int):int
         -22 (-6,06% of base) : 66002.dasm - System.DateTime:GetDatePart(int):int:this
          -7 (-5,83% of base) : 66015.dasm - System.DateTime:DaysInMonth(int,int):int
         -18 (-5,41% of base) : 66001.dasm - System.DateTime:GetDate(byref,byref,byref):this
          -8 (-4,47% of base) : 65999.dasm - System.DateTime:GetTime(byref,byref,byref,byref):this
         -29 (-4,04% of base) : 67985.dasm - DecCalc:InternalRound(byref,int,int)
         -21 (-3,94% of base) : 67989.dasm - DecCalc:GetHashCode(byref):int
          -2 (-3,57% of base) : 64920.dasm - System.Number:UInt32ToDecChars(long,int,int):long
         -15 (-3,46% of base) : 68008.dasm - DecCalc:Unscale(byref,byref,byref)
          -2 (-3,45% of base) : 64919.dasm - System.Number:UInt32ToDecChars(long,int,int):long
         -45 (-3,24% of base) : 68003.dasm - DecCalc:ScaleResult(long,int,int):int
          -4 (-3,08% of base) : 60425.dasm - System.Buffers.Text.FormattingHelpers:CountDigits(int):int
         -62 (-2,59% of base) : 194318.dasm - System.Numerics.BigNumber:FormatBigInteger(bool,System.Numerics.BigInteger,System.String,System.ReadOnlySpan`1[System.Char],System.Globalization.NumberFormatInfo,System.Span`1[System.Char],byref,byref):System.String
         -27 (-1,98% of base) : 64775.dasm - Grisu3:TryDigitGenShortest(byref,byref,byref,System.Span`1[System.Byte],byref,byref):bool

84 total methods with Code Size differences (41 improved, 43 regressed), 5 unchanged.
libraries.pmi.windows.x64.checked
Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 23047
Total bytes of diff: 22946
Total bytes of delta: -101 (-0,44% of base)
    diff is an improvement.


Top file regressions (bytes):
          25 : 217876.dasm (5,83% of base)
          11 : 177682.dasm (0,30% of base)
           6 : 128179.dasm (0,47% of base)
           6 : 128178.dasm (0,36% of base)
           6 : 147106.dasm (0,56% of base)
           4 : 55740.dasm (0,15% of base)
           2 : 121142.dasm (0,50% of base)
           2 : 121143.dasm (0,41% of base)
           2 : 102462.dasm (0,47% of base)
           2 : 148410.dasm (0,47% of base)
           2 : 128163.dasm (0,54% of base)
           1 : 207763.dasm (1,32% of base)
           1 : 217289.dasm (0,20% of base)
           1 : 113362.dasm (0,08% of base)

Top file improvements (bytes):
         -50 : 208003.dasm (-2,07% of base)
         -32 : 128669.dasm (-1,27% of base)
         -20 : 101843.dasm (-9,13% of base)
         -16 : 109103.dasm (-2,51% of base)
         -15 : 166012.dasm (-3,29% of base)
         -15 : 167321.dasm (-3,29% of base)
         -13 : 128214.dasm (-2,03% of base)
         -10 : 199197.dasm (-6,02% of base)
          -1 : 199201.dasm (-6,67% of base)

23 total files with Code Size differences (9 improved, 14 regressed), 2 unchanged.

Top method regressions (bytes):
          25 ( 5,83% of base) : 217876.dasm - System.Text.Json.JsonWriterHelper:TrimDateTimeOffset(System.Span`1[Byte],byref)
          11 ( 0,30% of base) : 177682.dasm - System.Formats.Asn1.AsnDecoder:ParseGeneralizedTime(int,System.ReadOnlySpan`1[Byte]):System.DateTimeOffset
           6 ( 0,47% of base) : 128179.dasm - System.Xml.Schema.XsdDateTime:op_Implicit(System.Xml.Schema.XsdDateTime):System.DateTimeOffset
           6 ( 0,36% of base) : 128178.dasm - System.Xml.Schema.XsdDateTime:op_Implicit(System.Xml.Schema.XsdDateTime):System.DateTime
           6 ( 0,56% of base) : 147106.dasm - Microsoft.VisualBasic.DateAndTime:DateSerial(int,int,int):System.DateTime
           4 ( 0,15% of base) : 55740.dasm - Microsoft.CodeAnalysis.VisualBasic.Syntax.InternalSyntax.Scanner:ScanDateLiteral(Microsoft.CodeAnalysis.VisualBasic.Syntax.InternalSyntax.SyntaxList`1[[Microsoft.CodeAnalysis.VisualBasic.Syntax.InternalSyntax.VisualBasicSyntaxNode, Microsoft.CodeAnalysis.VisualBasic, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]):Microsoft.CodeAnalysis.VisualBasic.Syntax.InternalSyntax.SyntaxToken:this
           2 ( 0,50% of base) : 121142.dasm - System.Xml.BinXmlDateTime:GetFractions(System.DateTime):int
           2 ( 0,41% of base) : 121143.dasm - System.Xml.BinXmlDateTime:GetFractions(System.DateTimeOffset):int
           2 ( 0,47% of base) : 102462.dasm - Newtonsoft.Json.Utilities.DateTimeUtils:CreateDateTime(Newtonsoft.Json.Utilities.DateTimeParser):System.DateTime
           2 ( 0,47% of base) : 148410.dasm - Newtonsoft.Json.Bson.Utilities.DateTimeUtils:CreateDateTime(Newtonsoft.Json.Bson.Utilities.DateTimeParser):System.DateTime
           2 ( 0,54% of base) : 128163.dasm - System.Xml.Schema.XsdDateTime:InitiateXsdDateTime(Parser):this
           1 ( 1,32% of base) : 207763.dasm - Number:Int32ToDecChars(long,byref,int,int)
           1 ( 0,20% of base) : 217289.dasm - System.Text.Json.JsonHelpers:TryCreateDateTime(DateTimeParseData,int,byref):bool
           1 ( 0,08% of base) : 113362.dasm - System.Net.Http.HttpWindowsProxy:.ctor(System.Net.Http.WinInetProxyHelper,SafeWinHttpHandle):this

Top method improvements (bytes):
         -50 (-2,07% of base) : 208003.dasm - System.Numerics.BigNumber:FormatBigInteger(bool,System.Numerics.BigInteger,System.String,System.ReadOnlySpan`1[Char],System.Globalization.NumberFormatInfo,System.Span`1[Char],byref,byref):System.String
         -32 (-1,27% of base) : 128669.dasm - BigNumber:DblToRgbFast(double,System.Byte[],byref,byref):bool
         -20 (-9,13% of base) : 101843.dasm - Newtonsoft.Json.JsonTextWriter:WriteNumberToBuffer(int,bool):int:this
         -16 (-2,51% of base) : 109103.dasm - System.Data.SqlTypes.SqlDecimal:Round(System.Data.SqlTypes.SqlDecimal,int,bool):System.Data.SqlTypes.SqlDecimal
         -15 (-3,29% of base) : 166012.dasm - System.Data.ProviderBase.DbBuffer:ReadDateTime(int):System.DateTime:this
         -15 (-3,29% of base) : 167321.dasm - System.Data.ProviderBase.DbBuffer:ReadDateTime(int):System.DateTime:this
         -13 (-2,03% of base) : 128214.dasm - System.Xml.Schema.XsdDuration:TryToTimeSpan(int,byref):System.Exception:this
         -10 (-6,02% of base) : 199197.dasm - System.Net.Sockets.IOControlKeepAlive:Get(System.Net.Sockets.SafeSocketHandle,int):int
          -1 (-6,67% of base) : 199201.dasm - System.Net.Sockets.IOControlKeepAlive:MillisecondsToSeconds(int):int

Top method regressions (percentages):
          25 ( 5,83% of base) : 217876.dasm - System.Text.Json.JsonWriterHelper:TrimDateTimeOffset(System.Span`1[Byte],byref)
           1 ( 1,32% of base) : 207763.dasm - Number:Int32ToDecChars(long,byref,int,int)
           6 ( 0,56% of base) : 147106.dasm - Microsoft.VisualBasic.DateAndTime:DateSerial(int,int,int):System.DateTime
           2 ( 0,54% of base) : 128163.dasm - System.Xml.Schema.XsdDateTime:InitiateXsdDateTime(Parser):this
           2 ( 0,50% of base) : 121142.dasm - System.Xml.BinXmlDateTime:GetFractions(System.DateTime):int
           2 ( 0,47% of base) : 102462.dasm - Newtonsoft.Json.Utilities.DateTimeUtils:CreateDateTime(Newtonsoft.Json.Utilities.DateTimeParser):System.DateTime
           2 ( 0,47% of base) : 148410.dasm - Newtonsoft.Json.Bson.Utilities.DateTimeUtils:CreateDateTime(Newtonsoft.Json.Bson.Utilities.DateTimeParser):System.DateTime
           6 ( 0,47% of base) : 128179.dasm - System.Xml.Schema.XsdDateTime:op_Implicit(System.Xml.Schema.XsdDateTime):System.DateTimeOffset
           2 ( 0,41% of base) : 121143.dasm - System.Xml.BinXmlDateTime:GetFractions(System.DateTimeOffset):int
           6 ( 0,36% of base) : 128178.dasm - System.Xml.Schema.XsdDateTime:op_Implicit(System.Xml.Schema.XsdDateTime):System.DateTime
          11 ( 0,30% of base) : 177682.dasm - System.Formats.Asn1.AsnDecoder:ParseGeneralizedTime(int,System.ReadOnlySpan`1[Byte]):System.DateTimeOffset
           1 ( 0,20% of base) : 217289.dasm - System.Text.Json.JsonHelpers:TryCreateDateTime(DateTimeParseData,int,byref):bool
           4 ( 0,15% of base) : 55740.dasm - Microsoft.CodeAnalysis.VisualBasic.Syntax.InternalSyntax.Scanner:ScanDateLiteral(Microsoft.CodeAnalysis.VisualBasic.Syntax.InternalSyntax.SyntaxList`1[[Microsoft.CodeAnalysis.VisualBasic.Syntax.InternalSyntax.VisualBasicSyntaxNode, Microsoft.CodeAnalysis.VisualBasic, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]):Microsoft.CodeAnalysis.VisualBasic.Syntax.InternalSyntax.SyntaxToken:this
           1 ( 0,08% of base) : 113362.dasm - System.Net.Http.HttpWindowsProxy:.ctor(System.Net.Http.WinInetProxyHelper,SafeWinHttpHandle):this

Top method improvements (percentages):
         -20 (-9,13% of base) : 101843.dasm - Newtonsoft.Json.JsonTextWriter:WriteNumberToBuffer(int,bool):int:this
          -1 (-6,67% of base) : 199201.dasm - System.Net.Sockets.IOControlKeepAlive:MillisecondsToSeconds(int):int
         -10 (-6,02% of base) : 199197.dasm - System.Net.Sockets.IOControlKeepAlive:Get(System.Net.Sockets.SafeSocketHandle,int):int
         -15 (-3,29% of base) : 166012.dasm - System.Data.ProviderBase.DbBuffer:ReadDateTime(int):System.DateTime:this
         -15 (-3,29% of base) : 167321.dasm - System.Data.ProviderBase.DbBuffer:ReadDateTime(int):System.DateTime:this
         -16 (-2,51% of base) : 109103.dasm - System.Data.SqlTypes.SqlDecimal:Round(System.Data.SqlTypes.SqlDecimal,int,bool):System.Data.SqlTypes.SqlDecimal
         -50 (-2,07% of base) : 208003.dasm - System.Numerics.BigNumber:FormatBigInteger(bool,System.Numerics.BigInteger,System.String,System.ReadOnlySpan`1[Char],System.Globalization.NumberFormatInfo,System.Span`1[Char],byref,byref):System.String
         -13 (-2,03% of base) : 128214.dasm - System.Xml.Schema.XsdDuration:TryToTimeSpan(int,byref):System.Exception:this
         -32 (-1,27% of base) : 128669.dasm - BigNumber:DblToRgbFast(double,System.Byte[],byref,byref):bool

23 total methods with Code Size differences (9 improved, 14 regressed), 2 unchanged.

Tests have a ton of these errors: ERROR: REL32 relocation overflows field! delta=0x000000008D271BF6

tests.pmi.windows.x64.checked
Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 413203
Total bytes of diff: 413276
Total bytes of delta: 73 (0,02% of base)
    diff is a regression.


Top file regressions (bytes):
          89 : 190291.dasm (0,07% of base)
          34 : 190438.dasm (0,02% of base)
          15 : 245337.dasm (5,38% of base)
           9 : 249963.dasm (3,67% of base)
           6 : 222286.dasm (0,02% of base)
           6 : 211400.dasm (0,02% of base)
           4 : 231264.dasm (0,16% of base)
           4 : 239606.dasm (26,67% of base)
           4 : 243081.dasm (21,05% of base)
           3 : 239610.dasm (18,75% of base)
           3 : 84311.dasm (0,28% of base)
           3 : 85719.dasm (2,07% of base)
           3 : 85995.dasm (0,82% of base)
           3 : 239608.dasm (18,75% of base)
           3 : 243082.dasm (15,00% of base)
           2 : 243049.dasm (14,29% of base)
           2 : 239632.dasm (9,09% of base)
           1 : 85972.dasm (0,65% of base)
           1 : 239582.dasm (4,35% of base)
           1 : 243058.dasm (3,23% of base)

Top file improvements (bytes):
         -22 : 221108.dasm (-4,70% of base)
         -20 : 132727.dasm (-1,31% of base)
         -16 : 135361.dasm (-1,23% of base)
          -9 : 83584.dasm (-3,90% of base)
          -8 : 84347.dasm (-0,71% of base)
          -6 : 239322.dasm (-8,57% of base)
          -5 : 239584.dasm (-14,71% of base)
          -5 : 243083.dasm (-17,86% of base)
          -5 : 239583.dasm (-14,71% of base)
          -4 : 132828.dasm (-2,37% of base)
          -4 : 243090.dasm (-9,30% of base)
          -4 : 135433.dasm (-2,37% of base)
          -3 : 84296.dasm (-0,42% of base)
          -3 : 133560.dasm (-0,57% of base)
          -2 : 84307.dasm (-0,24% of base)
          -2 : 243051.dasm (-10,00% of base)
          -2 : 239611.dasm (-8,70% of base)
          -2 : 239612.dasm (-8,70% of base)
          -1 : 84285.dasm (-0,13% of base)
          -1 : 239321.dasm (-2,50% of base)

43 total files with Code Size differences (21 improved, 22 regressed), 16 unchanged.

Top method regressions (bytes):
          89 ( 0,07% of base) : 190291.dasm - u4div:Main():int
          34 ( 0,02% of base) : 190438.dasm - u4rem:Main():int
          15 ( 5,38% of base) : 245337.dasm - AA:Static4():System.Char[]
           9 ( 3,67% of base) : 249963.dasm - Test:Main(System.String[]):int
           6 ( 0,02% of base) : 222286.dasm - lclfldrem:Main():int
           6 ( 0,02% of base) : 211400.dasm - lclfldrem:Main():int
           4 ( 0,16% of base) : 231264.dasm - MemoryAlloc:SteadyState():this
           4 (26,67% of base) : 239606.dasm - ArrayLengthArithmeticTests:ArrayLengthDiv_cns3(System.Int32[]):int
           4 (21,05% of base) : 243081.dasm - UModConst:U4_Mod_3(int):int
           3 (18,75% of base) : 239610.dasm - ArrayLengthArithmeticTests:ArrayLengthDiv_cns10(System.Int32[]):int
           3 ( 0,28% of base) : 84311.dasm - ILGEN_0x2a6b42a0:Method_0x51d8(long,int,int,short):int
           3 ( 2,07% of base) : 85719.dasm - ILGEN_0xbbd892b0:main():int
           3 ( 0,82% of base) : 85995.dasm - ILGEN_0xa83217d:Method_0xf3555db(long,long,int,int,short,byte):int
           3 (18,75% of base) : 239608.dasm - ArrayLengthArithmeticTests:ArrayLengthDiv_cns5(System.Int32[]):int
           3 (15,00% of base) : 243082.dasm - UModConst:U4_Mod_5(int):int
           2 (14,29% of base) : 243049.dasm - UDivConst:U4_Div_3(int):int
           2 ( 9,09% of base) : 239632.dasm - ArrayLengthArithmeticTests:ArrayLengthMod_cns3(System.Int32[]):int
           1 ( 0,65% of base) : 85972.dasm - ILGEN_0x68eb95f0:Method_0x2dae(byte,int,long,byte,ushort,long):float
           1 ( 4,35% of base) : 239582.dasm - ArrayLengthArithmeticTests:ArrayLengthMod_cns10(System.Int32[]):int
           1 ( 3,23% of base) : 243058.dasm - UDivConst:U8_Div_7(long):long

Top method improvements (bytes):
         -22 (-4,70% of base) : 221108.dasm - SoDBench.Program:DeleteDirectory(System.IO.DirectoryInfo,int)
         -20 (-1,31% of base) : 132727.dasm - testout1:Func_0_1_4_3_4():int
         -16 (-1,23% of base) : 135361.dasm - testout1:Func_0_1_4_3_4():int
          -9 (-3,90% of base) : 83584.dasm - AA:main():int
          -8 (-0,71% of base) : 84347.dasm - ILGEN_0x2193e4b5:Method_0xeffa27b5(ubyte,long,float,float,byte,double,int,ubyte,short):int
          -6 (-8,57% of base) : 239322.dasm - Tests:ModOutOfBounds(System.Int32[],int)
          -5 (-14,71% of base) : 239584.dasm - ArrayLengthArithmeticTests:ArrayLengthMod_cnsMaxValue(System.Int32[]):int
          -5 (-17,86% of base) : 243083.dasm - UModConst:U4_Mod_7(int):int
          -5 (-14,71% of base) : 239583.dasm - ArrayLengthArithmeticTests:ArrayLengthMod_cnsMaxValuen1(System.Int32[]):int
          -4 (-2,37% of base) : 132828.dasm - testout1:Func_0_2_1_3_5():double
          -4 (-9,30% of base) : 243090.dasm - UModConst:U8_Mod_7(long):long
          -4 (-2,37% of base) : 135433.dasm - testout1:Func_0_2_1_3_5():double
          -3 (-0,42% of base) : 84296.dasm - ILGEN_0x2985f7b9:Method_0xe2c8c158(long,long,ubyte,long,long,short,float,int,float):int
          -3 (-0,57% of base) : 133560.dasm - testout1:Func_0_6_1_3_3():double
          -2 (-0,24% of base) : 84307.dasm - ILGEN_0xc2d6ebd8:Method_0x6228(ushort,short,int,long,short,long,int):int
          -2 (-10,00% of base) : 243051.dasm - UDivConst:U4_Div_7(int):int
          -2 (-8,70% of base) : 239611.dasm - ArrayLengthArithmeticTests:ArrayLengthDiv_cnsMaxValuen1(System.Int32[]):int
          -2 (-8,70% of base) : 239612.dasm - ArrayLengthArithmeticTests:ArrayLengthDiv_cnsMaxValue(System.Int32[]):int
          -1 (-0,13% of base) : 84285.dasm - ILGEN_0xcd4c3cc0:main():int
          -1 (-2,50% of base) : 239321.dasm - Tests:ModInBounds(System.Int32[],int)

Top method regressions (percentages):
           4 (26,67% of base) : 239606.dasm - ArrayLengthArithmeticTests:ArrayLengthDiv_cns3(System.Int32[]):int
           4 (21,05% of base) : 243081.dasm - UModConst:U4_Mod_3(int):int
           3 (18,75% of base) : 239610.dasm - ArrayLengthArithmeticTests:ArrayLengthDiv_cns10(System.Int32[]):int
           3 (18,75% of base) : 239608.dasm - ArrayLengthArithmeticTests:ArrayLengthDiv_cns5(System.Int32[]):int
           3 (15,00% of base) : 243082.dasm - UModConst:U4_Mod_5(int):int
           2 (14,29% of base) : 243049.dasm - UDivConst:U4_Div_3(int):int
           2 ( 9,09% of base) : 239632.dasm - ArrayLengthArithmeticTests:ArrayLengthMod_cns3(System.Int32[]):int
           1 ( 6,67% of base) : 243050.dasm - UDivConst:U4_Div_5(int):int
          15 ( 5,38% of base) : 245337.dasm - AA:Static4():System.Char[]
           1 ( 4,35% of base) : 239582.dasm - ArrayLengthArithmeticTests:ArrayLengthMod_cns10(System.Int32[]):int
           1 ( 4,35% of base) : 239580.dasm - ArrayLengthArithmeticTests:ArrayLengthMod_cns5(System.Int32[]):int
           9 ( 3,67% of base) : 249963.dasm - Test:Main(System.String[]):int
           1 ( 3,23% of base) : 243058.dasm - UDivConst:U8_Div_7(long):long
           3 ( 2,07% of base) : 85719.dasm - ILGEN_0xbbd892b0:main():int
           3 ( 0,82% of base) : 85995.dasm - ILGEN_0xa83217d:Method_0xf3555db(long,long,int,int,short,byte):int
           1 ( 0,65% of base) : 85972.dasm - ILGEN_0x68eb95f0:Method_0x2dae(byte,int,long,byte,ushort,long):float
           3 ( 0,28% of base) : 84311.dasm - ILGEN_0x2a6b42a0:Method_0x51d8(long,int,int,short):int
           4 ( 0,16% of base) : 231264.dasm - MemoryAlloc:SteadyState():this
          89 ( 0,07% of base) : 190291.dasm - u4div:Main():int
          34 ( 0,02% of base) : 190438.dasm - u4rem:Main():int

Top method improvements (percentages):
          -5 (-17,86% of base) : 243083.dasm - UModConst:U4_Mod_7(int):int
          -5 (-14,71% of base) : 239584.dasm - ArrayLengthArithmeticTests:ArrayLengthMod_cnsMaxValue(System.Int32[]):int
          -5 (-14,71% of base) : 239583.dasm - ArrayLengthArithmeticTests:ArrayLengthMod_cnsMaxValuen1(System.Int32[]):int
          -2 (-10,00% of base) : 243051.dasm - UDivConst:U4_Div_7(int):int
          -4 (-9,30% of base) : 243090.dasm - UModConst:U8_Mod_7(long):long
          -2 (-8,70% of base) : 239611.dasm - ArrayLengthArithmeticTests:ArrayLengthDiv_cnsMaxValuen1(System.Int32[]):int
          -2 (-8,70% of base) : 239612.dasm - ArrayLengthArithmeticTests:ArrayLengthDiv_cnsMaxValue(System.Int32[]):int
          -6 (-8,57% of base) : 239322.dasm - Tests:ModOutOfBounds(System.Int32[],int)
         -22 (-4,70% of base) : 221108.dasm - SoDBench.Program:DeleteDirectory(System.IO.DirectoryInfo,int)
          -9 (-3,90% of base) : 83584.dasm - AA:main():int
          -1 (-2,50% of base) : 239321.dasm - Tests:ModInBounds(System.Int32[],int)
          -4 (-2,37% of base) : 132828.dasm - testout1:Func_0_2_1_3_5():double
          -4 (-2,37% of base) : 135433.dasm - testout1:Func_0_2_1_3_5():double
         -20 (-1,31% of base) : 132727.dasm - testout1:Func_0_1_4_3_4():int
         -16 (-1,23% of base) : 135361.dasm - testout1:Func_0_1_4_3_4():int
          -8 (-0,71% of base) : 84347.dasm - ILGEN_0x2193e4b5:Method_0xeffa27b5(ubyte,long,float,float,byte,double,int,ubyte,short):int
          -3 (-0,57% of base) : 133560.dasm - testout1:Func_0_6_1_3_3():double
          -3 (-0,42% of base) : 84296.dasm - ILGEN_0x2985f7b9:Method_0xe2c8c158(long,long,ubyte,long,long,short,float,int,float):int
          -2 (-0,24% of base) : 84307.dasm - ILGEN_0xc2d6ebd8:Method_0x6228(ushort,short,int,long,short,long,int):int
          -1 (-0,18% of base) : 84344.dasm - ILGEN_0xd4820a77:Method_0x1a2ad58f(ubyte,long,byte,float):int

43 total methods with Code Size differences (21 improved, 22 regressed), 16 unchanged.

@pentp
Copy link
Contributor Author

pentp commented Mar 17, 2021

Running jit-diff diff -o \dev\diffs -b --base_root \dev\ref-runtime\ --diff --core_root \dev\runtime\artifacts\bin\coreclr\windows.x64.Release\ -f shows this:

jit-diff -f

Can't get jit-diff -f --pmi to work because it has a couple of errors loading some weird version of System.Runtime (Could not load file or assembly 'System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a') and then fails with Warning: the base metric is 0, the diff metric is 0, have you used a release version?

@SingleAccretion
Copy link
Contributor

SingleAccretion commented Mar 17, 2021

Is it expected that running these commands takes a day to run?

Yep, the SPMI diffs are known to take a very long time. PMI diffs also take a lot of time.

--core_root \dev\runtime\artifacts\bin\coreclr\windows.x64.Release\

I don't think that's right. "Core root" is a special test folder, see about it here.

BTW, I believe the weird version is because it is searching for a prerelease version, and all of them have some combination of 42.

You could also try to diff the perf scores: jit-diff diff --metrics PerfScore.

@pentp
Copy link
Contributor Author

pentp commented Mar 17, 2021

PerfScore metrics need this fix first #49620 (otherwise shr and mul costs will be misleading).

Managed to get jit-diff -f --pmi output also now:

jit-diff -f
Crossgen CodeSize Diffs for System.Private.CoreLib.dll, framework assemblies for x64 default jit

Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 33284256
Total bytes of diff: 33284194
Total bytes of delta: -62 (-0,00% of base)
    diff is an improvement.


Top file regressions (bytes):
          30 : System.Private.CoreLib.dasm (0,00% of base)
           8 : System.Text.Json.dasm (0,00% of base)
           5 : System.Net.Http.dasm (0,00% of base)
           5 : System.Formats.Asn1.dasm (0,01% of base)
           3 : System.Data.Common.dasm (0,00% of base)

Top file improvements (bytes):
         -64 : System.Runtime.Numerics.dasm (-0,09% of base)
         -24 : System.Private.Xml.dasm (-0,00% of base)
         -14 : Newtonsoft.Json.dasm (-0,00% of base)
         -11 : System.Net.Sockets.dasm (-0,01% of base)

9 total files with Code Size differences (4 improved, 5 regressed), 262 unchanged.

Top method regressions (bytes):
          53 ( 7,21% of base) : System.Private.CoreLib.dasm - Utf8Formatter:TryFormatDateTimeG(DateTime,TimeSpan,Span`1,byref):bool
          41 ( 3,94% of base) : System.Private.CoreLib.dasm - DateTimeFormat:TryFormatO(DateTime,TimeSpan,Span`1,byref):bool
          40 ( 6,85% of base) : System.Private.CoreLib.dasm - Utf8Formatter:TryFormatDateTimeL(DateTime,Span`1,byref):bool
          40 ( 4,00% of base) : System.Private.CoreLib.dasm - Utf8Formatter:TryFormatDateTimeO(DateTime,TimeSpan,Span`1,byref):bool
          40 ( 6,85% of base) : System.Private.CoreLib.dasm - Utf8Formatter:TryFormatDateTimeR(DateTime,Span`1,byref):bool
          39 ( 5,26% of base) : System.Private.CoreLib.dasm - DateTimeFormat:TryFormatR(DateTime,TimeSpan,Span`1,byref):bool
          14 ( 8,38% of base) : System.Private.CoreLib.dasm - DateTimeFormat:WriteFourDecimalDigits(int,Span`1,int)
          14 ( 1,04% of base) : System.Private.CoreLib.dasm - TimeSpanFormat:TryFormatStandard(TimeSpan,int,String,Span`1,byref):bool
          14 ( 8,59% of base) : System.Private.CoreLib.dasm - FormattingHelpers:WriteFourDecimalDigits(int,Span`1,int)
           8 ( 0,60% of base) : System.Private.CoreLib.dasm - TimeZoneInfo:GetIsDaylightSavings(DateTime,AdjustmentRule,DaylightTimeStruct):bool
           8 ( 1,72% of base) : System.Text.Json.dasm - JsonWriterHelper:TrimDateTimeOffset(Span`1,byref)
           7 ( 0,98% of base) : System.Private.CoreLib.dasm - DecCalc:VarDecFromR4(float,byref)
           7 ( 1,13% of base) : System.Private.CoreLib.dasm - ISOWeek:ToDateTime(int,int,int):DateTime
           7 ( 5,51% of base) : System.Private.CoreLib.dasm - StandardFormat:Format(Span`1):int:this
           6 ( 0,61% of base) : System.Private.CoreLib.dasm - DateTime:.ctor(int,int,int,int,int,int,int):this (2 methods)
           5 ( 0,44% of base) : System.Net.Http.dasm - HttpWindowsProxy:.ctor(WinInetProxyHelper,SafeWinHttpHandle):this
           5 ( 0,19% of base) : System.Formats.Asn1.dasm - AsnDecoder:ParseGeneralizedTime(int,ReadOnlySpan`1):DateTimeOffset
           5 ( 0,95% of base) : System.Private.CoreLib.dasm - DateTime:.ctor(int,int,int,int,int,int,int,int):this
           4 ( 0,86% of base) : System.Private.CoreLib.dasm - DateTime:.ctor(int,int,int,int,int,int):this
           3 ( 0,54% of base) : System.Data.Common.dasm - SqlDecimal:Round(SqlDecimal,int,bool):SqlDecimal

Top method improvements (bytes):
         -65 (-2,70% of base) : System.Runtime.Numerics.dasm - BigNumber:FormatBigInteger(bool,BigInteger,String,ReadOnlySpan`1,NumberFormatInfo,Span`1,byref,byref):String
         -35 (-2,72% of base) : System.Private.CoreLib.dasm - DecCalc:ScaleResult(long,int,int):int
         -32 (-1,39% of base) : System.Private.CoreLib.dasm - TimeZoneInfo:GetIsDaylightSavingsFromUtc(DateTime,int,TimeSpan,AdjustmentRule,Nullable`1,byref,TimeZoneInfo):bool
         -26 (-3,96% of base) : System.Private.CoreLib.dasm - DecCalc:InternalRound(byref,int,int)
         -22 (-6,08% of base) : System.Private.CoreLib.dasm - DateTime:GetDatePart(int):int:this
         -21 (-3,94% of base) : System.Private.CoreLib.dasm - DecCalc:GetHashCode(byref):int
         -19 (-0,84% of base) : System.Private.CoreLib.dasm - TimeZoneInfo:TryCreateAdjustmentRules(String,byref,byref,byref,int):bool
         -18 (-5,42% of base) : System.Private.CoreLib.dasm - DateTime:GetDate(byref,byref,byref):this
         -15 (-3,46% of base) : System.Private.CoreLib.dasm - DecCalc:Unscale(byref,byref,byref)
         -15 (-6,22% of base) : System.Private.CoreLib.dasm - Number:TryUInt32ToDecStr(int,int,Span`1,byref):bool
         -14 (-7,14% of base) : Newtonsoft.Json.dasm - JsonTextWriter:WriteNumberToBuffer(int,bool):int:this
         -14 (-0,80% of base) : System.Private.CoreLib.dasm - DecCalc:VarDecDiv(byref,byref)
         -14 (-10,29% of base) : System.Private.CoreLib.dasm - DecCalc:DecDivMod1E9(byref):int
         -14 (-5,67% of base) : System.Private.CoreLib.dasm - Number:UInt32ToDecStr(int):String
         -13 (-14,94% of base) : System.Private.CoreLib.dasm - Number:Int64DivMod1E9(byref):int
         -13 (-1,84% of base) : System.Private.Xml.dasm - XsdDuration:TryToTimeSpan(int,byref):Exception:this
         -12 (-4,62% of base) : System.Private.CoreLib.dasm - Number:NegativeInt32ToDecStr(int,int,String):String
         -12 (-5,61% of base) : System.Private.CoreLib.dasm - Number:UInt32ToDecStr(int,int):String
         -11 (-0,45% of base) : System.Private.Xml.dasm - BigNumber:DblToRgbFast(double,ref,byref,byref):bool
         -10 (-6,49% of base) : System.Net.Sockets.dasm - IOControlKeepAlive:Get(SafeSocketHandle,int):int

Top method regressions (percentages):
          14 ( 8,59% of base) : System.Private.CoreLib.dasm - FormattingHelpers:WriteFourDecimalDigits(int,Span`1,int)
          14 ( 8,38% of base) : System.Private.CoreLib.dasm - DateTimeFormat:WriteFourDecimalDigits(int,Span`1,int)
          53 ( 7,21% of base) : System.Private.CoreLib.dasm - Utf8Formatter:TryFormatDateTimeG(DateTime,TimeSpan,Span`1,byref):bool
          40 ( 6,85% of base) : System.Private.CoreLib.dasm - Utf8Formatter:TryFormatDateTimeL(DateTime,Span`1,byref):bool
          40 ( 6,85% of base) : System.Private.CoreLib.dasm - Utf8Formatter:TryFormatDateTimeR(DateTime,Span`1,byref):bool
           7 ( 5,51% of base) : System.Private.CoreLib.dasm - StandardFormat:Format(Span`1):int:this
          39 ( 5,26% of base) : System.Private.CoreLib.dasm - DateTimeFormat:TryFormatR(DateTime,TimeSpan,Span`1,byref):bool
          40 ( 4,00% of base) : System.Private.CoreLib.dasm - Utf8Formatter:TryFormatDateTimeO(DateTime,TimeSpan,Span`1,byref):bool
          41 ( 3,94% of base) : System.Private.CoreLib.dasm - DateTimeFormat:TryFormatO(DateTime,TimeSpan,Span`1,byref):bool
           1 ( 3,23% of base) : System.Private.CoreLib.dasm - DateTime:DaysToYear(int):int
           2 ( 2,53% of base) : System.Private.CoreLib.dasm - FormattingHelpers:WriteTwoDecimalDigits(int,Span`1,int)
           2 ( 2,47% of base) : System.Private.CoreLib.dasm - DateTimeFormat:WriteTwoDecimalDigits(int,Span`1,int)
           1 ( 1,72% of base) : System.Private.CoreLib.dasm - DateTime:get_Hour():int:this
           8 ( 1,72% of base) : System.Text.Json.dasm - JsonWriterHelper:TrimDateTimeOffset(Span`1,byref)
           1 ( 1,52% of base) : System.Private.CoreLib.dasm - TimeSpanFormat:WriteTwoDigits(int,Span`1)
           1 ( 1,32% of base) : System.Runtime.Numerics.dasm - Number:Int32ToDecChars(long,byref,int,int)
           1 ( 1,16% of base) : System.Private.CoreLib.dasm - DateTime:IsLeapYear(int):bool
           1 ( 1,14% of base) : System.Private.CoreLib.dasm - FormattingHelpers:WriteDigits(int,Span`1)
           7 ( 1,13% of base) : System.Private.CoreLib.dasm - ISOWeek:ToDateTime(int,int,int):DateTime
           1 ( 1,11% of base) : System.Private.CoreLib.dasm - TimeSpanFormat:WriteDigits(int,Span`1)

Top method improvements (percentages):
         -13 (-14,94% of base) : System.Private.CoreLib.dasm - Number:Int64DivMod1E9(byref):int
         -14 (-10,29% of base) : System.Private.CoreLib.dasm - DecCalc:DecDivMod1E9(byref):int
          -8 (-9,52% of base) : System.Private.CoreLib.dasm - DateTime:get_Millisecond():int:this
          -5 (-7,35% of base) : System.Private.CoreLib.dasm - DateTime:get_DayOfWeek():int:this
         -14 (-7,14% of base) : Newtonsoft.Json.dasm - JsonTextWriter:WriteNumberToBuffer(int,bool):int:this
          -1 (-6,67% of base) : System.Net.Sockets.dasm - IOControlKeepAlive:MillisecondsToSeconds(int):int
         -10 (-6,49% of base) : System.Net.Sockets.dasm - IOControlKeepAlive:Get(SafeSocketHandle,int):int
         -15 (-6,22% of base) : System.Private.CoreLib.dasm - Number:TryUInt32ToDecStr(int,int,Span`1,byref):bool
         -22 (-6,08% of base) : System.Private.CoreLib.dasm - DateTime:GetDatePart(int):int:this
          -7 (-5,88% of base) : System.Private.CoreLib.dasm - DateTime:DaysInMonth(int,int):int
         -14 (-5,67% of base) : System.Private.CoreLib.dasm - Number:UInt32ToDecStr(int):String
         -12 (-5,61% of base) : System.Private.CoreLib.dasm - Number:UInt32ToDecStr(int,int):String
         -18 (-5,42% of base) : System.Private.CoreLib.dasm - DateTime:GetDate(byref,byref,byref):this
          -4 (-5,00% of base) : System.Private.CoreLib.dasm - FormattingHelpers:CountDigits(int):int
         -12 (-4,62% of base) : System.Private.CoreLib.dasm - Number:NegativeInt32ToDecStr(int,int,String):String
          -8 (-4,47% of base) : System.Private.CoreLib.dasm - DateTime:GetTime(byref,byref,byref,byref):this
         -26 (-3,96% of base) : System.Private.CoreLib.dasm - DecCalc:InternalRound(byref,int,int)
         -21 (-3,94% of base) : System.Private.CoreLib.dasm - DecCalc:GetHashCode(byref):int
          -4 (-3,51% of base) : System.Private.CoreLib.dasm - Number:UInt32ToDecChars(long,int,int):long (2 methods)
         -15 (-3,46% of base) : System.Private.CoreLib.dasm - DecCalc:Unscale(byref,byref,byref)

84 total methods with Code Size differences (37 improved, 47 regressed), 201069 unchanged.
jit-diff -f --pmi
Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 53722904
Total bytes of diff: 53722680
Total bytes of delta: -224 (-0,00% of base)
    diff is an improvement.


Top file regressions (bytes):
          26 : System.Text.Json.dasm (0,00% of base)
           6 : Microsoft.VisualBasic.Core.dasm (0,00% of base)
           1 : System.Net.Http.dasm (0,00% of base)

Top file improvements (bytes):
         -50 : System.Private.Xml.dasm (-0,00% of base)
         -49 : System.Runtime.Numerics.dasm (-0,07% of base)
         -34 : System.Formats.Asn1.dasm (-0,04% of base)
         -31 : Newtonsoft.Json.dasm (-0,00% of base)
         -22 : System.Private.CoreLib.dasm (-0,00% of base)
         -16 : System.Data.Common.dasm (-0,00% of base)
         -11 : System.Data.Odbc.dasm (-0,01% of base)
         -11 : System.Data.OleDb.dasm (-0,00% of base)
         -11 : Microsoft.CodeAnalysis.VisualBasic.dasm (-0,00% of base)
         -11 : System.Net.Sockets.dasm (-0,01% of base)
         -11 : Newtonsoft.Json.Bson.dasm (-0,01% of base)

14 total files with Code Size differences (11 improved, 3 regressed), 257 unchanged.

Top method regressions (bytes):
          53 ( 7,06% of base) : System.Private.CoreLib.dasm - Utf8Formatter:TryFormatDateTimeG(DateTime,TimeSpan,Span`1,byref):bool
          41 ( 3,95% of base) : System.Private.CoreLib.dasm - DateTimeFormat:TryFormatO(DateTime,TimeSpan,Span`1,byref):bool
          40 ( 6,83% of base) : System.Private.CoreLib.dasm - Utf8Formatter:TryFormatDateTimeL(DateTime,Span`1,byref):bool
          40 ( 3,93% of base) : System.Private.CoreLib.dasm - Utf8Formatter:TryFormatDateTimeO(DateTime,TimeSpan,Span`1,byref):bool
          40 ( 6,83% of base) : System.Private.CoreLib.dasm - Utf8Formatter:TryFormatDateTimeR(DateTime,Span`1,byref):bool
          39 ( 5,29% of base) : System.Private.CoreLib.dasm - DateTimeFormat:TryFormatR(DateTime,TimeSpan,Span`1,byref):bool
          25 ( 5,83% of base) : System.Text.Json.dasm - JsonWriterHelper:TrimDateTimeOffset(Span`1,byref)
          14 ( 8,38% of base) : System.Private.CoreLib.dasm - DateTimeFormat:WriteFourDecimalDigits(int,Span`1,int)
          14 ( 1,04% of base) : System.Private.CoreLib.dasm - TimeSpanFormat:TryFormatStandard(TimeSpan,int,String,Span`1,byref):bool
          14 ( 8,59% of base) : System.Private.CoreLib.dasm - FormattingHelpers:WriteFourDecimalDigits(int,Span`1,int)
          10 ( 2,07% of base) : System.Private.CoreLib.dasm - UmAlQuraCalendar:InitDateMapping():ref
           9 ( 1,29% of base) : System.Private.CoreLib.dasm - ISOWeek:ToDateTime(int,int,int):DateTime
           7 ( 0,90% of base) : System.Private.CoreLib.dasm - DecCalc:VarDecFromR4(float,byref)
           7 ( 2,11% of base) : System.Private.CoreLib.dasm - EraInfo:.ctor(int,int,int,int,int,int,int,String,String,String):this
           6 ( 0,56% of base) : Microsoft.VisualBasic.Core.dasm - DateAndTime:DateSerial(int,int,int):DateTime
           6 ( 4,84% of base) : System.Private.CoreLib.dasm - StandardFormat:Format(Span`1):int:this
           6 ( 0,36% of base) : System.Private.Xml.dasm - XsdDateTime:op_Implicit(XsdDateTime):DateTime
           6 ( 0,47% of base) : System.Private.Xml.dasm - XsdDateTime:op_Implicit(XsdDateTime):DateTimeOffset
           5 ( 1,13% of base) : System.Private.CoreLib.dasm - DateTime:TryCreate(int,int,int,int,int,int,int,byref):bool
           5 ( 1,82% of base) : System.Private.CoreLib.dasm - EraInfo:.ctor(int,int,int,int,int,int,int):this

Top method improvements (bytes):
         -50 (-2,13% of base) : System.Runtime.Numerics.dasm - BigNumber:FormatBigInteger(bool,BigInteger,String,ReadOnlySpan`1,NumberFormatInfo,Span`1,byref,byref):String
         -34 (-0,92% of base) : System.Formats.Asn1.dasm - AsnDecoder:ParseGeneralizedTime(int,ReadOnlySpan`1):DateTimeOffset
         -32 (-1,45% of base) : System.Private.CoreLib.dasm - TimeZoneInfo:GetIsDaylightSavingsFromUtc(DateTime,int,TimeSpan,AdjustmentRule,Nullable`1,byref,TimeZoneInfo):bool
         -32 (-1,27% of base) : System.Private.Xml.dasm - BigNumber:DblToRgbFast(double,ref,byref,byref):bool
         -24 (-3,54% of base) : System.Private.CoreLib.dasm - DecCalc:InternalRound(byref,int,int)
         -21 (-3,94% of base) : System.Private.CoreLib.dasm - DecCalc:GetHashCode(byref):int
         -20 (-9,13% of base) : Newtonsoft.Json.dasm - JsonTextWriter:WriteNumberToBuffer(int,bool):int:this
         -19 (-0,82% of base) : System.Private.CoreLib.dasm - TimeZoneInfo:TryCreateAdjustmentRules(String,byref,byref,byref,int):bool
         -18 (-1,42% of base) : System.Private.CoreLib.dasm - TimeZoneInfo:GetIsDaylightSavings(DateTime,AdjustmentRule,DaylightTimeStruct):bool
         -16 (-2,51% of base) : System.Data.Common.dasm - SqlDecimal:Round(SqlDecimal,int,bool):SqlDecimal
         -16 (-1,23% of base) : System.Private.CoreLib.dasm - DecCalc:ScaleResult(long,int,int):int
         -16 (-6,08% of base) : System.Private.CoreLib.dasm - Number:NegativeInt32ToDecStr(int,int,String):String
         -15 (-6,25% of base) : System.Private.CoreLib.dasm - Number:TryUInt32ToDecStr(int,int,Span`1,byref):bool
         -15 (-3,46% of base) : System.Private.CoreLib.dasm - DecCalc:Unscale(byref,byref,byref)
         -14 (-1,55% of base) : System.Private.CoreLib.dasm - DateTime:.ctor(int,int,int,int,int,int,int):this (2 methods)
         -14 (-0,78% of base) : System.Private.CoreLib.dasm - DecCalc:VarDecDiv(byref,byref)
         -14 (-10,29% of base) : System.Private.CoreLib.dasm - DecCalc:DecDivMod1E9(byref):int
         -13 (-4,04% of base) : System.Private.CoreLib.dasm - DateTime:GetDate(byref,byref,byref):this
         -13 (-14,94% of base) : System.Private.CoreLib.dasm - Number:Int64DivMod1E9(byref):int
         -13 (-2,03% of base) : System.Private.Xml.dasm - XsdDuration:TryToTimeSpan(int,byref):Exception:this

Top method regressions (percentages):
          14 ( 8,59% of base) : System.Private.CoreLib.dasm - FormattingHelpers:WriteFourDecimalDigits(int,Span`1,int)
          14 ( 8,38% of base) : System.Private.CoreLib.dasm - DateTimeFormat:WriteFourDecimalDigits(int,Span`1,int)
          53 ( 7,06% of base) : System.Private.CoreLib.dasm - Utf8Formatter:TryFormatDateTimeG(DateTime,TimeSpan,Span`1,byref):bool
          40 ( 6,83% of base) : System.Private.CoreLib.dasm - Utf8Formatter:TryFormatDateTimeL(DateTime,Span`1,byref):bool
          40 ( 6,83% of base) : System.Private.CoreLib.dasm - Utf8Formatter:TryFormatDateTimeR(DateTime,Span`1,byref):bool
          25 ( 5,83% of base) : System.Text.Json.dasm - JsonWriterHelper:TrimDateTimeOffset(Span`1,byref)
          39 ( 5,29% of base) : System.Private.CoreLib.dasm - DateTimeFormat:TryFormatR(DateTime,TimeSpan,Span`1,byref):bool
           6 ( 4,84% of base) : System.Private.CoreLib.dasm - StandardFormat:Format(Span`1):int:this
          41 ( 3,95% of base) : System.Private.CoreLib.dasm - DateTimeFormat:TryFormatO(DateTime,TimeSpan,Span`1,byref):bool
          40 ( 3,93% of base) : System.Private.CoreLib.dasm - Utf8Formatter:TryFormatDateTimeO(DateTime,TimeSpan,Span`1,byref):bool
           1 ( 3,23% of base) : System.Private.CoreLib.dasm - DateTime:DaysToYear(int):int
           2 ( 2,53% of base) : System.Private.CoreLib.dasm - FormattingHelpers:WriteTwoDecimalDigits(int,Span`1,int)
           2 ( 2,47% of base) : System.Private.CoreLib.dasm - DateTimeFormat:WriteTwoDecimalDigits(int,Span`1,int)
           7 ( 2,11% of base) : System.Private.CoreLib.dasm - EraInfo:.ctor(int,int,int,int,int,int,int,String,String,String):this
           5 ( 2,08% of base) : System.Private.CoreLib.dasm - DateMapping:.ctor(int,int,int,int):this
          10 ( 2,07% of base) : System.Private.CoreLib.dasm - UmAlQuraCalendar:InitDateMapping():ref
           5 ( 1,82% of base) : System.Private.CoreLib.dasm - EraInfo:.ctor(int,int,int,int,int,int,int):this
           1 ( 1,72% of base) : System.Private.CoreLib.dasm - DateTime:get_Hour():int:this
           1 ( 1,52% of base) : System.Private.CoreLib.dasm - TimeSpanFormat:WriteTwoDigits(int,Span`1)
           1 ( 1,32% of base) : System.Runtime.Numerics.dasm - Number:Int32ToDecChars(long,byref,int,int)

Top method improvements (percentages):
         -13 (-14,94% of base) : System.Private.CoreLib.dasm - Number:Int64DivMod1E9(byref):int
          -6 (-11,76% of base) : System.Private.CoreLib.dasm - FormattingHelpers:CountDecimalTrailingZeros(int,byref):int
         -14 (-10,29% of base) : System.Private.CoreLib.dasm - DecCalc:DecDivMod1E9(byref):int
          -8 (-9,52% of base) : System.Private.CoreLib.dasm - DateTime:get_Millisecond():int:this
         -20 (-9,13% of base) : Newtonsoft.Json.dasm - JsonTextWriter:WriteNumberToBuffer(int,bool):int:this
          -5 (-7,35% of base) : System.Private.CoreLib.dasm - DateTime:get_DayOfWeek():int:this
          -1 (-6,67% of base) : System.Net.Sockets.dasm - IOControlKeepAlive:MillisecondsToSeconds(int):int
         -15 (-6,25% of base) : System.Private.CoreLib.dasm - Number:TryUInt32ToDecStr(int,int,Span`1,byref):bool
         -16 (-6,08% of base) : System.Private.CoreLib.dasm - Number:NegativeInt32ToDecStr(int,int,String):String
         -10 (-6,02% of base) : System.Net.Sockets.dasm - IOControlKeepAlive:Get(SafeSocketHandle,int):int
          -7 (-5,69% of base) : System.Private.CoreLib.dasm - DateTime:DaysInMonth(int,int):int
         -12 (-5,69% of base) : System.Private.CoreLib.dasm - Number:UInt32ToDecStr(int,int):String
          -4 (-5,00% of base) : System.Private.CoreLib.dasm - FormattingHelpers:CountDigits(int):int
          -8 (-4,47% of base) : System.Private.CoreLib.dasm - DateTime:GetTime(byref,byref,byref,byref):this
         -11 (-4,14% of base) : System.Private.CoreLib.dasm - Number:UInt32ToDecStr(int):String
         -13 (-4,04% of base) : System.Private.CoreLib.dasm - DateTime:GetDate(byref,byref,byref):this
         -21 (-3,94% of base) : System.Private.CoreLib.dasm - DecCalc:GetHashCode(byref):int
         -24 (-3,54% of base) : System.Private.CoreLib.dasm - DecCalc:InternalRound(byref,int,int)
          -4 (-3,51% of base) : System.Private.CoreLib.dasm - Number:UInt32ToDecChars(long,int,int):long (2 methods)
         -15 (-3,46% of base) : System.Private.CoreLib.dasm - DecCalc:Unscale(byref,byref,byref)

97 total methods with Code Size differences (59 improved, 38 regressed), 268164 unchanged.

Analyzed some of the regressions and they come from LSRA using different registers now that mul doesn't kill edx:eax all the time and dividend isn't used multiple times.
The rest is from instruction encoding size increases (REX.W, imul > mul, etc.).

Utf8Formatter:TryFormat +110: https://www.diffchecker.com/K4Bjp6kS
JsonWriterHelper:TrimDateTimeOffset +15: https://www.diffchecker.com/wkBdUIRK

BigNumber:FormatBigInteger -62: https://www.diffchecker.com/t7nMVJQY
DecCalc:ScaleResult -45: https://www.diffchecker.com/qUH8So3z

Instruction count change is more clearly in one direction:

jit-diff -f -m InstrCount
Summary of Instruction Count diffs:
(Lower is better)

Total Instructions of base: 9061183
Total Instructions of diff: 9060867
Total Instructions of delta: -316 (-0,00% of base)
    diff is an improvement.


Top file regressions (Instructions):
           1 : System.Formats.Asn1.dasm (0,01% of base)
           1 : System.Net.Http.dasm (0,00% of base)

Top file improvements (Instructions):
        -266 : System.Private.CoreLib.dasm (-0,03% of base)
         -26 : System.Runtime.Numerics.dasm (-0,13% of base)
         -10 : System.Net.Sockets.dasm (-0,02% of base)
         -10 : System.Private.Xml.dasm (-0,00% of base)
          -5 : Newtonsoft.Json.dasm (-0,00% of base)
          -1 : System.Text.Json.dasm (-0,00% of base)

8 total files with Instruction Count differences (6 improved, 2 regressed), 263 unchanged.

Top method regressions (Instructions):
           4 ( 1,99% of base) : System.Private.CoreLib.dasm - DateTimeFormat:TryFormatR(DateTime,TimeSpan,Span`1,byref):bool
           4 ( 2,23% of base) : System.Private.CoreLib.dasm - Utf8Formatter:TryFormatDateTimeL(DateTime,Span`1,byref):bool
           4 ( 2,23% of base) : System.Private.CoreLib.dasm - Utf8Formatter:TryFormatDateTimeR(DateTime,Span`1,byref):bool
           3 ( 1,35% of base) : System.Private.CoreLib.dasm - Utf8Formatter:TryFormatDateTimeG(DateTime,TimeSpan,Span`1,byref):bool
           1 ( 0,17% of base) : System.Formats.Asn1.dasm - AsnDecoder:ParseGeneralizedTime(int,ReadOnlySpan`1):DateTimeOffset
           1 ( 0,34% of base) : System.Net.Http.dasm - HttpWindowsProxy:.ctor(WinInetProxyHelper,SafeWinHttpHandle):this
           1 ( 0,35% of base) : System.Private.CoreLib.dasm - DateTimeFormat:TryFormatO(DateTime,TimeSpan,Span`1,byref):bool

Top method improvements (Instructions):
         -28 (-6,80% of base) : System.Private.CoreLib.dasm - DecCalc:ScaleResult(long,int,int):int
         -24 (-3,75% of base) : System.Runtime.Numerics.dasm - BigNumber:FormatBigInteger(bool,BigInteger,String,ReadOnlySpan`1,NumberFormatInfo,Span`1,byref,byref):String
         -13 (-8,13% of base) : System.Private.CoreLib.dasm - DecCalc:GetHashCode(byref):int
         -13 (-5,91% of base) : System.Private.CoreLib.dasm - DecCalc:InternalRound(byref,int,int)
         -13 (-10,74% of base) : System.Private.CoreLib.dasm - DateTime:GetDatePart(int):int:this
         -13 (-12,04% of base) : System.Private.CoreLib.dasm - DateTime:GetDate(byref,byref,byref):this
         -11 (-1,89% of base) : System.Private.CoreLib.dasm - TimeZoneInfo:GetIsDaylightSavingsFromUtc(DateTime,int,TimeSpan,AdjustmentRule,Nullable`1,byref,TimeZoneInfo):bool
         -11 (-1,79% of base) : System.Private.CoreLib.dasm - TimeZoneInfo:TryCreateAdjustmentRules(String,byref,byref,byref,int):bool
         -11 (-2,78% of base) : System.Private.CoreLib.dasm - TimeSpanFormat:TryFormatStandard(TimeSpan,int,String,Span`1,byref):bool
         -11 (-2,81% of base) : System.Private.CoreLib.dasm - Utf8Formatter:TryFormat(TimeSpan,Span`1,byref,StandardFormat):bool
          -8 (-14,81% of base) : System.Net.Sockets.dasm - IOControlKeepAlive:Get(SafeSocketHandle,int):int
          -8 (-10,39% of base) : System.Private.CoreLib.dasm - Number:TryUInt32ToDecStr(int,int,Span`1,byref):bool
          -8 (-2,33% of base) : System.Private.CoreLib.dasm - TimeZoneInfo:GetIsDaylightSavings(DateTime,AdjustmentRule,DaylightTimeStruct):bool
          -7 (-5,65% of base) : System.Private.CoreLib.dasm - DecCalc:Unscale(byref,byref,byref)
          -7 (-1,22% of base) : System.Private.Xml.dasm - BigNumber:DblToRgbFast(double,ref,byref,byref):bool
          -6 (-7,32% of base) : System.Private.CoreLib.dasm - Number:UInt32ToDecStr(int):String
          -6 (-2,36% of base) : System.Private.CoreLib.dasm - TimeZoneInfo:TransitionTimeToDateTime(int,TransitionTime):DateTime
          -5 (-8,20% of base) : Newtonsoft.Json.dasm - JsonTextWriter:WriteNumberToBuffer(int,bool):int:this
          -5 (-1,06% of base) : System.Private.CoreLib.dasm - DecCalc:VarDecDiv(byref,byref)
          -5 (-13,16% of base) : System.Private.CoreLib.dasm - DecCalc:DecDivMod1E9(byref):int

Top method regressions (percentages):
           4 ( 2,23% of base) : System.Private.CoreLib.dasm - Utf8Formatter:TryFormatDateTimeL(DateTime,Span`1,byref):bool
           4 ( 2,23% of base) : System.Private.CoreLib.dasm - Utf8Formatter:TryFormatDateTimeR(DateTime,Span`1,byref):bool
           4 ( 1,99% of base) : System.Private.CoreLib.dasm - DateTimeFormat:TryFormatR(DateTime,TimeSpan,Span`1,byref):bool
           3 ( 1,35% of base) : System.Private.CoreLib.dasm - Utf8Formatter:TryFormatDateTimeG(DateTime,TimeSpan,Span`1,byref):bool
           1 ( 0,35% of base) : System.Private.CoreLib.dasm - DateTimeFormat:TryFormatO(DateTime,TimeSpan,Span`1,byref):bool
           1 ( 0,34% of base) : System.Net.Http.dasm - HttpWindowsProxy:.ctor(WinInetProxyHelper,SafeWinHttpHandle):this
           1 ( 0,17% of base) : System.Formats.Asn1.dasm - AsnDecoder:ParseGeneralizedTime(int,ReadOnlySpan`1):DateTimeOffset

Top method improvements (percentages):
          -2 (-33,33% of base) : System.Net.Sockets.dasm - IOControlKeepAlive:MillisecondsToSeconds(int):int
          -5 (-23,81% of base) : System.Private.CoreLib.dasm - DateTime:get_DayOfWeek():int:this
          -5 (-21,74% of base) : System.Private.CoreLib.dasm - Number:Int64DivMod1E9(byref):int
          -3 (-15,00% of base) : System.Private.CoreLib.dasm - DateTime:get_Millisecond():int:this
          -8 (-14,81% of base) : System.Net.Sockets.dasm - IOControlKeepAlive:Get(SafeSocketHandle,int):int
          -4 (-14,81% of base) : System.Private.CoreLib.dasm - FormattingHelpers:CountDigits(int):int
          -5 (-13,16% of base) : System.Private.CoreLib.dasm - DecCalc:DecDivMod1E9(byref):int
         -13 (-12,04% of base) : System.Private.CoreLib.dasm - DateTime:GetDate(byref,byref,byref):this
          -2 (-11,11% of base) : System.Private.CoreLib.dasm - FormattingHelpers:CountDecimalTrailingZeros(int,byref):int
         -13 (-10,74% of base) : System.Private.CoreLib.dasm - DateTime:GetDatePart(int):int:this
          -8 (-10,39% of base) : System.Private.CoreLib.dasm - Number:TryUInt32ToDecStr(int,int,Span`1,byref):bool
          -1 (-9,09% of base) : System.Private.CoreLib.dasm - DateTime:DaysToYear(int):int
          -5 (-8,20% of base) : Newtonsoft.Json.dasm - JsonTextWriter:WriteNumberToBuffer(int,bool):int:this
         -13 (-8,13% of base) : System.Private.CoreLib.dasm - DecCalc:GetHashCode(byref):int
          -2 (-7,69% of base) : System.Runtime.Numerics.dasm - Number:Int32ToDecChars(long,byref,int,int)
          -6 (-7,32% of base) : System.Private.CoreLib.dasm - Number:UInt32ToDecStr(int):String
         -28 (-6,80% of base) : System.Private.CoreLib.dasm - DecCalc:ScaleResult(long,int,int):int
          -3 (-6,38% of base) : System.Private.CoreLib.dasm - DateTime:GetTime(byref,byref,byref,byref):this
          -1 (-6,25% of base) : System.Private.CoreLib.dasm - DateTime:get_Hour():int:this
         -13 (-5,91% of base) : System.Private.CoreLib.dasm - DecCalc:InternalRound(byref,int,int)

86 total methods with Instruction Count differences (79 improved, 7 regressed), 201067 unchanged.

@pentp
Copy link
Contributor Author

pentp commented Mar 23, 2021

@tannergooding could you review this now or is there something else that I should add?
I checked the AMD manual also and it has the same two (out of 3) algorithms as described by ridiculous_fish. For the "round-down" variant it only has the distributed multiply code-gen option which could theoretically give an additional 4-5% boost at the cost of increased code size or a temporary register. The only optimization not covered is remainder for division by constants that have the high bit set (division is already converted to compare by RyuJit), but this could probably be a separate PR.

@tannergooding
Copy link
Member

I will be able to give this a review tomorrow. Assigning myself.

@tannergooding tannergooding self-assigned this Mar 24, 2021
@tannergooding
Copy link
Member

The math in https://ridiculousfish.com/files/faster_unsigned_division_by_constants.pdf looks to check out. That being said, it looks like LLVM, GCC, nor MSVC have adopted this nearly 10 years later and I can't seem to find any other major compile that has done so either.

It's unclear to me why given the problem space this is attempting to solve.

@pentp
Copy link
Contributor Author

pentp commented Mar 31, 2021

I guess someone has to be the first for progress to occur. The math/proofs look solid to me and the gains are real.
The AMD manual also contains the same classic round-up and the newer (1988) round-down variants (without the proofs, but with reference to "Integer Multiplication and Division on the HP Precision Architecture."), with just a slightly different codegen (but same math).

@tannergooding
Copy link
Member

Thanks for the references. I've not finished going through the math in the actual PR yet but hope to have time to finish that this week.

If no one else has any concerns, I'd be fine with bringing this forward and getting the right sign-off from the JIT side.

@JulieLeeMSFT
Copy link
Member

@dotnet/jit-contrib PTAL.

@JulieLeeMSFT JulieLeeMSFT added this to the 6.0.0 milestone Apr 26, 2021
@tannergooding
Copy link
Member

ping @dotnet/jit-contrib, this still needs the JIT side changes reviewed.

@AndyAyersMS
Copy link
Member

@EgorBo can you shepherd this one?

@EgorBo
Copy link
Member

EgorBo commented May 11, 2021

I tried to write a bit more complicated tests (e.g. https://gist.github.com/EgorBo/c576fe71bc928c337713c6970949ff14) but couldn't find any regressions (on xarch).
However, there were a couple of bugs reported in https://github.com/ridiculousfish/libdivide/issues?q=is%3Aissue+is%3Aclosed recently - are they related?

Overall, assuming that the License is used correctly - LGTM

@pentp
Copy link
Contributor Author

pentp commented May 12, 2021

The bugs are for libdivide library which is not used here, the reference code for the original paper is just hosted in the same repo.

@pentp
Copy link
Contributor Author

pentp commented May 17, 2021

So can this be merged? (I don't have write access)

@tannergooding
Copy link
Member

/azp run runtime-coreclr jitstress, runtime-coreclr outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@tannergooding
Copy link
Member

So can this be merged? (I don't have write access)

I've queued the outerloop jobs for some additional validation and will set the auto-merge label.

@ghost
Copy link

ghost commented May 18, 2021

Hello @tannergooding!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit e4b4807 into dotnet:main May 18, 2021
@tannergooding
Copy link
Member

That didn't quite work like I intended -.-

Will check the job results in the morning, hopefully nothing crops up.

@AaronRobinsonMSFT
Copy link
Member

@tannergooding I think something has cropped up.

Generating native image of System.Private.CoreLib for windows.x86.Debug. Logging to D:\workspace\_work\1\s\artifacts\log\CrossgenCoreLib_windows__x86__Debug.log
  D:\workspace\_work\1\s\dotnet.cmd D:\workspace\_work\1\s\artifacts\bin\coreclr\windows.x86.Debug\x64\crossgen2\crossgen2.dll -o:D:\workspace\_work\1\s\artifacts\bin\coreclr\windows.x86.Debug\System.Private.CoreLib.dll -r:D:\workspace\_work\1\s\artifacts\bin\coreclr\windows.x86.Debug\IL\*.dll --targetarch:x86 -O D:\workspace\_work\1\s\artifacts\bin\coreclr\windows.x86.Debug\IL\System.Private.CoreLib.dll --pdb --pdb-path:D:\workspace\_work\1\s\artifacts\bin\coreclr\windows.x86.Debug\PDB
  D:\workspace\_work\1\s\.dotnet
  D:\workspace\_work\1\s\src\coreclr\jit\emitxarch.cpp:4351

Assertion failed '!"Please use emitIns_Mov() to correctly handle move elision"' in 'System.DateTime:get_DayOfWeek():int:this' during 'Generate code' (IL size 22)
  
D:\workspace\_work\1\s\src\coreclr\crossgen-corelib.proj(133,5): error MSB3073: The command "D:\workspace\_work\1\s\dotnet.cmd D:\workspace\_work\1\s\artifacts\bin\coreclr\windows.x86.Debug\x64\crossgen2\crossgen2.dll -o:D:\workspace\_work\1\s\artifacts\bin\coreclr\windows.x86.Debug\System.Private.CoreLib.dll -r:D:\workspace\_work\1\s\artifacts\bin\coreclr\windows.x86.Debug\IL\*.dll --targetarch:x86 -O D:\workspace\_work\1\s\artifacts\bin\coreclr\windows.x86.Debug\IL\System.Private.CoreLib.dll --pdb --pdb-path:D:\workspace\_work\1\s\artifacts\bin\coreclr\windows.x86.Debug\PDB" exited with code -2147483645.
##[error]src\coreclr\crossgen-corelib.proj(133,5): error MSB3073: (NETCORE_ENGINEERING_TELEMETRY=Build) The command "D:\workspace\_work\1\s\dotnet.cmd D:\workspace\_work\1\s\artifacts\bin\coreclr\windows.x86.Debug\x64\crossgen2\crossgen2.dll -o:D:\workspace\_work\1\s\artifacts\bin\coreclr\windows.x86.Debug\System.Private.CoreLib.dll -r:D:\workspace\_work\1\s\artifacts\bin\coreclr\windows.x86.Debug\IL\*.dll --targetarch:x86 -O D:\workspace\_work\1\s\artifacts\bin\coreclr\windows.x86.Debug\IL\System.Private.CoreLib.dll --pdb --pdb-path:D:\workspace\_work\1\s\artifacts\bin\coreclr\windows.x86.Debug\PDB" exited with code -2147483645.

@AaronRobinsonMSFT
Copy link
Member

This repos locally on TIP but builds without issue on the previous commit.

@pentp
Copy link
Contributor Author

pentp commented May 18, 2021

This is some new check from #52661 and it looks like it's not an actual bug. I'll rebase and create a new PR.

@pentp pentp deleted the div2 branch May 18, 2021 09:53
@tannergooding
Copy link
Member

This is some new check from #52661 and it looks like it's not an actual bug.

Right, I tried to ensure that we'd still do the right thing in case there were any missed code paths in the refactoring and to cover cases like this by asserting so we could get them updated.

@AntonLapounov
Copy link
Member

Has anyone looked at codegen differences for ARM64?

@ghost ghost locked as resolved and limited conversation to collaborators Jun 26, 2021
This pull request was closed.
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.

10 participants