English 中文(简体)
f 初步汇编
原标题:f# slow compilation

除了(或更不用说)管理先质之外,我能做些什么来更快地编纂成像法?

pent 4号机器的“hello World”汇编时间(或更称编者启动时间+复合时间)是多少大致基准?

<><>Edit>/strong> 存在细微差别,因为它表明:

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.

内容:f 编号汇编者一再通过小型编码信条被援引。

using (CodeDomProvider provider = new Microsoft.FSharp.Compiler.CodeDom.FSharpCodeProvider())
{
  //start time
  cr = provider.CompileAssemblyFromSource(cp, new string[] { data.Program });
  //end time
}

时间差异为6秒。 因此,除了先天外,问题基本上是可以做些什么? http://rextester.com/rundotnet rel=“nofollow”

最佳回答

This takes 0.9s on my computer (AMD Athlon 64 X2 4600):

#r "FSharp.Compiler.CodeDom"

open System.Reflection
open System.CodeDom.Compiler
open Microsoft.FSharp.Compiler.CodeDom

let comp() =
    use provider = new FSharpCodeProvider() 
    let code = "module pp
 printfn "Hello world""
    let cp = new CompilerParameters() 
    cp.GenerateInMemory <- true 
    provider.CompileAssemblyFromSource(cp, [|code|]) |> ignore
#time
comp()
问题回答

暂无回答




相关问题
What to look for in performance analyzer in VS 2008

What to look for in performance analyzer in VS 2008 I am using VS Team system and got the performance wizard and reports going. What benchmarks/process do I use? There is a lot of stuff in the ...

SQL Table Size And Query Performance

We have a number of items coming in from a web service; each item containing an unknown number of properties. We are storing them in a database with the following Schema. Items - ItemID - ...

How to speed up Visual Studio 2008? Add more resources?

I m using Visual Studio 2008 (with the latest service pack) I also have ReSharper 4.5 installed. ReSharper Code analysis/ scan is turned off. OS: Windows 7 Enterprise Edition It takes me a long time ...

Manually implementing high performance algorithms in .NET

As a learning experience I recently tried implementing Quicksort with 3 way partitioning in C#. Apart from needing to add an extra range check on the left/right variables before the recursive call, ...

How do I profile `paster serve` s startup time?

Python s paster serve app.ini is taking longer than I would like to be ready for the first request. I know how to profile requests with middleware, but how do I profile the initialization time? I ...

热门标签