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

Change _setindex implementation for tuples to improve constant propagation #40635

Merged
merged 9 commits into from
Jul 5, 2021
Merged

Conversation

OlivierHnt
Copy link
Contributor

Resolves #39944

@KristofferC
Copy link
Member

Would be good to add a test.

@OlivierHnt
Copy link
Contributor Author

Thank you for the feedback. I added an @inferred test which fails without this PR.

@OlivierHnt
Copy link
Contributor Author

The failure of /buildbot/tester_linux32 seems unrelated to the PR.
@KristofferC is there anything else I can do to help the reviewing process?

@OlivierHnt
Copy link
Contributor Author

OlivierHnt commented Jun 29, 2021

I would like to "revive" this PR; @KristofferC can you provide some feedback on this?

Let me give some context again: the current _setindex method relies on an arithmetic operation which prevents constant propagation for tuples with (strictly) more than 2 elements. The problem showed up in selectdim for arrays with dimension (strictly) greater than 2.

@mbauman perhaps you could review this PR since it is a faithful follow-up of your suggestion on Discourse (cf. https://discourse.julialang.org/t/selectdim-behaviour-for-arrays-of-dimension-greater-than-2/52211)?

Best regards

Note: the failure of /buildbot/package_win32 and /buildbot/package_win64 appear unrelated.

@KristofferC
Copy link
Member

KristofferC commented Jun 29, 2021

Could you try rebase this on the master branch to perhaps fix the windows CI?

When CI is green, I think this can be merged. Feel free to keep pinging if it gets forgotten again.

@OlivierHnt
Copy link
Contributor Author

OlivierHnt commented Jun 30, 2021

@KristofferC thank you for the feedback. I updated the PR in accordance with your review. All tests have passed.

@OlivierHnt
Copy link
Contributor Author

Friendly ping about the prospective merging of this PR with the master branch as suggested by @KristofferC 😊

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.

Changing _setindex(v, i::Integer, first, tail...) implementation to help constant propagation
2 participants