Right, the opt/unopt IL is only trivially different. It's curious why the C# compiler bothers with it at all (or rather, why it doesn't always do the trivial opt).
To be sure, the JITter does the vast majority of the optimization. And it's pretty good, as various benchmarks of managed-code throughput show. However, if you follow these lists, you'll occassionally spot x86 junkies like Jeroen F spot its misses -- like the recent thread about passing large structures (eg: DirectX's Matrix) as method arguments shows. -S -----Original Message----- From: Curt Hagenlocher [mailto:[EMAIL PROTECTED] Sent: Monday, August 23, 2004 15:27 Subject: Optimization and IL How good is the (x86) JITter at producing optimal code from IL? I was looking at some IL generated by the C# compiler, and it struck me as fairly even when optimization was turned on. Of course, this doesn't matter if the JITter can optimize away the superfluous local variables, loads and stores. (Of course, my idea of what constiutes efficient IL may not reflect reality, either...) -- Curt Hagenlocher [EMAIL PROTECTED] =================================== This list is hosted by DevelopMentorR http://www.develop.com Some .NET courses you may be interested in: Essential .NET: building applications and components with CSharp August 30 - September 3, in Los Angeles http://www.develop.com/courses/edotnet View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentorŪ http://www.develop.com Some .NET courses you may be interested in: Essential .NET: building applications and components with CSharp August 30 - September 3, in Los Angeles http://www.develop.com/courses/edotnet View archives and manage your subscription(s) at http://discuss.develop.com