Since .NET executables are distributed in IL form and JIT compiled the first time a block of code executes, the number of optimizations you can perform at source code compile time is limited. For one thing, you don't know at the time your source code is being compiled to IL what CPU architecture your code will be running on at runtime - 32 bit or 64 bit x86? ARM? Other?
To avoid experiencing a delay the first time your function is called and the JIT compiler kicks in, you should look into using the NGEN compiler to "precompile" the IL code in your managed assemblies into native machine code. The native code will be cached on the local hard disk.
Though NGEN has the potential to do more time-intensive code analysis and optimizations on the generated native machine code than the JIT can afford to do, the last time I checked NGEN does not perform any optimizations beyond what the JIT compiler does.
In the 1.0 .NET release, NGEN code could actually suffer a slight performance penalty because all calls out of module went through an indirect jump whereas the JIT compiler would encode the actual destination address in the call site. I believe this NGEN indirection has been removed in the .NET 2.0 and later platforms.