Hacker News new | past | comments | ask | show | jobs | submit login

I guess I was thinking of the NGen compiler. My (very vague) memory is that NGen is run at installation time. Is this run after NGen, or instead of it?



In .NET bytecodes are always compiled to native code before execution, there aren't any interpretation steps like in other management environments.

By default, MSIL gets compiled to native code on load via a JIT compiler. The developers that care about performance on startup, can choose to use ngen at installion time, thus taking the JIT out of the equation.

The only issue with ngen is that it isn't able to perform all optimizations that the JIT is capable of.

So this new JIT improves the current JIT and most likely, the optimizer will also be used by ngen.


My (very vague) memory is that NGen is run at installation time

As far as I know, ngen is only used if you decide to use it. There's nothing automatic about installed code being ngen'ed.


Native image generation differs based on the platform. There is automatic native image generation in Windows: see http://msdn.microsoft.com/en-us/library/hh691758.aspx for details. There's also Triton on Windows Phone: http://channel9.msdn.com/Events/Build/2012/3-005.

In the classic Windows Desktop case, however, you're right: you need to NGen your code yourself or call NGen as a custom action from your installer. --Andrew Pardoe [MSFT]


NGen invokes the JIT compiler, so your install time (and .NET servicing time) should be quite a bit lower, once we release RyuJIT as part of the full .NET Runtime. Probably less important, but still important enough for a lot of customers to complain :-)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: