Skip to content

[stdlib] Unchecked subscript on UnsafeBufferPointer #20767

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

Conversation

milseman
Copy link
Member

@milseman milseman commented Nov 26, 2018

Add a use an unchecked subscript on UnsafeBufferPointer, which skips
debugPrecondition checks (in case we're not inlined) as well as a
force-unwrap check.

Cherry-pick of #20621

Add a use an unchecked subscript on UnsafeBufferPointer, which skips
debugPrecondition checks (in case we're not inlined) as well as a
force-unwrap check.
@milseman milseman requested a review from a team as a code owner November 26, 2018 19:44
@milseman
Copy link
Member Author

@swift-ci please test

@milseman
Copy link
Member Author

@airspeedswift This change is beneficial, and not taking it will cause merge-conflict headaches in the future when we cherry-pick better string comparison and normalization.

@milseman
Copy link
Member Author

@apple/swift5-branch-managers

  • Convergence

This change is not critical for convergence, but should be incorporated in the eventual release and will be a critical part of future performance work that we will definitely want to cherry-pick (better string comparison). We can take this now, or wait for the later changes that build on this.

  • ABI impact

This is ABI-additive, hence no change to the checker test file.

@airspeedswift airspeedswift merged commit ab79b16 into swiftlang:swift-5.0-branch Nov 28, 2018
@milseman milseman deleted the 5_0_unsafe_unchecked_buffer_pointer branch November 28, 2018 17:35
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