-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Python: Disallow PostUpdateNode
as LocalSourceNode
#5690
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
Python: Disallow PostUpdateNode
as LocalSourceNode
#5690
Conversation
Previously, in cases like ```python def foo(x): x.bar() x.baz() x.quux() ``` we would have flow from the first `x` to each use _and_ flow from the post-update node for each method call to each subsequent use, and all of these would be `LocalSourceNode`s. For large functions with the above pattern, this would lead to a quadratic blowup in `hasLocalSource`. With this commit, only the first of these will count as a `LocalSourceNode`, and the blowup disappears.
Hmm... Test failures seem to indicate that having |
Specifically, allow the ones arising from calls, but not reads or writes. This should fix the tests.
Performance: https://github.com/dsp-testing/tausbn-dca/issues/13 |
Goes into some detail about the intended semantics of local source nodes and `flowsTo`.
As the behaviour has now changed since the last performance test, I'm running another one. |
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.
Great comments! Happy to merge this once the performance has been verified :-)
Evaluation (still) running here: https://github.com/dsp-testing/tausbn-dca/issues/14 |
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.
Evaluations look great :-)
Previously, in cases like
we would have flow from the first
x
to each use and flow from thepost-update node for each method call to each subsequent use, and all
of these would be
LocalSourceNode
s. For large functions with the abovepattern, this would lead to a quadratic blowup in
hasLocalSource
.With this commit, only the first of these will count as a
LocalSourceNode
, and the blowup disappears.Evaluation needed. I don't think a change note is necessary (but I'm willing to be convinced otherwise).