Is there anything I can do to make f# code compile faster apart from (or better yet instead of) running ngen?
And what is approximate benchmark "hello world" compilation time (or better said compiler startup time+compilation time) for say pentium 4 machine?
Edit There are nuances as it turns out:)
So first, can anyone explain what is start-up time of compiler? And why is it slow. Also links to information on the whole f# compilation process would be appreciated.
Context: f# compiler is repeatedly invoked on small snippets of code through
using (CodeDomProvider provider = new Microsoft.FSharp.Compiler.CodeDom.FSharpCodeProvider())
{
//start time
cr = provider.CompileAssemblyFromSource(cp, new string[] { data.Program });
//end time
}
The time difference is ~6 sec. So the question basically is what can be done, apart from ngen? You can see for yourself here:rundotnet