Skip to content

stdlib: force inlining of ContiguousArray.endIndex and ContiguousArray._getCount #65612

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 3, 2023

Conversation

eeckstein
Copy link
Contributor

This lets the optimizer generate efficient code for generic array loops (note that generic functions are not inlined by default). Note that the same change is not done for Array because this might increase code size due to Array's bridging code.

rdar://108746069

…y._getCount

This let the optimizer generate efficient code for generic array loops (note that generic functions are not inlined by default).
Note that the same change is not done for `Array` because this might increase code size due to Array's bridging code.

rdar://108746069
@eeckstein
Copy link
Contributor Author

@swift-ci benchmark

@eeckstein
Copy link
Contributor Author

@swift-ci test

@eeckstein eeckstein requested a review from lorentey May 3, 2023 14:12
Copy link
Member

@lorentey lorentey 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! 👍

(Also, til non-specialized generic function calls won't get inlined. That's useful to know!)

@eeckstein eeckstein merged commit 607f4eb into swiftlang:main May 3, 2023
@eeckstein eeckstein deleted the inline-array-count branch May 3, 2023 19:09
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