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

AnalyzerDriver should not allocate in proportion to the number of symbols declared #37532

Open
agocke opened this issue Jul 29, 2019 · 3 comments
Labels
Area-Analyzers Area-Compilers Tenet-Performance Regression in measured performance of the product from goals.
Milestone

Comments

@agocke
Copy link
Member

agocke commented Jul 29, 2019

The analyzer driver currently allocates a new closure and delegate for every symbol declared:

private static Action<Diagnostic> GetAddDiagnostic(

This is one example of a couple of places where we allocate memory in proportion of the number of symbols declared in the compilation. Symbols are extremely common in the compiler and this can represent a very heavy allocation burden. We should try to make all analyzer APIs allocate a constant amount when possible, or re-use as many allocations as possible.

@agocke agocke added Area-Analyzers Area-Compilers Tenet-Performance Regression in measured performance of the product from goals. labels Jul 29, 2019
@agocke agocke added this to the Compiler.Next milestone Jul 29, 2019
@agocke
Copy link
Member Author

agocke commented Jul 29, 2019

cc @mavasani

@mavasani
Copy link
Member

Tag @sharwell, who has a handle on bunch of few low hanging perf optimizations on the driver that can help improve performance. Pretty sure this was one of them in his list.

@sharwell
Copy link
Member

This is high impact, but not trivial. Changes to this space are constrained by the fact that it's called from public APIs.

@jaredpar jaredpar modified the milestones: Compiler.Next, Backlog Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Analyzers Area-Compilers Tenet-Performance Regression in measured performance of the product from goals.
Projects
None yet
Development

No branches or pull requests

4 participants