dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
14.96k stars 4.65k forks source link

Survey: Native AOT #40430

Closed jkotas closed 4 years ago

jkotas commented 4 years ago

Performance has been a key .NET feature. The existing options for optimizing published applications work well for most scenarios that .NET targets today.

Some of you asked us to consider adding native AOT compilation option with distinctly different characteristics. The distinctly different characteristics of native AOT come with tradeoffs such as lower compatibility that are explained in detail in .NET Runtime Form Factors. We’ve created a survey to help us better understand the native AOT use cases.

We would appreciate your feedback so we can work on creating the right plans for future. If you don’t supply contact details, then responses will be anonymous.

Survey: https://www.surveymonkey.com/r/7THQK5K

Thank you for your time!

lateralusX commented 4 years ago

AOT w/ static linking is urgent needed for game engines in iOS and console platform which disable jit,

I totally agree here. As we are in need of a solution for this problem (C# code running on game consoles for a non Unity project) we are using a Mono-AOT based tool chain. But it has some serious limitations and doesn't perform that well. 

Therefore we are looking into getting CoreRT running on 3 poplar game consoles (XBox One; PlayStation 4 and Nintendo Switch). An initial prof of concept show that it actually works (still with some limitations) but already with an significant run time performances improvement compared to the Mono based solution.

But with the NDA situation around game consoles official support for this use cause is properly even more far fetched than getting official native AOT in the first place.

@RalfKornmannEnvision Are you using the Xamarin Xbox One/PS4 Mono ports with LLVM codegen?

RalfKornmannEnvision commented 4 years ago

@RalfKornmannEnvision Are you using the Xamarin Xbox One/PS4 Mono ports with LLVM codegen?

@lateralusX As the integration was done by someone else I don't know any detail. But as far as I know they used the mono ports that are provided for the XBox One/PS4 and made a simple port for the Switch. themself.

lateralusX commented 4 years ago

@RalfKornmannEnvision Would be great to get in contact and discuss the experience related to this. The LLVM codegen has (depending on project) very positive performance effects on the generated code so if that was not used (needs to be enabled) there is normally a lot to gain by just enabling that. Are you on the DotNetEvolution discord server, if so maybe we could have an offline discussion there related to this?

RalfKornmannEnvision commented 4 years ago

@lateralusX I am pretty sure the team members who worked on this have enabled the LLVM codegen and tried other things. Their last statement before moving on to another project was that this is the best they could do.

As part of my investigation I build a benchmark with the core component using Xamarin Android and run it on a Tegra X1 based device to see if we lost performances because of an issue with the our custom Switch port of Mono. Unfortunately the performance of the Xamarin project was not that different of what we have seen on the Switch. 

I am sorry I am not on this discord server and to be honest their is not that much I know about the current MONO integration anyway. From my point of view it's a dead end anyway for this project. The current CoreRT prototype (while having even less official support) is already far superior when it comes to performances and usability. 

lateralusX commented 4 years ago

@RalfKornmannEnvision OK, thanks for your information and feedback, all very valuable.