.NET platform performance

I have a .NET 4.0 class that uses only .Net 2.0 features. To make this library more compatible with Mono, I am considering changing the Target Framework to 2.0 instead of the 4.0 Client Profile.

But the question is: does Target Framework change to an older version, slows down the library (degrades performance). The GUI of the application will continue to target 4.0, so the entire Windows PC running the application will have version 4.0 installed. Will my library 2.0 be executed by the 4.0 JIT compiler (performance should be the same) or an older version of JIT 2.0 (performance may be slower)?

+3
source share
3 answers

No, since the application is still aimed at version 4 of the framework (as you said, “the GUI of the application will still be targeted at 4”), then all the code will use V4 jit and, therefore, run at V4 speed, even if this dll target V2 framework.

+1
source

If you target the old environment, then the code will execute on the old CLR. Thus, the performance will be the same CLR and potentially slower, but you will have to profile to see if this is a problem.

+1
source

.NET Framework 4 , 1.1, 2.0, 3.0 3.5.

, , . , .

See here for more details.

0
source

Source: https://habr.com/ru/post/1769123/


All Articles