Hi @Don Z ,
From what I found, I couldn’t find a confirmed Utf8JsonWriter-specific issue in Native AOT.
Native AOT can improve startup time, app size, and memory usage, but it does not always make long-running code faster. For this kind of workload, the managed JIT may still perform better because it can optimize hot code while the application is running. Native AOT code is fixed at publish time. Microsoft documents the AOT speed/size trade-off here: Optimize AOT deployments.
I also found this article showing similar benchmark behavior: Native AOT can win when startup matters, but managed code can match or beat it after startup.
Disclaimer: This is a non-Microsoft article. I found it useful for comparison, but please review any ads or downloads on the site carefully before installing anything.
For your case, I would first try publishing the AOT version with speed optimization and compare again:
<PropertyGroup>
<PublishAot>true</PublishAot>
<OptimizationPreference>Speed</OptimizationPreference>
</PropertyGroup>
If the gap is still large, I would compare the GC settings next. Writing a large JSON document can create a lot of allocation and buffer pressure, so it is worth checking whether both builds are using comparable GC behavior. For example, you can test with Server GC enabled:
<PropertyGroup>
<ServerGarbageCollection>true</ServerGarbageCollection>
</PropertyGroup>
If the AOT build is still around 3.5x slower after those checks, a small reproducible benchmark would be the best next step to narrow this down.
Hope this helps. If the information I provided was helpful to you, I would greatly appreciate it if you could follow the instructions here.