Интересные результаты получаются.
Если скомпилить в 4.8б то получаем:
PS C:\tmp\ProbaConsole> .\WinTime32.exe .\net4\Program.exe
Hello!
PageFaultCount: 3004
PeakWorkingSetSize: 10.89 MiB
QuotaPeakPagedPoolUsage: 173.8 KiB
QuotaPeakNonPagedPoolUsage: 11.66 KiB
PeakPagefileUsage: 8.992 MiB
Creation time 2024/01/15 10:52:54.677
Exit time 2024/01/15 10:52:54.721
Далее корка
(sc single file x64)
PS C:\tmp\ProbaConsole> .\WinTime64.exe C:\tmp\ProbaConsole\net8\bin\release\net8.0\win-x64\publish\net8.exe
Hello!
PageFaultCount: 4515
PeakWorkingSetSize: 16.55 MiB
QuotaPeakPagedPoolUsage: 259.3 KiB
QuotaPeakNonPagedPoolUsage: 18.46 KiB
PeakPagefileUsage: 5.402 MiB
Creation time 2024/01/15 10:56:56.893
Exit time 2024/01/15 10:56:59.295
память 1.5 время > 2sec
PS C:\tmp\ProbaConsole> .\WinTime64.exe -- dotnet.exe run -c release --project C:\tmp\ProbaConsole\net8\
Hello!
PageFaultCount: 63849
PeakWorkingSetSize: 161.5 MiB
QuotaPeakPagedPoolUsage: 454.6 KiB
QuotaPeakNonPagedPoolUsage: 95.4 KiB
PeakPagefileUsage: 93.32 MiB
Exit time 2024/01/15 10:55:15.795
Wall time: 0 days, 00:00:02.925 (2.93 seconds)
Kernel time: 0 days, 00:00:03.468 (3.47 seconds)
PS C:\tmp\ProbaConsole> .\wintime64.exe -- dotnet .\net8\bin\release\net8.0\win-x64\net8.dll
Hello!
PageFaultCount: 4207
PeakWorkingSetSize: 15.29 MiB
QuotaPeakPagedPoolUsage: 145.9 KiB
QuotaPeakNonPagedPoolUsage: 14.74 KiB
PeakPagefileUsage: 5.098 MiB
Creation time 2024/01/15 10:58:56.734
Exit time 2024/01/15 10:58:56.799
Wall time: 0 days, 00:00:00.064 (0.06 seconds)
User time: 0 days, 00:00:00.031 (0.03 seconds)
Kernel time: 0 days, 00:00:00.031 (0.03 seconds)
Получается самый приемлемый вариант, это запуск dll.
PS Хотя все еще гораздо хуже 4ки. в коре-тим главный инженер поменялся?