Skip to content

In DI, cache whether a memory object is a box #37328

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 1 commit into from
May 8, 2021

Conversation

rjmccall
Copy link
Contributor

@rjmccall rjmccall commented May 7, 2021

Boxes tend to have a small number of uses, so frequently finding the unique projection isn't too bad. Non-boxes, however, can have a large number of uses: for example, a class instance has expected uses proportionate to the number of stored properties. So if we do a linear scan of the uses on a non-box instruction, we'll scale quadratically.

Fixes SR-14532.

Boxes tend to have a small number of uses, so frequently finding the
unique projection isn't too bad.  Non-boxes, however, can have a large
number of uses: for example, a class instance has expected uses
proportionate to the number of stored properties.  So if we do a linear
scan of the uses on a non-box instruction, we'll scale quadratically.

Fixes SR-14532.
@rjmccall
Copy link
Contributor Author

rjmccall commented May 7, 2021

@swift-ci Please smoke test and merge

@rjmccall
Copy link
Contributor Author

rjmccall commented May 8, 2021

@swift-ci Please test linux

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.

1 participant