Re: [ADVANCED-DOTNET] Optimization and IL

2004-08-24 Thread Heath Ryan
>It's curious why the C# compiler bothers with it at >all (or rather, why it doesn't always do the trivial opt). I was glad when using vs2002, I had the choice to differ, certain code was compiled wrongly with optimization on... // Ryan - The information includ

Re: [ADVANCED-DOTNET] Optimization and IL

2004-08-23 Thread Shawn A. Van Ness
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 throu

[ADVANCED-DOTNET] Optimization and IL

2004-08-23 Thread Curt Hagenlocher
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.