Skip to content

.NET 7: Tiered compilation causes high memory usage and slowdown #73324

@atarz

Description

@atarz

Hello, first of all apologies for my bad english.

As a civil engineer and software developer, we can work with very large unknown numbers in building analysis.

I wanted to test the new gc region in net 7 with a simple loop like the one below. It's not real code but I wanted to see how it would work in LOH.

    for (int i = 0; i < 1000; i++)
        {
            double[] bak = new double[10000000];

            for (int j = 0; j < bak.Length; j++)
            {
                var tut = bak[j];
            }
        }

dotnet-sdk-7.0.100-rc.1.22378.2-win-x64
ServerGarbageCollection enable

net 7 is twice as slow as net 6

peak memory on net 6=40-60 mb
peak memory on net 7 =1.2 gb

I follow your work with admiration, thank you very much in advance.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions