Skip to content

Conversation

LucianoPAlmeida
Copy link
Contributor

Minor NFC changing the member type. Seems like TinyPointerVector is only for pointers, so a SmallVector should be good in this case.

@LucianoPAlmeida
Copy link
Contributor Author

@swift-ci Please smoke test

@LucianoPAlmeida
Copy link
Contributor Author

@swift-ci please smoke test MacOS Platform

@LucianoPAlmeida
Copy link
Contributor Author

@swift-ci please smoke test Linux Platform

@LucianoPAlmeida
Copy link
Contributor Author

@swift-ci please smoke test MacOS Platform

Copy link
Contributor

@xedin xedin left a comment

Choose a reason for hiding this comment

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

I think the idea was to change it to store Component * in a TinyPtrVector (which allocates a single element on stack) because (currently) only components with one-way constraints could be co-dependent, this would be less expensive than SmallVector<unsigned, 2> in majority of cases which wouldn't have any dependencies at all.

@LucianoPAlmeida LucianoPAlmeida force-pushed the nfc-minor-fixme-cg branch 2 times, most recently from dced2c6 to 2d3c72e Compare November 8, 2020 22:45
@LucianoPAlmeida
Copy link
Contributor Author

I think the idea was to change it to store Component * in a TinyPtrVector (which allocates a single element on stack) because (currently) only components with one-way constraints could be co-dependent, this would be less expensive than SmallVector<unsigned, 2> in majority of cases which wouldn't have any dependencies at all.

That makes sense thanks @xedin, I made the changes :)

@LucianoPAlmeida LucianoPAlmeida requested a review from xedin November 8, 2020 23:56
Copy link
Contributor

@xedin xedin left a comment

Choose a reason for hiding this comment

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

Looks good! A couple of minor suggestions regarding naming and keep in mind that instead of returning a reference that it's better to return ArrayRef when possible.

@LucianoPAlmeida LucianoPAlmeida force-pushed the nfc-minor-fixme-cg branch 2 times, most recently from 4006882 to 3494233 Compare November 9, 2020 17:24
@LucianoPAlmeida
Copy link
Contributor Author

keep in mind that instead of returning a reference that it's better to return ArrayRef when possible.

Awesome, Thank you!

All adjustments applied

@LucianoPAlmeida
Copy link
Contributor Author

@swift-ci Please smoke test

Copy link
Contributor

@xedin xedin left a comment

Choose a reason for hiding this comment

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

Thank you!

@LucianoPAlmeida
Copy link
Contributor Author

@swift-ci Please smoke test

@LucianoPAlmeida
Copy link
Contributor Author

@swift-ci please smoke test MacOS Platform

@LucianoPAlmeida LucianoPAlmeida merged commit 983d9b3 into swiftlang:main Nov 10, 2020
@LucianoPAlmeida LucianoPAlmeida deleted the nfc-minor-fixme-cg branch November 10, 2020 03:29
@LucianoPAlmeida
Copy link
Contributor Author

Thanks @xedin!

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.

2 participants