Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.NET CLR - When compiling CIL to platform-specific instructions, what about new CPU architectures, etc.?

When the .NET CLR compiles CIL to platform-specific instructions, what does it do if it is compiling on a new CPU architecture (i.e. one it is not familiar with). Is MS keeping ahead of the curve and releasing new, optimized instruction compiling functionality in .NET by cooperating with architecture vendors (Intel, AMD, etc.)??

like image 542
richard Avatar asked Feb 16 '11 21:02

richard


1 Answers

.Net seems to target architecture families (such as x86, amd64, and ia64) rather than individual architectures. Adding optimization for differing variants and extensions of the three base architecture families is an implementation detail that may or may not improve performance, but is not required to produce running code; these optimizations may be trickled out in point releases, but Microsoft does not appear to be very committed to updating their JIT to get an extra percentage point of speed out of the latest chip.

Edit: It looks like the answer is 'it depends'. The JIT performs some CPU-specific optimizations, but these are only added by Microsoft when they observe clear performance pain points; ahead-of-time compilation with NGen never includes CPU-specific optimization.

like image 158
Jeffrey Hantin Avatar answered Nov 09 '22 10:11

Jeffrey Hantin