-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
The frame times of my toy ray tracer increased from 24ms to 30ms #78127
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
This is a result of the new On-Stack Replacement feature (aka OSR) in .NET 7. You can disable this feature by adding the following lines to your <PropertyGroup>
<TieredCompilationQuickJitForLoops>false</TieredCompilationQuickJitForLoops>
</PropertyGroup> When I do this, I see ~5% faster times for .NET 7. [edit: fixed the property name and value] FYI @dotnet/jit-contrib -- I have not yet drilled in to see where OSR is losing perf. |
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailsDescriptionI was encouraged to open an issue here by people on Reddit: https://www.reddit.com/r/csharp/comments/ypqn03/net_7_is_out_now/ivl99xy/ Here is the link to my repo: https://github.com/BTOdell/SharpRay With the GA release of .NET 7, I decided to upgrade the version of my toy ray tracing project from .NET 6.0.403 to 7.0.100 in the hopes that I could get some "free" performance with the new version. Configuration.NET versions: 6.0.403 and 7.0.100 Regression?The regression appears to happen when targeting a newer framework: Images
AnalysisSorry if this issue isn't related to the runtime. It might have to do with the C# language compilation to IL?
|
Related: #67594. |
Profile of 20 seconds of the app on .NET 7 (with default behavior) I think perfview's attribution of Run as "ReadyToRun" is wrong, this is OSR code. Corresponding profile from .NET 6 Looking at |
This seems to be fixed with latest .NET 8 builds (will be available in Preview 4)
I' m going to close this. @BTOdell once Preview 4 is out give it a try and see if you see the same. If not, please re-open. |
Description
I was encouraged to open an issue here by people on Reddit: https://www.reddit.com/r/csharp/comments/ypqn03/net_7_is_out_now/ivl99xy/
Here is the link to my repo: https://github.com/BTOdell/SharpRay
With the GA release of .NET 7, I decided to upgrade the version of my toy ray tracing project from .NET 6.0.403 to 7.0.100 in the hopes that I could get some "free" performance with the new version.
Unfortunately, the frame times of my app increased from 24ms to 30ms on my machine when I change the target framework from 6.0 to 7.0.
Configuration
.NET versions: 6.0.403 and 7.0.100
OS: Windows x64 build 19043
CPU: Intel i9-9960X with 64GB DDR4-3600
Regression?
The regression appears to happen when targeting a newer framework:
net6.0
tonet7.0
If the target framework is set to
net6.0
, then the performance is the same on both versions of the runtime.Images
.NET 6.0.403 (target net6.0):
.NET 7.0.100 (target net6.0):
.NET 7.0.100 (target net7.0):
dotnet restore
was used before each run to ensure the correct configuration was applied.Analysis
Sorry if this issue isn't related to the runtime. It might have to do with the C# language compilation to IL?
The text was updated successfully, but these errors were encountered: