Increased Runtime Duration for Java Functions in .NET Android Compared to Xamarin Android #9601
Open
Description
Android framework version
net9.0-android, net8.0-android
Affected platform version
VS 2022 17.12.3
Description
I recently converted a Xamarin Android app to .NET Android (net8.0-android). I noticed that while the startup performance has improved, other functions are taking longer to execute at runtime. This is particularly evident when executing Java functions. In a simple comparison between Xamarin and .NET, I measured the following times for executing Java.Lang.Math.Sqrt:
- Xamarin: 14 µs
- .NET: 25 µs
How can this significant performance difference be explained?
Attached is a speedscope file that I recorded for the .NET app.
dotnet-dsrouter.exe_20241208_140545.speedscope.json
Steps to Reproduce
N/A
Did you find any workaround?
N/A