Skip to content

VS 2022 Preview - Startup time for CoreClr compiler slower than desktop #11907

@TIHan

Description

@TIHan

We recently switched to using the CoreClr compiler for builds in VS instead of the desktop compiler. Doing so, we regressed compile-time performance.
TFM: net5

// Learn more about F# at http://docs.microsoft.com/dotnet/fsharp

open System

// Define a function to construct a message to print
let from whom =
    sprintf "from %s" whom

[<EntryPoint>]
let main argv =
    let message = from "F#" // Call the function
    printfn "Hello world %s" message
    0 // return an integer exit code

CoreClr compiler: 1326 ms Fsc 1 calls
Desktop compiler: 586 ms Fsc 1 calls

It's over double the cost.

This is basically the startup time; I imagine the compiler doesn't actually perform worse on the CoreClr. However, this can be surprising for users as the additional 740ms build-cost per project will add up.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions