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

[string] String(decoding:as:) fast path for withContiguousStorageIfAvailable #30729

Merged
merged 6 commits into from
Apr 10, 2020

Commits on Apr 9, 2020

  1. Configuration menu
    Copy the full SHA
    19b332c View commit details
    Browse the repository at this point in the history
  2. [string] _HasContiguousBytes -> withContiguousStorageIfAvailable

    Switch String(decoding:as) and other entry points to call
    withContiguousStorageIfAvailable rather than use _HasContiguousBytes.
    milseman committed Apr 9, 2020
    Configuration menu
    Copy the full SHA
    c263100 View commit details
    Browse the repository at this point in the history
  3. [string] Outline cold path from initializer

    Outline the cold, non-contiguous UTF-8 path from String(decoding:as:),
    saving ~40 bytes (33%) of code size (x86_64 and arm64) from every call
    site where the contiguity check cannot be constant folded away.
    milseman committed Apr 9, 2020
    Configuration menu
    Copy the full SHA
    e536ad2 View commit details
    Browse the repository at this point in the history
  4. [string] Restore _HasContiguousBytes for untyped storage

    UnsafeRawBufferPointer cannot implement
    withContiguousStorageIfAvailable because doing so would potentially
    create a typed pointer from untyped data.
    milseman committed Apr 9, 2020
    Configuration menu
    Copy the full SHA
    ae224ca View commit details
    Browse the repository at this point in the history

Commits on Apr 10, 2020

  1. Configuration menu
    Copy the full SHA
    d02f5bc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    38fce16 View commit details
    Browse the repository at this point in the history