Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parallel parsing - fsc.exe #11140

Merged
merged 13 commits into from
Mar 3, 2021
Merged

Parallel parsing - fsc.exe #11140

merged 13 commits into from
Mar 3, 2021

Conversation

TIHan
Copy link
Contributor

@TIHan TIHan commented Feb 23, 2021

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.

src/fsharp/fsc.fs Outdated Show resolved Hide resolved
Copy link
Contributor

@cartermp cartermp left a comment

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!

Copy link
Contributor

@cartermp cartermp left a comment

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
Contributor Author

TIHan commented Feb 26, 2021

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

@TIHan
Copy link
Contributor Author

TIHan commented Feb 26, 2021

It passes!

@TIHan
Copy link
Contributor Author

TIHan commented Feb 26, 2021

@dsyme, this look ok to you?

@cartermp cartermp merged commit d18da33 into dotnet:main Mar 3, 2021
Sign up for free to 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