Skip to content

[Perf] BigInteger formatting performance regression in .NET 9 #111708

Closed

Description

@xakep139

Description

After reading Performance Improvements in .NET 9 related to BigInteger, I've noticed a comment indicating that C# has poor performance compared to other programming languages in terms of big integer calculations. After quick investigation, it turned out that half of the time in https://github.com/hanabi1224/Programming-Language-Benchmarks/blob/main/bench/algorithm/edigits/1.cs is spent on formatting of a big integer. On .NET 8 it's done twice as fast, even though there were performance optimizations made in .NET 9.

Here's a benchmark code that shows the issue:

using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
using System.Numerics;

BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(args);

[MemoryDiagnoser(false)]
[HideColumns("Job", "Error", "StdDev", "Median", "RatioSD")]
public class Tests
{
    private char[] _dest = new char[1_000_000];

    private BigInteger _value =
        BigInteger.Pow(BigInteger.Parse(string.Concat(Enumerable.Repeat("1234567890", 30))), 1_000);

    [Benchmark(Baseline = true)]
    public string Stringify() => _value.ToString();

    [Benchmark]
    public bool TryFormat() => _value.TryFormat(_dest, out _);
}

Configuration

BenchmarkDotNet v0.14.0, Windows 11 (10.0.26100.2894)
AMD Ryzen 9 4900H with Radeon Graphics, 1 CPU, 16 logical and 8 physical cores
.NET SDK 9.0.102
  [Host]     : .NET 8.0.12 (8.0.1224.60305), X64 RyuJIT AVX2
  Job-TESATW : .NET 8.0.12 (8.0.1224.60305), X64 RyuJIT AVX2
  Job-VBXNCI : .NET 9.0.1 (9.0.124.61010), X64 RyuJIT AVX2

Regression?

Yes. The same code on .NET 8 executes ~3 times faster (but with much more memory being allocated).

Data

| Method    | Runtime  | Mean    | Ratio | Allocated | Alloc Ratio |
|---------- |--------- |--------:|------:|----------:|------------:|
| Stringify | .NET 8.0 | 1.009 s |  1.00 | 1303.9 KB |       1.000 |
| TryFormat | .NET 8.0 | 1.005 s |  1.00 | 719.71 KB |       0.552 |
| Stringify | .NET 9.0 | 3.657 s |  3.62 | 585.23 KB |       0.449 |
| TryFormat | .NET 9.0 | 3.657 s |  3.63 |   1.05 KB |       0.001 |

Analysis

This regression might be caused by the #100181, but I haven't thoroughly tested that regression on older codebase.
The regression is reproduced on really big integers (order of magnitude 1000+).

Activity

  1. added
    tenet-performance
    on Jan 22, 2025
  2. added
    untriaged
    on Jan 22, 2025
  3. xakep139 commented on Jan 22, 2025

    @xakep139
    ContributorAuthor
  4. dotnet-policy-service commented on Jan 22, 2025

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @dotnet/area-system-numerics
    See info in area-owners.md if you want to be subscribed.

  5. EgorBo commented on Jan 22, 2025

    @EgorBo
  6. EgorBo commented on Jan 22, 2025

    @EgorBo
    Member

    The bot can repro the regression too, perf points to Math.DivRem(..., TenPowMaxPartial) as the hottest place, but I might be wrong interpretating it

  7. EgorBo commented on Jan 22, 2025

    @EgorBo
  8. EgorBo commented on Jan 22, 2025

    @EgorBo
  9. kzrnm commented on Feb 6, 2025

    @kzrnm
  10. kzrnm commented on Feb 10, 2025

    @kzrnm
  11. added
    in-pr
    on Feb 11, 2025
  12. kzrnm commented on Mar 3, 2025

    @kzrnm
    Contributor

    The regression has been occurring since #106360. The DLL right after the build has no issues, but the DLL after crossgen seems to have a regression.

    The size of System.Runtime.Numerics.dll after crossgen is different.

    @EgorBo

    Reproduce

    The performance-simple directory contains benchmark projects.

    Set-Location $Root\runtime
    (Get-Process | Where-Object Name -eq dotnet).Kill()
    Remove-Item -Recurse ./artifacts
    ./build.cmd clr+libs -rc release -lc release -arch x64
    Set-Location $Root\runtime\src\coreclr\tools\aot\crossgen2
    dotnet build -c Release crossgen2.csproj
    Set-Location $Root\performance-simple\coreruns
    Remove-Item -Recurse main -Force
    $cr = "$Root\performance-simple\coreruns"
    Copy-Item -Recurse "$Root\runtime\artifacts\bin\testhost\net9.0-windows-Release-x64\shared\Microsoft.NETCore.App\9.0.0" "$cr\main"
    Copy-Item -Recurse "$Root\runtime\artifacts\bin\testhost\net9.0-windows-Release-x64\shared\Microsoft.NETCore.App\9.0.0" "$cr\cros"
    dotnet $Root\runtime\artifacts\bin\coreclr\windows.x64.Release\crossgen2\crossgen2.dll "$cr\main\System.Runtime.Numerics.dll" "$cr\main\System.Private.CoreLib.dll" "$cr\main\System.Runtime.dll"  --out "$cr\cros\System.Runtime.Numerics.dll"
    Get-ChildItem .\*\System.Runtime.Numerics.dll, $Root\runtime\artifacts\bin\coreclr\windows.x64.Release\crossgen2\crossgen2.dll, $Root\performance-simple\coreruns\pr\System.Private.CoreLib.dll, $Root\performance-simple\coreruns\pr\System.Runtime.dll
    Set-Location $Root\performance-simple
    dotnet run -c Release -- --coreRun coreruns\$Coreruns -m -j short
  13. kzrnm commented on Mar 5, 2025

    @kzrnm
  14. kzrnm commented on Mar 5, 2025

    @kzrnm
    Contributor
    using System.Diagnostics;
    using System.Numerics;
    
    
    Stopwatch.StartNew().Stop();
    var num = BigInteger.One << (1 << 20);
    Console.WriteLine("↑↑↑↑ Warm up↑↑↑↑");
    Console.WriteLine("↓↓↓↓ToString↓↓↓↓");
    
    var sw = Stopwatch.StartNew();
    var str = num.ToString("E9", null);
    sw.Stop();
    Console.WriteLine($"ToString {str}");
    Console.WriteLine($"{sw.ElapsedMilliseconds} ms");
    Console.WriteLine("---------------");
    $env:DOTNET_JitDisasmSummary=1
    dir .\coreruns\*\corerun.exe | %{ Resolve-Path $_ -Relative; & "$_" .\bin\Release\net9.0\Console.dll} > result.txt

    I investigated the JIT differences between d45f8b5 and 380898a using the assembly mentioned above.

    Additionally, I tested a version of 380898a with [MethodImpl(MethodImplOptions.AggressiveOptimization)] applied to FormatBigInteger.

    As a result, I found differences between d45f8b5 and 380898a, but the version of 380898a with AggressiveOptimization behaved equivalently to d45f8b5.

    JIT Summary

    .\coreruns\380898a3ce4-crossgen\corerun.exe

       1: JIT compiled Program:<Main>$(System.String[]) [Tier0, IL size=145, code size=328]
       2: JIT compiled System.Numerics.BigInteger:GetPartsForBitManipulation(System.Span`1[uint]) [Tier0, IL size=65, code size=206]
       3: JIT compiled System.Buffers.ArrayPool`1[uint]:get_Shared() [Tier0, IL size=6, code size=44]
       4: JIT compiled System.Buffers.ArrayPool`1[uint]:.cctor() [Tier0, IL size=11, code size=71]
       5: JIT compiled System.Buffers.SharedArrayPool`1[uint]:.ctor() [Tier0, IL size=31, code size=119]
       6: JIT compiled System.Buffers.ArrayPool`1[uint]:.ctor() [Tier0, IL size=7, code size=31]
       7: JIT compiled System.Buffers.SharedArrayPool`1[uint]:Rent(int) [Tier0, IL size=274, code size=956]
       8: JIT compiled System.GC:AllocateUninitializedArray[uint](int,ubyte) [Tier0, IL size=83, code size=187]
       9: JIT compiled System.Numerics.BigInteger:.ctor(System.ReadOnlySpan`1[uint],ubyte) [Tier0, IL size=172, code size=462]
      10: JIT compiled System.Buffers.SharedArrayPool`1[uint]:Return(uint[],ubyte) [Tier0, IL size=223, code size=1134]
      11: JIT compiled System.Buffers.SharedArrayPool`1[uint]:InitializeTlsBucketsAndTrimming() [Tier0, IL size=80, code size=319]
      12: JIT compiled System.Buffers.SharedArrayPool`1+<>c[uint]:.cctor() [Tier0, IL size=11, code size=71]
      13: JIT compiled System.Buffers.SharedArrayPool`1+<>c[uint]:.ctor() [Tier0, IL size=7, code size=31]
      14: JIT compiled System.Console:WriteLine(System.String) [Tier0, IL size=12, code size=59]
      15: JIT compiled System.Console:get_Out() [Tier0, IL size=20, code size=87]
      16: JIT compiled System.Console:.cctor() [Tier0, IL size=11, code size=71]
      17: JIT compiled System.Console:<get_Out>g__EnsureInitialized|26_0() [Tier0, IL size=63, code size=189]
      18: JIT compiled System.ConsolePal:OpenStandardOutput() [Tier0, IL size=34, code size=130]
      19: JIT compiled System.Console:get_OutputEncoding() [Tier0, IL size=72, code size=204]
      20: JIT compiled System.ConsolePal:get_OutputEncoding() [Tier0, IL size=11, code size=191]
      21: JIT compiled System.Text.EncodingHelper:GetSupportedConsoleEncoding(int) [Tier0, IL size=53, code size=186]
      22: JIT compiled System.ConsolePal:GetStandardFile(int,int,ubyte) [Tier0, IL size=50, code size=180]
      23: JIT compiled System.ConsolePal:get_InvalidHandleValue() [Tier0, IL size=7, code size=41]
      24: JIT compiled System.ConsolePal:ConsoleHandleIsWritable(long) [Tier0, IL size=24, code size=63]
      25: JIT compiled Interop+Kernel32:WriteFile(long,ulong,int,byref,long) [Tier0, IL size=39, code size=303]
      26: JIT compiled System.ConsolePal+WindowsConsoleStream:.ctor(long,int,ubyte) [Tier0, IL size=37, code size=90]
      27: JIT compiled System.IO.ConsoleStream:.ctor(int) [Tier0, IL size=31, code size=71]
      28: JIT compiled Interop+Kernel32:GetFileType(long) [Tier0, IL size=23, code size=198]
      29: JIT compiled System.Console:CreateOutputWriter(System.IO.Stream) [Tier0, IL size=49, code size=205]
      30: JIT compiled System.Text.EncodingExtensions:RemovePreamble(System.Text.Encoding) [Tier0, IL size=25, code size=110]
      31: JIT compiled System.Text.ConsoleEncoding:.ctor(System.Text.Encoding) [Tier0, IL size=14, code size=52]
      32: JIT compiled System.IO.ConsoleStream:get_CanWrite() [Tier0, IL size=7, code size=18]
      33: JIT compiled System.Text.ConsoleEncoding:GetEncoder() [Tier0, IL size=12, code size=57]
      34: JIT compiled System.IO.ConsoleStream:get_CanSeek() [Tier0, IL size=2, code size=12]
      35: JIT compiled System.Text.ConsoleEncoding:GetPreamble() [Tier0, IL size=6, code size=27]
      36: JIT compiled System.Text.ConsoleEncoding:GetMaxByteCount(int) [Tier0, IL size=13, code size=63]
      37: JIT compiled System.ConsolePal+WindowsConsoleStream:Flush() [Tier0, IL size=26, code size=57]
      38: JIT compiled System.IO.ConsoleStream:Flush() [Tier0, IL size=1, code size=10]
      39: JIT compiled System.ConsolePal+WindowsConsoleStream:Write(System.ReadOnlySpan`1[ubyte]) [Tier0, IL size=36, code size=149]
      40: JIT compiled System.ConsolePal+WindowsConsoleStream:WriteFileNative(long,System.ReadOnlySpan`1[ubyte],ubyte) [Tier0, IL size=115, code size=246]
    ↑↑↑↑ Warm up↑↑↑↑
    ↓↓↓↓ToString↓↓↓↓
      41: JIT compiled System.Math:DivRem(ulong,ulong) [Instrumented Tier1, IL size=16, code size=29]
      42: JIT compiled System.Math:DivRem(ulong,ulong) [Tier1, IL size=16, code size=29]
      43: JIT compiled System.Math:DivRem(uint,uint) [Instrumented Tier1, IL size=16, code size=33]
      44: JIT compiled System.Math:DivRem(uint,uint) [Tier1, IL size=16, code size=33]
      45: JIT compiled System.Span`1[System.Utf16Char]:.ctor(ulong,int) [Tier0, IL size=46, code size=61]
      46: JIT compiled System.Runtime.InteropServices.MemoryMarshal:Cast[ushort,System.Utf16Char](System.ReadOnlySpan`1[ushort]) [Tier0, IL size=112, code size=210]
      47: JIT compiled System.ReadOnlySpan`1[System.Utf16Char]:.ctor(byref,int) [Tier0, IL size=15, code size=39]
      48: JIT compiled System.ReadOnlySpan`1[System.Utf16Char]:.ctor(ulong,int) [Tier0, IL size=46, code size=61]
      49: JIT compiled System.Span`1[System.Utf16Char]:Slice(int) [Tier0, IL size=41, code size=118]
      50: JIT compiled System.Span`1[System.Utf16Char]:.ctor(byref,int) [Tier0, IL size=15, code size=39]
      51: JIT compiled System.ReadOnlySpan`1[System.Utf16Char]:CopyTo(System.Span`1[System.Utf16Char]) [Tier0, IL size=47, code size=84]
      52: JIT compiled System.Buffer:Memmove[System.Utf16Char](byref,byref,ulong) [Tier0, IL size=61, code size=51]
      53: JIT compiled System.Span`1[System.Utf16Char]:Slice(int,int) [Tier0, IL size=39, code size=127]
      54: JIT compiled System.Span`1[System.Utf16Char]:op_Implicit(System.Span`1[System.Utf16Char]) [Tier0, IL size=19, code size=81]
      55: JIT compiled System.Runtime.InteropServices.MemoryMarshal:Cast[System.Utf16Char,ushort](System.ReadOnlySpan`1[System.Utf16Char]) [Tier0, IL size=112, code size=210]
      56: JIT compiled System.Runtime.InteropServices.MemoryMarshal:GetReference[System.Utf16Char](System.ReadOnlySpan`1[System.Utf16Char]) [Tier0, IL size=8, code size=17]
    ToString 6.741140125E+315652
    2050 ms
    

    .\coreruns\380898a3ce4-crossgen-withAO\corerun.exe

       1: JIT compiled Program:<Main>$(System.String[]) [Tier0, IL size=145, code size=328]
       2: JIT compiled System.Numerics.BigInteger:GetPartsForBitManipulation(System.Span`1[uint]) [Tier0, IL size=65, code size=206]
       3: JIT compiled System.Buffers.ArrayPool`1[uint]:get_Shared() [Tier0, IL size=6, code size=44]
       4: JIT compiled System.Buffers.ArrayPool`1[uint]:.cctor() [Tier0, IL size=11, code size=71]
       5: JIT compiled System.Buffers.SharedArrayPool`1[uint]:.ctor() [Tier0, IL size=31, code size=119]
       6: JIT compiled System.Buffers.ArrayPool`1[uint]:.ctor() [Tier0, IL size=7, code size=31]
       7: JIT compiled System.Buffers.SharedArrayPool`1[uint]:Rent(int) [Tier0, IL size=274, code size=956]
       8: JIT compiled System.GC:AllocateUninitializedArray[uint](int,ubyte) [Tier0, IL size=83, code size=187]
       9: JIT compiled System.Numerics.BigInteger:.ctor(System.ReadOnlySpan`1[uint],ubyte) [Tier0, IL size=172, code size=462]
      10: JIT compiled System.Buffers.SharedArrayPool`1[uint]:Return(uint[],ubyte) [Tier0, IL size=223, code size=1134]
      11: JIT compiled System.Buffers.SharedArrayPool`1[uint]:InitializeTlsBucketsAndTrimming() [Tier0, IL size=80, code size=319]
      12: JIT compiled System.Buffers.SharedArrayPool`1+<>c[uint]:.cctor() [Tier0, IL size=11, code size=71]
      13: JIT compiled System.Buffers.SharedArrayPool`1+<>c[uint]:.ctor() [Tier0, IL size=7, code size=31]
      14: JIT compiled System.Console:WriteLine(System.String) [Tier0, IL size=12, code size=59]
      15: JIT compiled System.Console:get_Out() [Tier0, IL size=20, code size=87]
      16: JIT compiled System.Console:.cctor() [Tier0, IL size=11, code size=71]
      17: JIT compiled System.Console:<get_Out>g__EnsureInitialized|26_0() [Tier0, IL size=63, code size=189]
      18: JIT compiled System.ConsolePal:OpenStandardOutput() [Tier0, IL size=34, code size=130]
      19: JIT compiled System.Console:get_OutputEncoding() [Tier0, IL size=72, code size=204]
      20: JIT compiled System.ConsolePal:get_OutputEncoding() [Tier0, IL size=11, code size=191]
      21: JIT compiled System.Text.EncodingHelper:GetSupportedConsoleEncoding(int) [Tier0, IL size=53, code size=186]
      22: JIT compiled System.ConsolePal:GetStandardFile(int,int,ubyte) [Tier0, IL size=50, code size=180]
      23: JIT compiled System.ConsolePal:get_InvalidHandleValue() [Tier0, IL size=7, code size=41]
      24: JIT compiled System.ConsolePal:ConsoleHandleIsWritable(long) [Tier0, IL size=24, code size=63]
      25: JIT compiled Interop+Kernel32:WriteFile(long,ulong,int,byref,long) [Tier0, IL size=39, code size=303]
      26: JIT compiled System.ConsolePal+WindowsConsoleStream:.ctor(long,int,ubyte) [Tier0, IL size=37, code size=90]
      27: JIT compiled System.IO.ConsoleStream:.ctor(int) [Tier0, IL size=31, code size=71]
      28: JIT compiled Interop+Kernel32:GetFileType(long) [Tier0, IL size=23, code size=198]
      29: JIT compiled System.Console:CreateOutputWriter(System.IO.Stream) [Tier0, IL size=49, code size=205]
      30: JIT compiled System.Text.EncodingExtensions:RemovePreamble(System.Text.Encoding) [Tier0, IL size=25, code size=110]
      31: JIT compiled System.Text.ConsoleEncoding:.ctor(System.Text.Encoding) [Tier0, IL size=14, code size=52]
      32: JIT compiled System.IO.ConsoleStream:get_CanWrite() [Tier0, IL size=7, code size=18]
      33: JIT compiled System.Text.ConsoleEncoding:GetEncoder() [Tier0, IL size=12, code size=57]
      34: JIT compiled System.IO.ConsoleStream:get_CanSeek() [Tier0, IL size=2, code size=12]
      35: JIT compiled System.Text.ConsoleEncoding:GetPreamble() [Tier0, IL size=6, code size=27]
      36: JIT compiled System.Text.ConsoleEncoding:GetMaxByteCount(int) [Tier0, IL size=13, code size=63]
      37: JIT compiled System.ConsolePal+WindowsConsoleStream:Flush() [Tier0, IL size=26, code size=57]
      38: JIT compiled System.IO.ConsoleStream:Flush() [Tier0, IL size=1, code size=10]
      39: JIT compiled System.ConsolePal+WindowsConsoleStream:Write(System.ReadOnlySpan`1[ubyte]) [Tier0, IL size=36, code size=149]
      40: JIT compiled System.ConsolePal+WindowsConsoleStream:WriteFileNative(long,System.ReadOnlySpan`1[ubyte],ubyte) [Tier0, IL size=115, code size=246]
    ↑↑↑↑ Warm up↑↑↑↑
    ↓↓↓↓ToString↓↓↓↓
      41: JIT compiled System.Number:FormatBigInteger(ubyte,System.Numerics.BigInteger,System.String,System.ReadOnlySpan`1[ushort],System.Globalization.NumberFormatInfo,System.Span`1[ushort],byref,byref) [FullOpts, IL size=1111, code size=3872]
      42: JIT compiled System.Number:BigIntegerToDecChars[System.Utf8Char](ulong,System.ReadOnlySpan`1[uint],int) [Instrumented Tier0, IL size=69, code size=242]
      43: JIT compiled System.Number:UInt32ToDecChars[System.Utf8Char](ulong,uint,int) [Instrumented Tier0, IL size=69, code size=214]
      44: JIT compiled System.Number:BigIntegerToDecChars[System.Utf8Char](ulong,System.ReadOnlySpan`1[uint],int) [Tier1-OSR @0x21 with Dynamic PGO, IL size=69, code size=279]
      45: JIT compiled System.Number:NumberToString[System.Utf16Char](byref,byref,ushort,int,System.Globalization.NumberFormatInfo) [Instrumented Tier0, IL size=503, code size=1793]
      46: JIT compiled System.Number:FormatScientific[System.Utf16Char](byref,byref,int,System.Globalization.NumberFormatInfo,ushort) [Instrumented Tier0, IL size=136, code size=699]
      47: JIT compiled System.Collections.Generic.ValueListBuilder`1[System.Utf16Char]:Append(System.Utf16Char) [Tier0, IL size=56, code size=125]
      48: JIT compiled System.Number:NumberDecimalSeparatorTChar[System.Utf16Char](System.Globalization.NumberFormatInfo) [Tier0, IL size=17, code size=97]
      49: JIT compiled System.Runtime.InteropServices.MemoryMarshal:Cast[ushort,System.Utf16Char](System.ReadOnlySpan`1[ushort]) [Tier0, IL size=112, code size=210]
      50: JIT compiled System.ReadOnlySpan`1[System.Utf16Char]:.ctor(byref,int) [Tier0, IL size=15, code size=39]
      51: JIT compiled System.Collections.Generic.ValueListBuilder`1[System.Utf16Char]:Append(System.ReadOnlySpan`1[System.Utf16Char]) [Tier0, IL size=78, code size=180]
      52: JIT compiled System.Number:FormatExponent[System.Utf16Char](byref,System.Globalization.NumberFormatInfo,int,ushort,int,ubyte) [Tier0, IL size=126, code size=426]
      53: JIT compiled System.Number:PositiveSignTChar[System.Utf16Char](System.Globalization.NumberFormatInfo) [Tier0, IL size=17, code size=97]
      54: JIT compiled System.Number:UInt32ToDecChars[System.Utf16Char](ulong,uint,int) [Instrumented Tier0, IL size=69, code size=216]
      55: JIT compiled System.ReadOnlySpan`1[System.Utf16Char]:.ctor(ulong,int) [Tier0, IL size=46, code size=61]
      56: JIT compiled System.Collections.Generic.ValueListBuilder`1[System.Utf16Char]:AppendMultiChar(System.ReadOnlySpan`1[System.Utf16Char]) [Tier0, IL size=104, code size=159]
      57: JIT compiled System.Span`1[System.Utf16Char]:Slice(int) [Tier0, IL size=41, code size=118]
      58: JIT compiled System.Span`1[System.Utf16Char]:.ctor(byref,int) [Tier0, IL size=15, code size=39]
      59: JIT compiled System.ReadOnlySpan`1[System.Utf16Char]:CopyTo(System.Span`1[System.Utf16Char]) [Tier0, IL size=47, code size=84]
      60: JIT compiled System.Buffer:Memmove[System.Utf16Char](byref,byref,ulong) [Tier0, IL size=61, code size=51]
    ToString 6.741140125E+315652
    1032 ms
    

    .\coreruns\d45f8b5bcc5-crossgen\corerun.exe

       1: JIT compiled Program:<Main>$(System.String[]) [Tier0, IL size=145, code size=328]
       2: JIT compiled System.Numerics.BigInteger:GetPartsForBitManipulation(System.Span`1[uint]) [Tier0, IL size=65, code size=206]
       3: JIT compiled System.Buffers.ArrayPool`1[uint]:get_Shared() [Tier0, IL size=6, code size=44]
       4: JIT compiled System.Buffers.ArrayPool`1[uint]:.cctor() [Tier0, IL size=11, code size=71]
       5: JIT compiled System.Buffers.SharedArrayPool`1[uint]:.ctor() [Tier0, IL size=31, code size=119]
       6: JIT compiled System.Buffers.ArrayPool`1[uint]:.ctor() [Tier0, IL size=7, code size=31]
       7: JIT compiled System.Buffers.SharedArrayPool`1[uint]:Rent(int) [Tier0, IL size=274, code size=956]
       8: JIT compiled System.GC:AllocateUninitializedArray[uint](int,ubyte) [Tier0, IL size=83, code size=187]
       9: JIT compiled System.Numerics.BigInteger:.ctor(System.ReadOnlySpan`1[uint],ubyte) [Tier0, IL size=172, code size=462]
      10: JIT compiled System.Buffers.SharedArrayPool`1[uint]:Return(uint[],ubyte) [Tier0, IL size=223, code size=1134]
      11: JIT compiled System.Buffers.SharedArrayPool`1[uint]:InitializeTlsBucketsAndTrimming() [Tier0, IL size=80, code size=319]
      12: JIT compiled System.Buffers.SharedArrayPool`1+<>c[uint]:.cctor() [Tier0, IL size=11, code size=71]
      13: JIT compiled System.Buffers.SharedArrayPool`1+<>c[uint]:.ctor() [Tier0, IL size=7, code size=31]
      14: JIT compiled System.Console:WriteLine(System.String) [Tier0, IL size=12, code size=59]
      15: JIT compiled System.Console:get_Out() [Tier0, IL size=20, code size=87]
      16: JIT compiled System.Console:.cctor() [Tier0, IL size=11, code size=71]
      17: JIT compiled System.Console:<get_Out>g__EnsureInitialized|26_0() [Tier0, IL size=63, code size=189]
      18: JIT compiled System.ConsolePal:OpenStandardOutput() [Tier0, IL size=34, code size=130]
      19: JIT compiled System.Console:get_OutputEncoding() [Tier0, IL size=72, code size=204]
      20: JIT compiled System.ConsolePal:get_OutputEncoding() [Tier0, IL size=11, code size=191]
      21: JIT compiled System.Text.EncodingHelper:GetSupportedConsoleEncoding(int) [Tier0, IL size=53, code size=186]
      22: JIT compiled System.ConsolePal:GetStandardFile(int,int,ubyte) [Tier0, IL size=50, code size=180]
      23: JIT compiled System.ConsolePal:get_InvalidHandleValue() [Tier0, IL size=7, code size=41]
      24: JIT compiled System.ConsolePal:ConsoleHandleIsWritable(long) [Tier0, IL size=24, code size=63]
      25: JIT compiled Interop+Kernel32:WriteFile(long,ulong,int,byref,long) [Tier0, IL size=39, code size=303]
      26: JIT compiled System.ConsolePal+WindowsConsoleStream:.ctor(long,int,ubyte) [Tier0, IL size=37, code size=90]
      27: JIT compiled System.IO.ConsoleStream:.ctor(int) [Tier0, IL size=31, code size=71]
      28: JIT compiled Interop+Kernel32:GetFileType(long) [Tier0, IL size=23, code size=198]
      29: JIT compiled System.Console:CreateOutputWriter(System.IO.Stream) [Tier0, IL size=49, code size=205]
      30: JIT compiled System.Text.EncodingExtensions:RemovePreamble(System.Text.Encoding) [Tier0, IL size=25, code size=110]
      31: JIT compiled System.Text.ConsoleEncoding:.ctor(System.Text.Encoding) [Tier0, IL size=14, code size=52]
      32: JIT compiled System.IO.ConsoleStream:get_CanWrite() [Tier0, IL size=7, code size=18]
      33: JIT compiled System.Text.ConsoleEncoding:GetEncoder() [Tier0, IL size=12, code size=57]
      34: JIT compiled System.IO.ConsoleStream:get_CanSeek() [Tier0, IL size=2, code size=12]
      35: JIT compiled System.Text.ConsoleEncoding:GetPreamble() [Tier0, IL size=6, code size=27]
      36: JIT compiled System.Text.ConsoleEncoding:GetMaxByteCount(int) [Tier0, IL size=13, code size=63]
      37: JIT compiled System.ConsolePal+WindowsConsoleStream:Flush() [Tier0, IL size=26, code size=57]
      38: JIT compiled System.IO.ConsoleStream:Flush() [Tier0, IL size=1, code size=10]
      39: JIT compiled System.ConsolePal+WindowsConsoleStream:Write(System.ReadOnlySpan`1[ubyte]) [Tier0, IL size=36, code size=149]
      40: JIT compiled System.ConsolePal+WindowsConsoleStream:WriteFileNative(long,System.ReadOnlySpan`1[ubyte],ubyte) [Tier0, IL size=115, code size=246]
    ↑↑↑↑ Warm up↑↑↑↑
    ↓↓↓↓ToString↓↓↓↓
      41: JIT compiled System.Number:FormatBigInteger(ubyte,System.Numerics.BigInteger,System.String,System.ReadOnlySpan`1[ushort],System.Globalization.NumberFormatInfo,System.Span`1[ushort],byref,byref) [Tier-0 switched to FullOpts, IL size=1111, code size=3872]
      42: JIT compiled System.Number:BigIntegerToDecChars[System.Utf8Char](ulong,System.ReadOnlySpan`1[uint],int) [Instrumented Tier0, IL size=69, code size=242]
      43: JIT compiled System.Number:UInt32ToDecChars[System.Utf8Char](ulong,uint,int) [Instrumented Tier0, IL size=69, code size=214]
      44: JIT compiled System.Number:BigIntegerToDecChars[System.Utf8Char](ulong,System.ReadOnlySpan`1[uint],int) [Tier1-OSR @0x21 with Dynamic PGO, IL size=69, code size=279]
      45: JIT compiled System.Number:NumberToString[System.Utf16Char](byref,byref,ushort,int,System.Globalization.NumberFormatInfo) [Instrumented Tier0, IL size=503, code size=1793]
      46: JIT compiled System.Number+NumberBuffer:get_DigitsPtr() [Tier0, IL size=17, code size=58]
      47: JIT compiled System.Number:FormatScientific[System.Utf16Char](byref,byref,int,System.Globalization.NumberFormatInfo,ushort) [Instrumented Tier0, IL size=136, code size=699]
      48: JIT compiled System.Collections.Generic.ValueListBuilder`1[System.Utf16Char]:Append(System.Utf16Char) [Tier0, IL size=56, code size=125]
      49: JIT compiled System.Number:NumberDecimalSeparatorTChar[System.Utf16Char](System.Globalization.NumberFormatInfo) [Tier0, IL size=17, code size=97]
      50: JIT compiled System.Runtime.InteropServices.MemoryMarshal:Cast[ushort,System.Utf16Char](System.ReadOnlySpan`1[ushort]) [Tier0, IL size=112, code size=210]
      51: JIT compiled System.ReadOnlySpan`1[System.Utf16Char]:.ctor(byref,int) [Tier0, IL size=15, code size=39]
      52: JIT compiled System.Collections.Generic.ValueListBuilder`1[System.Utf16Char]:Append(System.ReadOnlySpan`1[System.Utf16Char]) [Tier0, IL size=78, code size=180]
      53: JIT compiled System.Number:FormatExponent[System.Utf16Char](byref,System.Globalization.NumberFormatInfo,int,ushort,int,ubyte) [Tier0, IL size=126, code size=426]
      54: JIT compiled System.Number:PositiveSignTChar[System.Utf16Char](System.Globalization.NumberFormatInfo) [Tier0, IL size=17, code size=97]
      55: JIT compiled System.Number:UInt32ToDecChars[System.Utf16Char](ulong,uint,int) [Instrumented Tier0, IL size=69, code size=216]
      56: JIT compiled System.ReadOnlySpan`1[System.Utf16Char]:.ctor(ulong,int) [Tier0, IL size=46, code size=61]
      57: JIT compiled System.Collections.Generic.ValueListBuilder`1[System.Utf16Char]:AppendMultiChar(System.ReadOnlySpan`1[System.Utf16Char]) [Tier0, IL size=104, code size=159]
      58: JIT compiled System.Span`1[System.Utf16Char]:Slice(int) [Tier0, IL size=41, code size=118]
      59: JIT compiled System.Span`1[System.Utf16Char]:.ctor(byref,int) [Tier0, IL size=15, code size=39]
      60: JIT compiled System.ReadOnlySpan`1[System.Utf16Char]:CopyTo(System.Span`1[System.Utf16Char]) [Tier0, IL size=47, code size=84]
      61: JIT compiled System.Buffer:Memmove[System.Utf16Char](byref,byref,ulong) [Tier0, IL size=61, code size=51]
    ToString 6.741140125E+315652
    1029 ms
    

    crossgen with System.Memory

    Running crossgen including System.Memory.dll causes a regression even in d45f8b5.

    JIT Summary with System.Memory

    .\coreruns\380898a3ce4-crossgen\corerun.exe

    .\coreruns\380898a3ce4-crossgen\corerun.exe
       1: JIT compiled Program:<Main>$(System.String[]) [Tier0, IL size=145, code size=328]
       2: JIT compiled System.Buffers.ArrayPool`1[uint]:get_Shared() [Tier0, IL size=6, code size=44]
       3: JIT compiled System.Buffers.ArrayPool`1[uint]:.cctor() [Tier0, IL size=11, code size=71]
       4: JIT compiled System.Buffers.SharedArrayPool`1[uint]:.ctor() [Tier0, IL size=31, code size=119]
       5: JIT compiled System.Buffers.ArrayPool`1[uint]:.ctor() [Tier0, IL size=7, code size=31]
       6: JIT compiled System.Buffers.SharedArrayPool`1[uint]:Rent(int) [Tier0, IL size=274, code size=956]
       7: JIT compiled System.GC:AllocateUninitializedArray[uint](int,ubyte) [Tier0, IL size=83, code size=187]
       8: JIT compiled System.Buffers.SharedArrayPool`1[uint]:Return(uint[],ubyte) [Tier0, IL size=223, code size=1134]
       9: JIT compiled System.Buffers.SharedArrayPool`1[uint]:InitializeTlsBucketsAndTrimming() [Tier0, IL size=80, code size=319]
      10: JIT compiled System.Buffers.SharedArrayPool`1+<>c[uint]:.cctor() [Tier0, IL size=11, code size=71]
      11: JIT compiled System.Buffers.SharedArrayPool`1+<>c[uint]:.ctor() [Tier0, IL size=7, code size=31]
      12: JIT compiled System.Console:WriteLine(System.String) [Tier0, IL size=12, code size=59]
      13: JIT compiled System.Console:get_Out() [Tier0, IL size=20, code size=87]
      14: JIT compiled System.Console:.cctor() [Tier0, IL size=11, code size=71]
      15: JIT compiled System.Console:<get_Out>g__EnsureInitialized|26_0() [Tier0, IL size=63, code size=189]
      16: JIT compiled System.ConsolePal:OpenStandardOutput() [Tier0, IL size=34, code size=130]
      17: JIT compiled System.Console:get_OutputEncoding() [Tier0, IL size=72, code size=204]
      18: JIT compiled System.ConsolePal:get_OutputEncoding() [Tier0, IL size=11, code size=191]
      19: JIT compiled System.Text.EncodingHelper:GetSupportedConsoleEncoding(int) [Tier0, IL size=53, code size=186]
      20: JIT compiled System.ConsolePal:GetStandardFile(int,int,ubyte) [Tier0, IL size=50, code size=180]
      21: JIT compiled System.ConsolePal:get_InvalidHandleValue() [Tier0, IL size=7, code size=41]
      22: JIT compiled System.ConsolePal:ConsoleHandleIsWritable(long) [Tier0, IL size=24, code size=63]
      23: JIT compiled Interop+Kernel32:WriteFile(long,ulong,int,byref,long) [Tier0, IL size=39, code size=303]
      24: JIT compiled System.ConsolePal+WindowsConsoleStream:.ctor(long,int,ubyte) [Tier0, IL size=37, code size=90]
      25: JIT compiled System.IO.ConsoleStream:.ctor(int) [Tier0, IL size=31, code size=71]
      26: JIT compiled Interop+Kernel32:GetFileType(long) [Tier0, IL size=23, code size=198]
      27: JIT compiled System.Console:CreateOutputWriter(System.IO.Stream) [Tier0, IL size=49, code size=205]
      28: JIT compiled System.Text.EncodingExtensions:RemovePreamble(System.Text.Encoding) [Tier0, IL size=25, code size=110]
      29: JIT compiled System.Text.ConsoleEncoding:.ctor(System.Text.Encoding) [Tier0, IL size=14, code size=52]
      30: JIT compiled System.IO.ConsoleStream:get_CanWrite() [Tier0, IL size=7, code size=18]
      31: JIT compiled System.Text.ConsoleEncoding:GetEncoder() [Tier0, IL size=12, code size=57]
      32: JIT compiled System.IO.ConsoleStream:get_CanSeek() [Tier0, IL size=2, code size=12]
      33: JIT compiled System.Text.ConsoleEncoding:GetPreamble() [Tier0, IL size=6, code size=27]
      34: JIT compiled System.Text.ConsoleEncoding:GetMaxByteCount(int) [Tier0, IL size=13, code size=63]
      35: JIT compiled System.ConsolePal+WindowsConsoleStream:Flush() [Tier0, IL size=26, code size=57]
      36: JIT compiled System.IO.ConsoleStream:Flush() [Tier0, IL size=1, code size=10]
      37: JIT compiled System.ConsolePal+WindowsConsoleStream:Write(System.ReadOnlySpan`1[ubyte]) [Tier0, IL size=36, code size=149]
      38: JIT compiled System.ConsolePal+WindowsConsoleStream:WriteFileNative(long,System.ReadOnlySpan`1[ubyte],ubyte) [Tier0, IL size=115, code size=246]
    ↑↑↑↑ Warm up↑↑↑↑
    ↓↓↓↓ToString↓↓↓↓
      39: JIT compiled System.Math:DivRem(ulong,ulong) [Instrumented Tier1, IL size=16, code size=29]
      40: JIT compiled System.Math:DivRem(ulong,ulong) [Tier1, IL size=16, code size=29]
      41: JIT compiled System.Math:DivRem(uint,uint) [Instrumented Tier1, IL size=16, code size=33]
      42: JIT compiled System.Math:DivRem(uint,uint) [Tier1, IL size=16, code size=33]
      43: JIT compiled System.Span`1[System.Utf16Char]:.ctor(ulong,int) [Tier0, IL size=46, code size=61]
      44: JIT compiled System.Runtime.InteropServices.MemoryMarshal:Cast[ushort,System.Utf16Char](System.ReadOnlySpan`1[ushort]) [Tier0, IL size=112, code size=210]
      45: JIT compiled System.ReadOnlySpan`1[System.Utf16Char]:.ctor(byref,int) [Tier0, IL size=15, code size=39]
      46: JIT compiled System.ReadOnlySpan`1[System.Utf16Char]:.ctor(ulong,int) [Tier0, IL size=46, code size=61]
      47: JIT compiled System.Span`1[System.Utf16Char]:Slice(int) [Tier0, IL size=41, code size=118]
      48: JIT compiled System.Span`1[System.Utf16Char]:.ctor(byref,int) [Tier0, IL size=15, code size=39]
      49: JIT compiled System.ReadOnlySpan`1[System.Utf16Char]:CopyTo(System.Span`1[System.Utf16Char]) [Tier0, IL size=47, code size=84]
      50: JIT compiled System.Buffer:Memmove[System.Utf16Char](byref,byref,ulong) [Tier0, IL size=61, code size=51]
      51: JIT compiled System.Span`1[System.Utf16Char]:Slice(int,int) [Tier0, IL size=39, code size=127]
      52: JIT compiled System.Span`1[System.Utf16Char]:op_Implicit(System.Span`1[System.Utf16Char]) [Tier0, IL size=19, code size=81]
      53: JIT compiled System.Runtime.InteropServices.MemoryMarshal:Cast[System.Utf16Char,ushort](System.ReadOnlySpan`1[System.Utf16Char]) [Tier0, IL size=112, code size=210]
      54: JIT compiled System.Runtime.InteropServices.MemoryMarshal:GetReference[System.Utf16Char](System.ReadOnlySpan`1[System.Utf16Char]) [Tier0, IL size=8, code size=17]
    ToString 6.741140125E+315652
    2096 ms
    

    .\coreruns\380898a3ce4-crossgen-withAO\corerun.exe

    .\coreruns\380898a3ce4-crossgen-withAO\corerun.exe
       1: JIT compiled Program:<Main>$(System.String[]) [Tier0, IL size=145, code size=328]
       2: JIT compiled System.Buffers.ArrayPool`1[uint]:get_Shared() [Tier0, IL size=6, code size=44]
       3: JIT compiled System.Buffers.ArrayPool`1[uint]:.cctor() [Tier0, IL size=11, code size=71]
       4: JIT compiled System.Buffers.SharedArrayPool`1[uint]:.ctor() [Tier0, IL size=31, code size=119]
       5: JIT compiled System.Buffers.ArrayPool`1[uint]:.ctor() [Tier0, IL size=7, code size=31]
       6: JIT compiled System.Buffers.SharedArrayPool`1[uint]:Rent(int) [Tier0, IL size=274, code size=956]
       7: JIT compiled System.GC:AllocateUninitializedArray[uint](int,ubyte) [Tier0, IL size=83, code size=187]
       8: JIT compiled System.Buffers.SharedArrayPool`1[uint]:Return(uint[],ubyte) [Tier0, IL size=223, code size=1134]
       9: JIT compiled System.Buffers.SharedArrayPool`1[uint]:InitializeTlsBucketsAndTrimming() [Tier0, IL size=80, code size=319]
      10: JIT compiled System.Buffers.SharedArrayPool`1+<>c[uint]:.cctor() [Tier0, IL size=11, code size=71]
      11: JIT compiled System.Buffers.SharedArrayPool`1+<>c[uint]:.ctor() [Tier0, IL size=7, code size=31]
      12: JIT compiled System.Console:WriteLine(System.String) [Tier0, IL size=12, code size=59]
      13: JIT compiled System.Console:get_Out() [Tier0, IL size=20, code size=87]
      14: JIT compiled System.Console:.cctor() [Tier0, IL size=11, code size=71]
      15: JIT compiled System.Console:<get_Out>g__EnsureInitialized|26_0() [Tier0, IL size=63, code size=189]
      16: JIT compiled System.ConsolePal:OpenStandardOutput() [Tier0, IL size=34, code size=130]
      17: JIT compiled System.Console:get_OutputEncoding() [Tier0, IL size=72, code size=204]
      18: JIT compiled System.ConsolePal:get_OutputEncoding() [Tier0, IL size=11, code size=191]
      19: JIT compiled System.Text.EncodingHelper:GetSupportedConsoleEncoding(int) [Tier0, IL size=53, code size=186]
      20: JIT compiled System.ConsolePal:GetStandardFile(int,int,ubyte) [Tier0, IL size=50, code size=180]
      21: JIT compiled System.ConsolePal:get_InvalidHandleValue() [Tier0, IL size=7, code size=41]
      22: JIT compiled System.ConsolePal:ConsoleHandleIsWritable(long) [Tier0, IL size=24, code size=63]
      23: JIT compiled Interop+Kernel32:WriteFile(long,ulong,int,byref,long) [Tier0, IL size=39, code size=303]
      24: JIT compiled System.ConsolePal+WindowsConsoleStream:.ctor(long,int,ubyte) [Tier0, IL size=37, code size=90]
      25: JIT compiled System.IO.ConsoleStream:.ctor(int) [Tier0, IL size=31, code size=71]
      26: JIT compiled Interop+Kernel32:GetFileType(long) [Tier0, IL size=23, code size=198]
      27: JIT compiled System.Console:CreateOutputWriter(System.IO.Stream) [Tier0, IL size=49, code size=205]
      28: JIT compiled System.Text.EncodingExtensions:RemovePreamble(System.Text.Encoding) [Tier0, IL size=25, code size=110]
      29: JIT compiled System.Text.ConsoleEncoding:.ctor(System.Text.Encoding) [Tier0, IL size=14, code size=52]
      30: JIT compiled System.IO.ConsoleStream:get_CanWrite() [Tier0, IL size=7, code size=18]
      31: JIT compiled System.Text.ConsoleEncoding:GetEncoder() [Tier0, IL size=12, code size=57]
      32: JIT compiled System.IO.ConsoleStream:get_CanSeek() [Tier0, IL size=2, code size=12]
      33: JIT compiled System.Text.ConsoleEncoding:GetPreamble() [Tier0, IL size=6, code size=27]
      34: JIT compiled System.Text.ConsoleEncoding:GetMaxByteCount(int) [Tier0, IL size=13, code size=63]
      35: JIT compiled System.ConsolePal+WindowsConsoleStream:Flush() [Tier0, IL size=26, code size=57]
      36: JIT compiled System.IO.ConsoleStream:Flush() [Tier0, IL size=1, code size=10]
      37: JIT compiled System.ConsolePal+WindowsConsoleStream:Write(System.ReadOnlySpan`1[ubyte]) [Tier0, IL size=36, code size=149]
      38: JIT compiled System.ConsolePal+WindowsConsoleStream:WriteFileNative(long,System.ReadOnlySpan`1[ubyte],ubyte) [Tier0, IL size=115, code size=246]
    ↑↑↑↑ Warm up↑↑↑↑
    ↓↓↓↓ToString↓↓↓↓
      39: JIT compiled System.Number:FormatBigInteger(ubyte,System.Numerics.BigInteger,System.String,System.ReadOnlySpan`1[ushort],System.Globalization.NumberFormatInfo,System.Span`1[ushort],byref,byref) [FullOpts, IL size=1111, code size=3872]
      40: JIT compiled System.Number:BigIntegerToDecChars[System.Utf8Char](ulong,System.ReadOnlySpan`1[uint],int) [Instrumented Tier0, IL size=69, code size=242]
      41: JIT compiled System.Number:UInt32ToDecChars[System.Utf8Char](ulong,uint,int) [Instrumented Tier0, IL size=69, code size=214]
      42: JIT compiled System.Number:BigIntegerToDecChars[System.Utf8Char](ulong,System.ReadOnlySpan`1[uint],int) [Tier1-OSR @0x21 with Dynamic PGO, IL size=69, code size=279]
      43: JIT compiled System.Number:NumberToString[System.Utf16Char](byref,byref,ushort,int,System.Globalization.NumberFormatInfo) [Instrumented Tier0, IL size=503, code size=1793]
      44: JIT compiled System.Number:FormatScientific[System.Utf16Char](byref,byref,int,System.Globalization.NumberFormatInfo,ushort) [Instrumented Tier0, IL size=136, code size=699]
      45: JIT compiled System.Collections.Generic.ValueListBuilder`1[System.Utf16Char]:Append(System.Utf16Char) [Tier0, IL size=56, code size=125]
      46: JIT compiled System.Number:NumberDecimalSeparatorTChar[System.Utf16Char](System.Globalization.NumberFormatInfo) [Tier0, IL size=17, code size=97]
      47: JIT compiled System.Runtime.InteropServices.MemoryMarshal:Cast[ushort,System.Utf16Char](System.ReadOnlySpan`1[ushort]) [Tier0, IL size=112, code size=210]
      48: JIT compiled System.ReadOnlySpan`1[System.Utf16Char]:.ctor(byref,int) [Tier0, IL size=15, code size=39]
      49: JIT compiled System.Collections.Generic.ValueListBuilder`1[System.Utf16Char]:Append(System.ReadOnlySpan`1[System.Utf16Char]) [Tier0, IL size=78, code size=180]
      50: JIT compiled System.Number:FormatExponent[System.Utf16Char](byref,System.Globalization.NumberFormatInfo,int,ushort,int,ubyte) [Tier0, IL size=126, code size=426]
      51: JIT compiled System.Number:PositiveSignTChar[System.Utf16Char](System.Globalization.NumberFormatInfo) [Tier0, IL size=17, code size=97]
      52: JIT compiled System.Number:UInt32ToDecChars[System.Utf16Char](ulong,uint,int) [Instrumented Tier0, IL size=69, code size=216]
      53: JIT compiled System.ReadOnlySpan`1[System.Utf16Char]:.ctor(ulong,int) [Tier0, IL size=46, code size=61]
      54: JIT compiled System.Collections.Generic.ValueListBuilder`1[System.Utf16Char]:AppendMultiChar(System.ReadOnlySpan`1[System.Utf16Char]) [Tier0, IL size=104, code size=159]
      55: JIT compiled System.Span`1[System.Utf16Char]:Slice(int) [Tier0, IL size=41, code size=118]
      56: JIT compiled System.Span`1[System.Utf16Char]:.ctor(byref,int) [Tier0, IL size=15, code size=39]
      57: JIT compiled System.ReadOnlySpan`1[System.Utf16Char]:CopyTo(System.Span`1[System.Utf16Char]) [Tier0, IL size=47, code size=84]
      58: JIT compiled System.Buffer:Memmove[System.Utf16Char](byref,byref,ulong) [Tier0, IL size=61, code size=51]
    ToString 6.741140125E+315652
    1042 ms
    

    .\coreruns\d45f8b5bcc5-crossgen\corerun.exe

    .\coreruns\d45f8b5bcc5-crossgen\corerun.exe
       1: JIT compiled Program:<Main>$(System.String[]) [Tier0, IL size=145, code size=328]
       2: JIT compiled System.Buffers.ArrayPool`1[uint]:get_Shared() [Tier0, IL size=6, code size=44]
       3: JIT compiled System.Buffers.ArrayPool`1[uint]:.cctor() [Tier0, IL size=11, code size=71]
       4: JIT compiled System.Buffers.SharedArrayPool`1[uint]:.ctor() [Tier0, IL size=31, code size=119]
       5: JIT compiled System.Buffers.ArrayPool`1[uint]:.ctor() [Tier0, IL size=7, code size=31]
       6: JIT compiled System.Buffers.SharedArrayPool`1[uint]:Rent(int) [Tier0, IL size=274, code size=956]
       7: JIT compiled System.GC:AllocateUninitializedArray[uint](int,ubyte) [Tier0, IL size=83, code size=187]
       8: JIT compiled System.Buffers.SharedArrayPool`1[uint]:Return(uint[],ubyte) [Tier0, IL size=223, code size=1134]
       9: JIT compiled System.Buffers.SharedArrayPool`1[uint]:InitializeTlsBucketsAndTrimming() [Tier0, IL size=80, code size=319]
      10: JIT compiled System.Buffers.SharedArrayPool`1+<>c[uint]:.cctor() [Tier0, IL size=11, code size=71]
      11: JIT compiled System.Buffers.SharedArrayPool`1+<>c[uint]:.ctor() [Tier0, IL size=7, code size=31]
      12: JIT compiled System.Console:WriteLine(System.String) [Tier0, IL size=12, code size=59]
      13: JIT compiled System.Console:get_Out() [Tier0, IL size=20, code size=87]
      14: JIT compiled System.Console:.cctor() [Tier0, IL size=11, code size=71]
      15: JIT compiled System.Console:<get_Out>g__EnsureInitialized|26_0() [Tier0, IL size=63, code size=189]
      16: JIT compiled System.ConsolePal:OpenStandardOutput() [Tier0, IL size=34, code size=130]
      17: JIT compiled System.Console:get_OutputEncoding() [Tier0, IL size=72, code size=204]
      18: JIT compiled System.ConsolePal:get_OutputEncoding() [Tier0, IL size=11, code size=191]
      19: JIT compiled System.Text.EncodingHelper:GetSupportedConsoleEncoding(int) [Tier0, IL size=53, code size=186]
      20: JIT compiled System.ConsolePal:GetStandardFile(int,int,ubyte) [Tier0, IL size=50, code size=180]
      21: JIT compiled System.ConsolePal:get_InvalidHandleValue() [Tier0, IL size=7, code size=41]
      22: JIT compiled System.ConsolePal:ConsoleHandleIsWritable(long) [Tier0, IL size=24, code size=63]
      23: JIT compiled Interop+Kernel32:WriteFile(long,ulong,int,byref,long) [Tier0, IL size=39, code size=303]
      24: JIT compiled System.ConsolePal+WindowsConsoleStream:.ctor(long,int,ubyte) [Tier0, IL size=37, code size=90]
      25: JIT compiled System.IO.ConsoleStream:.ctor(int) [Tier0, IL size=31, code size=71]
      26: JIT compiled Interop+Kernel32:GetFileType(long) [Tier0, IL size=23, code size=198]
      27: JIT compiled System.Console:CreateOutputWriter(System.IO.Stream) [Tier0, IL size=49, code size=205]
      28: JIT compiled System.Text.EncodingExtensions:RemovePreamble(System.Text.Encoding) [Tier0, IL size=25, code size=110]
      29: JIT compiled System.Text.ConsoleEncoding:.ctor(System.Text.Encoding) [Tier0, IL size=14, code size=52]
      30: JIT compiled System.IO.ConsoleStream:get_CanWrite() [Tier0, IL size=7, code size=18]
      31: JIT compiled System.Text.ConsoleEncoding:GetEncoder() [Tier0, IL size=12, code size=57]
      32: JIT compiled System.IO.ConsoleStream:get_CanSeek() [Tier0, IL size=2, code size=12]
      33: JIT compiled System.Text.ConsoleEncoding:GetPreamble() [Tier0, IL size=6, code size=27]
      34: JIT compiled System.Text.ConsoleEncoding:GetMaxByteCount(int) [Tier0, IL size=13, code size=63]
      35: JIT compiled System.ConsolePal+WindowsConsoleStream:Flush() [Tier0, IL size=26, code size=57]
      36: JIT compiled System.IO.ConsoleStream:Flush() [Tier0, IL size=1, code size=10]
      37: JIT compiled System.ConsolePal+WindowsConsoleStream:Write(System.ReadOnlySpan`1[ubyte]) [Tier0, IL size=36, code size=149]
      38: JIT compiled System.ConsolePal+WindowsConsoleStream:WriteFileNative(long,System.ReadOnlySpan`1[ubyte],ubyte) [Tier0, IL size=115, code size=246]
    ↑↑↑↑ Warm up↑↑↑↑
    ↓↓↓↓ToString↓↓↓↓
      39: JIT compiled System.Math:DivRem(ulong,ulong) [Instrumented Tier1, IL size=16, code size=29]
      40: JIT compiled System.Math:DivRem(ulong,ulong) [Tier1, IL size=16, code size=29]
      41: JIT compiled System.Math:DivRem(uint,uint) [Instrumented Tier1, IL size=16, code size=33]
      42: JIT compiled System.Math:DivRem(uint,uint) [Tier1, IL size=16, code size=33]
      43: JIT compiled System.Span`1[System.Utf16Char]:.ctor(ulong,int) [Tier0, IL size=46, code size=61]
      44: JIT compiled System.Runtime.InteropServices.MemoryMarshal:Cast[ushort,System.Utf16Char](System.ReadOnlySpan`1[ushort]) [Tier0, IL size=112, code size=210]
      45: JIT compiled System.ReadOnlySpan`1[System.Utf16Char]:.ctor(byref,int) [Tier0, IL size=15, code size=39]
      46: JIT compiled System.ReadOnlySpan`1[System.Utf16Char]:.ctor(ulong,int) [Tier0, IL size=46, code size=61]
      47: JIT compiled System.Span`1[System.Utf16Char]:Slice(int) [Tier0, IL size=41, code size=118]
      48: JIT compiled System.Span`1[System.Utf16Char]:.ctor(byref,int) [Tier0, IL size=15, code size=39]
      49: JIT compiled System.ReadOnlySpan`1[System.Utf16Char]:CopyTo(System.Span`1[System.Utf16Char]) [Tier0, IL size=47, code size=84]
      50: JIT compiled System.Buffer:Memmove[System.Utf16Char](byref,byref,ulong) [Tier0, IL size=61, code size=51]
      51: JIT compiled System.Span`1[System.Utf16Char]:Slice(int,int) [Tier0, IL size=39, code size=127]
      52: JIT compiled System.Span`1[System.Utf16Char]:op_Implicit(System.Span`1[System.Utf16Char]) [Tier0, IL size=19, code size=81]
      53: JIT compiled System.Runtime.InteropServices.MemoryMarshal:Cast[System.Utf16Char,ushort](System.ReadOnlySpan`1[System.Utf16Char]) [Tier0, IL size=112, code size=210]
      54: JIT compiled System.Runtime.InteropServices.MemoryMarshal:GetReference[System.Utf16Char](System.ReadOnlySpan`1[System.Utf16Char]) [Tier0, IL size=8, code size=17]
    ToString 6.741140125E+315652
    2088 ms
    
  15. added this to the Future milestone on Jul 26, 2025
  16. removed
    untriaged
    on Jul 26, 2025
  17. locked and limited conversation to collaborators on Apr 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.Numericsin-prtenet-performance

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions