Time taken for function loading in C#
I am using microsoft analyzer tool for performance analysis. I find that in C# time taken to load a method is more than time for execution . Function load time is depending upon the number of 开发者_如何学Clines of code in that method Please Replay as soon as possible
.NET uses JIT (Just In Time) to turn the IL to assembly on first access, therefore the first time a function is called takes longer than the following times.
You may precompile the code on the target machine using Ngen. The same technique is used if you place an assembly in the global assembly cache (GAC).
This might speed up your code.
I find that in C# time taken to load a method is more than time for execution .
What is the method?
Function load time is depending upon the number of lines of code in that method
Sounds reasonable.
What is the problem? If whatever your project is depends on performance at this low of a level managed code is not the right choice for you. Try C and ASM.
精彩评论