Skip to content

Parallel parsing - fsc.exe - #11140

Merged
cartermp merged 13 commits into
dotnet:mainfrom
TIHan:parallel-parsing-2
Mar 3, 2021
Merged

Parallel parsing - fsc.exe#11140
cartermp merged 13 commits into
dotnet:mainfrom
TIHan:parallel-parsing-2

Conversation

@TIHan

@TIHanTIHan commented Feb 23, 2021

Copy link
Copy Markdown
Contributor

Enables parallel parsing by default when compiling via fsc.exe. Is a continuation of #10208 and is ready.

This adds a new test compiler option:

  • -test:ParallelOff - turns off concurrent build

Early results

CPU: Core i7-10700K @ 3.8GHz (8 cores, 16 logical cores)
Using command line msbuild FSharp.Compiler.Service.fsproj with only compiling netstandard2.0 target - this is also without generating the parser

  • Parallel Off: Time Elapsed 00:00:38.65
  • Parallel On: Time Elapsed 00:00:34.90

That's a ~9% decrease in compile time when re-building the compiler service.

Comment threadsrc/fsharp/fsc.fs Outdated

@cartermpcartermp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great subject to tests passing!

@cartermpcartermp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great subject to tests passing!

@TIHan

Copy link
Copy Markdown
ContributorAuthor

Almost passing, one test is failing as the order of errors have changed. Will need to investigate.

@TIHan

Copy link
Copy Markdown
ContributorAuthor

It passes!

@TIHan

Copy link
Copy Markdown
ContributorAuthor

@dsyme, this look ok to you?

Comment threadsrc/fsharp/ParseAndCheckInputs.fs
@cartermp
cartermp merged commit d18da33 into dotnet:mainMar 3, 2021
This was referenced Nov 4, 2021
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@TIHan@vzarytovskii@cartermp@dsyme