3 ms·
>tiered compilation .NET has tiered compilation. https://docs.microsoft.com/en-us/dotnet/core/runtime-config/compilation https://docs.microsoft.com/en-us/dotne
by DeathArrow 4y ago
>tiered compilation
.NET has tiered compilation. https://docs.microsoft.com/en-us/dotnet/core/runtime-config/compilation https://docs.microsoft.com/en-us/dotnet/core/runtime-config/...
>JIT caches
.NET has a native image cache. https://docs.microsoft.com/en-us/dotnet/standard/managed-execution-process https://docs.microsoft.com/en-us/dotnet/standard/managed-exe...
>automatic vectorization
NET has automatic vectorization. https://docs.microsoft.com/en-us/cpp/parallel/auto-parallelization-and-auto-vectorization?view=msvc-170 https://docs.microsoft.com/en-us/cpp/parallel/auto-paralleli...
>devirtualization
.NET suports both inlining and devirtualization. https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-6/ https://devblogs.microsoft.com/dotnet/performance-improvemen...
So, basically, none of the downsides you think about exist.
- pjmlp 4y agoI have been doing Java and .NET since they exist, .NET even before it was launched thanks to working for a Microsoft Partner that was part of the launch event in Portugal, which gave us access to early builds, the famous MSDN discs with documentation written in red. Maybe I do know one thing or two about what .NET is lacking versus Java in JIT/AOT department.
- deleted 4y ago[deleted]
- SemanticStrengh 4y agoYou are truly a legend pjmlp :)
- pjmlp 4y agoNah, just old..:)
- electroly 4y agoAs someone who is a career-long C# developer (back to the public beta) who wouldn't touch Java, I think we can be a little more fair here. We in the C# world only recently got tiered compilation and there still isn't an interpreter-based first tier like Java has. Your automatic vectorization link is about C++, not C#; I don't think C# has it. I think OP may be wrong about the devirt, as you state, but I wouldn't be surprised to find that Java can devirt in more situations than C# can due to working on it more. OP probably knows more about it than I do.
- SemanticStrengh 4y agoIt's true .NET is lacking autovectorization support.. (despite leveraging a huge number of intrinsics) however the explict SIMD API of .NET is more complete than the Java Vector API, for advanced use cases.
- pjmlp 4y agoTrue, and much easier to use.