Skip to content

Make GreenNode.CreateList static - #48536

Merged
333fred merged 4 commits into
dotnet:masterfrom
HurricanKai:GreenNode-CreateList-Static
Oct 13, 2020
Merged

333fred merged 4 commits into
dotnet:masterfrom
HurricanKai:GreenNode-CreateList-Static

Conversation

@HurricanKai

@HurricanKai HurricanKai commented Oct 12, 2020 •

Copy link
Copy Markdown
Member

As discussed with @CyrusNajmabadi on discord this PR makes GreenNode.CreateList static and adjusts all usages.

This done to simplify the method and remove the virtual call which should help performance somewhat, but I couldn't get perf numbers that could directly confirm this.

I'm not sure whether members should also be reordered. I left them as is for now.

@HurricanKai
HurricanKai requested a review from a team as a code owner October 12, 2020 21:47
@Dotnet-GitSync-Bot

Copy link
Copy Markdown
Collaborator

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

@dnfadmin

dnfadmin commented Oct 12, 2020 •

Copy link
Copy Markdown

CLA assistant check
All CLA requirements met.

@333fred 333fred added Area-Compilers Community The pull request was submitted by a contributor who is not a Microsoft employee. labels Oct 12, 2020
Comment thread src/Compilers/Core/Portable/Syntax/SyntaxList`1.cs

@333fred 333fred left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Done review pass (commit 1)

@HurricanKai
HurricanKai requested a review from 333fred October 13, 2020 14:23
@CyrusNajmabadi

Copy link
Copy Markdown
Contributor

@dotnet/roslyn-compiler can we get a second pair of eyes on this nice community PR? :)

@333fred 333fred left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM (commit 4). @dotnet/roslyn-compiler for a second review. There are no perf numbers in this PR, but Kai is planning on submitting a second PR that actually refactors the implementation of GreenNode.CreateList that removes a bunch of double-allocations that should have a big impact, and this first change will simplify that.

@CyrusNajmabadi

Copy link
Copy Markdown
Contributor

There are no perf numbers in this PR,

True. Though changing these virtual methods (and extra parameters and whatnot) to just static calls, should be pure benefit. At worse, we should have no perf change. A best, potentially some uptick :)

@333fred
333fred merged commit 6d353ee into dotnet:master Oct 13, 2020
@ghost ghost added this to the Next milestone Oct 13, 2020
@333fred

333fred commented Oct 13, 2020

Copy link
Copy Markdown
Member

Thanks @HurricanKai!

@HurricanKai
HurricanKai deleted the GreenNode-CreateList-Static branch October 13, 2020 20:06
@allisonchou allisonchou modified the milestones: Next, 16.9.P2 Nov 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Compilers Community The pull request was submitted by a contributor who is not a Microsoft employee.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants