Skip to content

Python: Fix bad points-to joins #5679

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

Merged
merged 2 commits into from
Apr 20, 2021

Conversation

tausbn
Copy link
Contributor

@tausbn tausbn commented Apr 14, 2021

A collaboration with @yoff.

These joins were observed to result in very bad performance on g/AllenSun7/COVID-19_Tweets-analysis, and possibly other projects as well. Either way, the joins prevented should be undesirable under all circumstances.

No change note required for this. Only thing affected should be performance.

Evaluation, however, will be required.

tausbn added 2 commits April 14, 2021 15:36
The recent change to `appliesTo` lead to a perturbation in the join
order of this predicate, which resulted in a cartesian product between
`call` and `ctx` being created (before being filtered by `appliesTo`).

By splitting the intermediate result into its own helper predicate,
suitably marked to prevent inlining/magic, we prevent this from
happening again.
In some cases, we were joining the result of `val.getClass()` against
the first argument of `Types::improperSubclass` before filtering out the
vast majority of tuples by the call to `isinstance_call`.

To fix this, we let `isinstance_call` take care of figuring out the
class of the value being tested. As a bonus, this cleans up the only
other place where `isinstance_call` is used, where we _also_ want to
know the class of the value being tested in the `isinstance` call.
@tausbn tausbn added Awaiting evaluation Do not merge yet, this PR is waiting for an evaluation to finish no-change-note-required This PR does not need a change note labels Apr 14, 2021
@tausbn tausbn requested a review from a team as a code owner April 14, 2021 17:01
@tausbn
Copy link
Contributor Author

tausbn commented Apr 15, 2021

A modest improvement, but an improvement nonetheless: https://github.com/dsp-testing/tausbn-dca/issues/12

@tausbn tausbn removed the Awaiting evaluation Do not merge yet, this PR is waiting for an evaluation to finish label Apr 15, 2021
Copy link
Contributor

@yoff yoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yoff yoff merged commit ef0ea24 into github:main Apr 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-change-note-required This PR does not need a change note Python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants