.NET 8 Native AOT is Insane

Faster startup time and smaller memory footprints.

Alex Maher
3 min readNov 28, 2023

Native AOT in a Nutshell

Native AOT stands out as a feature that lets you compile your applications into native code. This means your app can run on machines without needing the .NET runtime installed.

You add <PublishAot>true</PublishAot> to your project file, and voilà, you're on your way to experiencing significantly improved performance​​​​​​.

Here are some ASP.NET AOT app stats:

Performance Gains vs. Limitations

But it’s not all smooth sailing. You notice that not every ASP.NET Core feature is compatible with Native AOT. This requires you to be strategic about when and how you use it​​.

The Real-World

Let’s say you’re developing a gRPC service. By using Native AOT, you see a reduction in your app’s disk footprint and memory demand.

The startup time? Much faster.

It’s a noticeable improvement, but you’re also aware that you have to carefully…

--

--

Alex Maher

.NET C# dev with 10+ yrs exp, self-taught & passionate web developer. Sharing tips & experiences in C# and web dev.