Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Unfortunately there isn't much you can do -- the F# compiler is just slower than the C# compiler. But let me explain why:</p> <p><strong>Why the F# compiler is slower than the C# compiler</strong></p> <p>First, the F# compiler is written on .NET, the C# compiler is written in C++. While this alone isn't a death sentence to perf, it does make a difference. Second, the C# compiler is 10+ years old. There has been a <em>lot</em> of time to tune and optimize it -- both the compiler itself and the .NET runtime. The .NET JIT engine has been fine-tuned for C#/VB.NET and not F#. Functional programming requires a lot of short-lived objects, which translates to different type of GC behavior.</p> <p>But the real reason why the F# compiler is noticeably slower than the C# compiler is because it is doing <em>more work</em> than the C# compiler. In C# you provide all of the type information, which in a way is you doing work for the compiler. F# on the other hand does type inference for you, which while saving you from the burden of annotation does require additional CPU time.</p> <p><strong>What you can do</strong></p> <p>I recommend you download the Visual Studio 2008 shell and use F# targeting the .NET Framework 2.0. Unless you need something that is in Visual Studio 2010 or CLR 4.0 only, you will be fine on Visual Studio 2008. The F# language functions the exact same. The only difference, IIRC, is in what types certain things compile to. For example, there is a Tuple&lt;_> type built into CLR 4.0, but when targeting CLR 2.0 the tuple type defined in FSharp.Core.dll is used.</p> <p>Visual Studio 2010 offers a lot of slick bells and whistles, such as a WPF-based code editor. However, those niceties consume a lot of RAM and in your case it sounds like you can live without them.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload