As far I recall the function is JIT’d when it is called second time.
What about the Main method? Would the code inside be JIT’d?
If I mesure some chunk of code, should I wrapped it in a function?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
All .NET (MSIL) code has to be JIT’ed (compiled to native code) before it can be executed.
You are perhaps referring to the fact that once code has been JIT’ed it is cached. The overhead of JIT’ing is only incurred once. If you want to perform a benchmark without the JIT overhead you will have to “preheat” your benchmark or perhaps use NGEN to compile the MSIL permanently.