Skip to content

Reduced .NET8 R2R performance  #96242

Closed
@JensNordenbro

Description

@JensNordenbro

Description

On arm64, using PublishReadyToRun on the attached project; you will get reduced performance using .NET8 (not present in NET7, NET6).

dotnet publish .\Arm64Net8JitError.csproj -f net6.0-windows -r win-arm64 -c Release --no-self-contained -p:PublishReadyToRun=true -o error_62_net6
 
dotnet publish .\Arm64Net8JitError.csproj -f net8.0-windows -r win-arm64 -c Release --no-self-contained -p:PublishReadyToRun=true -o error_63_net8

On my machine:
NET6: 10ms
NET8: 650ms

To help you guys get started, we have extracted a minimal reproduce project that triggers the error from a real application if you wonder why the app has no apparent purpose.

Changing from struct to class on Point2D will remove the problem.
Arm64Net8JitError.zip

Reproduction Steps

Start program published with parameter PublishReadyToRun:true and press the one button and get a messagebox with the init time to spot the difference.

Expected behavior

Non regressed performance.

Actual behavior

Really bad performance -> real world applicaton starts 10 times slower. Attached benchmark app is even slower than that.

Regression?

Yes, works in NET6.0, NET7.0

Known Workarounds

Convert Point2D struct to class instead.

Configuration

See description.

Other information

We target imx8MPlus.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions