Skip to content
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

Migrate to .NET 9 #198

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Conversation

marco-carvalho
Copy link
Contributor

No description provided.

@github-actions github-actions bot added audio Affects Audio playback during emulation cpu An issue with ARM emulation or the JIT gpu Affects GPU emulation graphics-backend:opengl Affects the OpenGL Graphics backend graphics-backend:vulkan Affects the Vulkan Graphics backend gui Affects the Avalonia UI or translations. horizon Affects the Horizon OS HLE components. labels Nov 6, 2024
@WilliamWsyHK
Copy link
Contributor

We should only merge this once .NET 9 has been released globally out of RC, and the version of the global.json is update again to match latest release version.

Meanwhile, we need more people to test and see what has happened, e.g. performance regression/broken game functionality.

@GreemDev
Copy link
Owner

GreemDev commented Nov 7, 2024

We should only merge this once .NET 9 has been released globally out of RC, and the version of the global.json is update again to match latest release version.

Pretty sure that's why this was opened as a draft.

@marco-carvalho
Copy link
Contributor Author

I opened this as a draft precisely because .NET 9 is still in RC; I’ll update the global.json to the latest release version once .NET 9 is officially out. Meanwhile, I’ll encourage additional testing to check for any performance regressions or broken functionality.

@bangfire
Copy link

There's some low hanging fruit you could probably add to this PR such as the new Lock object: https://learn.microsoft.com/en-us/dotnet/api/system.threading.lock?view=net-9.0

A quick find replace on object _lock has a a lot of hits that are free to update.

@mattzink
Copy link

mattzink commented Nov 13, 2024

Those warnings about Lock being upcast to object will result in runtime failures. You need to update the method signatures to Lock as well when you pass instances around.

@LukeWarnut
Copy link
Contributor

LGTM. Seems to give a 1% FPS increase on my setup.

@mattzink
Copy link

mattzink commented Dec 3, 2024

I think all runtime synchronized packages (System.IO.Hashing and System.Managment) should be updated to 9.0.0 as well.

@LukeWarnut
Copy link
Contributor

LukeWarnut commented Dec 3, 2024

Improves performance in pretty much every game on my machine (i7-13620H, RTX 4070)

Super Mario Odyssey: +4.2 FPS
The Legend of Zelda: Echoes of Wisdom: +0.6 FPS
Mario Party Superstars +5.3 FPS
Balatro: +2.2 FPS
Minecraft: NSW Edition: +13.7 FPS

@ViRb3
Copy link

ViRb3 commented Dec 3, 2024

@marco-carvalho do you have any reference for "Linq.Any/Linq.FirstOrDefault are now faster than List.Exists/List.Find"? I tried to search but didn't find any existing article or benchmark.

On another note, just came across an article claiming ToArray is now always faster than ToList. Some instances can be changed in the code.

@marco-carvalho
Copy link
Contributor Author

@ViRb3
SonarSource/sonar-dotnet#9664
SonarSource/sonar-dotnet#9665

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
audio Affects Audio playback during emulation cpu An issue with ARM emulation or the JIT gpu Affects GPU emulation graphics-backend:opengl Affects the OpenGL Graphics backend graphics-backend:vulkan Affects the Vulkan Graphics backend gui Affects the Avalonia UI or translations. horizon Affects the Horizon OS HLE components.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants