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

Avoid exponential execution time behavior in arith_expr_type() #971

Merged

Conversation

larsclausen
Copy link
Collaborator

arith_expr_type() queries the expression type of its two child nodes up to two times. Since the child nodes might also need to query their child nodes expression type to determine their own this can lead to an exponential runtime.

For complex expressions this can easily result in very long elaboration time.

Avoid this by querying the expression type only once for each child node.

Resolves #967

arith_expr_type() queries the expression type of its two child nodes up to two
times. Since the child nodes might also need to query their child nodes
expression type to determine their own this can lead to an exponential runtime.

For complex expressions this can easily result in very long elaboration time.

Avoid this by querying the expression type only once for each child node.

Signed-off-by: Lars-Peter Clausen <[email protected]>
@steveicarus steveicarus merged commit f2621d8 into steveicarus:master Jul 14, 2023
5 checks passed
@larsclausen larsclausen deleted the arith-expr-type-fix-runtime branch July 24, 2023 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

regression: hangs during elaboration
2 participants