JIT-compiled output

G

Gilles Ganault

Hello

I'm learning about .Net, and was wondering about what happens
with the JIT-compiled EXE.

The first time I run my little "Hello, world!" sample, it's a bit
slow, but if I run it again, it's as fast as a VB Classic program.

If that is indeed due to JIT, where does Windows keep the compiled
version: In RAM? In a temporary directory? If the latter, is the
JIT-compiled output kept until the user logs off?

Is there a way to distribute a compiled version of my VB.Net app, so
that performance is as good as my VB Classic apps, even the first time
users launch it?

Thank you.
 
J

Jon Skeet [C# MVP]

Gilles Ganault said:
I'm learning about .Net, and was wondering about what happens
with the JIT-compiled EXE.

The first time I run my little "Hello, world!" sample, it's a bit
slow, but if I run it again, it's as fast as a VB Classic program.

If that is indeed due to JIT, where does Windows keep the compiled
version: In RAM? In a temporary directory? If the latter, is the
JIT-compiled output kept until the user logs off?

No, that's not the JIT - it's just that the second time you load it,
all the .NET framework libraries etc are in the in-memory disk cache.
 
B

Bob Powell [MVP]

As John suggests you are not really seeing the benefits if JIT compiling
here. However if this subject interests you, see this article on my site...
http://www.bobpowell.net/prejit.htm

--
--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top