-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
speed up resolve-scopes lowering pass #43022
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
Conversation
|
@Keno what type of tests do you want? Tests that the result is correct, or that the performance is good? |
|
Tests that the performance is reasonable would be good. |
|
Given that this is "only" a quadratic speedup, that test seems like it will be kind of brittle... Did you have something in mind? |
|
If we can't reliably separate the fixed and broken cases using timing, I guess putting it on nanosolider would be reasonable. |
0048aa8 to
0942542
Compare
Use a table to avoid each symbol lookup being O(n) in the scope nesting depth.
0942542 to
4545fd2
Compare
|
Is this good to merge now that we have a benchmark PR? |
Use a table to avoid each symbol lookup being O(n) in the scope nesting depth.
Use a table to avoid each symbol lookup being O(n) in the scope nesting depth.
Use a table to avoid each symbol lookup being O(n) in the scope nesting depth.
Usually scopes are not nested too deep, but our
letis actuallylet*, so each variable also introduces a new scope, so long lists of let-bound variables can be a problem.