-
Notifications
You must be signed in to change notification settings - Fork 323
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
Analyze and improve the performance of AliasAnalysis compiler pass #9235
Comments
Unless there is some low hanging fruit we might use this opportunity to rewrite
|
`scopeFor` appears to be a hotspot of the compiler. By choosing a more suitable data structure that indexes on the occurrence's id we seem to gain about 25% on some benchmarks. Quick win. Related to #9235. # Important Notes Local benchmark runs of `org.enso.compiler.benchmarks.module.ManyLocalVarsBenchmark.longMethodWithLotOfLocalVars ` Before ``` [info] # Warmup Iteration 1: 61.638 ms/op [info] # Warmup Iteration 2: 49.224 ms/op [info] # Warmup Iteration 3: 47.341 ms/op [info] # Warmup Iteration 4: 46.946 ms/op [info] # Warmup Iteration 5: 46.901 ms/op [info] # Warmup Iteration 6: 49.536 ms/op [info] Iteration 1: 50.438 ms/op [info] Iteration 2: 47.326 ms/op [info] Iteration 3: 46.917 ms/op [info] Iteration 4: 45.824 ms/op ``` After ``` [info] # Warmup Iteration 1: 86.493 ms/op [info] # Warmup Iteration 2: 36.084 ms/op [info] # Warmup Iteration 3: 32.588 ms/op [info] # Warmup Iteration 4: 33.895 ms/op [info] # Warmup Iteration 5: 31.986 ms/op [info] # Warmup Iteration 6: 31.236 ms/op [info] Iteration 1: 31.258 ms/op [info] Iteration 2: 31.673 ms/op [info] Iteration 3: 30.931 ms/op [info] Iteration 4: 30.902 ms/op ```
This likely seems obsolete. I'm not seeing much time spent in AliasAnalysis phase anymore. |
@hubertp You mean you are not seeing much time spent in |
Related: The |
|
@JaroslavTulach This is expected in this benchmark. This benchmark compiles a method that has a lot of local variables and so, we expect the alias analysis to take a lot of time. That is fine - this is an artificial benchmark that tries to measure the performance of AliasAnalysis. The important question is: "In an average user workflow project, how much time is spent in AliasAnalysis?" To answer the question myself, I would say that this issue is important. As the |
Compiler benchmarks were added in #9158.
The most appropriate benchmark for measuring alias analysis compiler pass is
org.enso.compiler.benchmarks.module.ManyLocalVarsBenchmark.longMethodWithLotOfLocalVars
. Run it with:Note that you can fine-tune benchmark-related options with, for example,
(This increases the number of warmup iterations).
See https://github.com/enso-org/enso/blob/develop/docs/infrastructure/benchmarks.md#running-the-benchmarks
The following picture from VisualVM CPU profiler shows that the vast majority of time is spent in AliasAnalysis:
The text was updated successfully, but these errors were encountered: