Is IL generated by expression trees optimized?
Ok this is merely curiosity, serves no real world help. I know that with expression trees you can generate MSIL on the fly just like the regular C# compiler does. Since compiler can decide optimizations, I'm tempted to ask what is the case with IL generated during Expression.Compile() . Basically two questions: Since at compile time the compiler can produce different (may be slightly) IL in debug mode and release mode , is there ever a difference in the IL generated by compiling an expression when built in debug mode and release mode? Also JIT which convert IL to native code at run time should