-
Notifications
You must be signed in to change notification settings - Fork 789
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
IlxGen parallelization #14372
IlxGen parallelization #14372
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good. Perhaps have a think about the oversized collections. And also whether there is a good heuristic for sizing collections.
Thanks
Kevin
Will address this right after this PR. |
This is right now implemented as an opt-in feature that allows parallel run of generating the code of method bodies, later in the IlxGen process.
It is not a full parallelization, since anything besides method body generation still happens eagerly and sequentially.
This can be enabled either by:
--test:ParallelIlxGen
command line switch to fsc.exeEnvironment variable
Environment.GetEnvironmentVariable("FSHARP_EXPERIMENTAL_FEATURES") |> isNotNull
The environment variable option is preferred to get dogfooding as much as we can.
Current timing for ComponentTests project:
Old, sequential approach:
Parallel approach (most of the code is still sequential though. That is why the impact is not that big):
When implementing this, AssemblyCodeGen had to be made thread safe. While at it, locking has been reduced for certain common global functions.