Lloyd Dupont <net.galador@ld> wrote:
All it does is remove JIT costs, sometimes at the expense of other
optimisations. Hu? "sometimes at the expense of other optimisations"?
Really?
Yes.
I've read that it could slow down cold startup as native image are much
bigger
(hence more IO), but I'm otherwise surprised by your statment...
Could you elaborate a bit more perhaps? Just curious....
Well, from the docs for Ngen in the MSDN for .NET 2.0:
<quote>
For long-running applications, run-time JIT compilation performs
slightly better than native images. (Hard binding can mitigate this
performance difference to some degree.)
</quote>
Jeffrey Richter talks a little bit about it at (watch for line-wrap):
http://www.codeguru.com/Csharp/.NET/...rdparty/articl
e.php/c4651
Junfeng Zhang then rebuts Jeffrey's points in
http://blogs.msdn.com/junfeng/archiv.../27/97304.aspx
but does allow:
<quote>
And statistics shows, NGEN=3Fd file at worst performs 5-10% worse than
runtime jitter. And it has a big win in startup time since you don=3Ft
have to compile the IL assembly. I will certainly accept the very small
percentage runtime performance decrease, in trade of the startup
performance gain.
</quote>
(Interesting to note that Junfeng doesn't mention in which situations
he accepts that performance decrease. For a short-running desktop app,
that's reasonable. For a service, it's not really.)
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog:
http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too