Inline in DotNET

xiaoxiao2021-03-05  48

Inline in DotNET

2005-3-31

Inline in the DOTNET is made by the CLR at JIT, and the intra-line function within 16 bytes will be used automatically within 16 bytes. There is a good thing to debug the inline, with an accurate corresponding source code and provide debugging information. However, many people find that they expect the inline function to be inline, resulting in a lot of efficiency losses. In fact, the culprit is the debugger. As long as there is IDE running, there is a debugger that CLR will not do inline. Just turg off all the IDE, run the Release version of the DOTNET program, you will find a lot of speeds.

Some people do the speed test is done in the IDE, that is, their results are just debugging results. A simple access attribute loop, which has a speed difference between the Ide and no IDE. This may be withdrawn with C # with Java's speed, who loves time to fight.

This speed difference is conventionally used to use STL's C programmers, but may not be adapted to Delphi programmers. In fact, it is also similar to Delphi. Delphi is running in the IDE and there is less than 5 times the speed difference between the IDE.

转载请注明原文地址:https://www.9cbs.com/read-34590.html

New Post(0)