> While I agree that the JIT is a good candidate for optimizations, > let's not overreact on the scale the JIT can actually do something: its time > is limited and therefore its knowledge of what it deals with. The JIT should > be a central system which knows everything but that's not realistic: it should > be given hints and optimized code so it can do its job better.
It's of course right that due to its time limits, a JIT compiler cannot optimize as much as would be possible. However, I still think that a JIT compiler could make much more reasonable assumptions about when to share boxed structs than the C# compiler can. And I also still think that optimizing boxing instructions would be moot in most cases anyway. > So ultimately, > a compiler working for a JIT-based runtime, should optimize the code in such a > way that the JIT can make better decisions, in less time so it knows more. Actually it would be quite interesting to have a common IL optimizer engine to analyze a program given it's compiled form. The engine could transform the program and embed hints to assist the JIT compiler. Fabian =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com