Most of the optimization of C # code continues at the JIT compiler level, not at the C # compiler. Basically, there are no such detailed settings as those available in C or C ++.
There are several performance-related runtime elements that you can customize, for example, GC strategies, but not really.
When I build test tests, etc. from the command line, I usually use something like this:
csc /o+ /debug- Test.cs
(I believe that having the appropriate pdb file matters for performance, perhaps in terms of the cost of the exceptions that were selected, therefore, the switch debug-... but I could be wrong.)
EDIT: , , , :
- ildasm Reflector IL, ,
- ( ilasm) ,