-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add Expander fast paths for expressions used in .NET SDK 9 #10409
Add Expander fast paths for expressions used in .NET SDK 9 #10409
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 LGTM, thank you for doing this so quickly! For future-us, is there a point at which we would want to switch from a series of if/else for matching to something more like a switch/dictionary lookup?
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.
For future-us, is there a point at which we would want to switch from a series of if/else for matching to something more like a switch/dictionary lookup?
Yeah I think there's a fair amount of room for tweaking here--personally I'd lean toward "make it generated from data" first, because that could let us use some of the sneakier "match to a set of strings" techniques.
Oh, definitely yes! |
Fixes #10398
Context
Is fastpath isn't added for the method, it gets resoled by using reflection that is an expensive operation.
Since the covered methods are actively used by the main customers, they were added to MSBuild.
Changes Made
Add the method from the linked tickets.
Testing
Covered with unit tests.