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

[release/7.0-rc1] Optimized string.Replace(char, char) #74047

Merged
merged 11 commits into from
Aug 17, 2022

Commits on Aug 17, 2022

  1. Optimized string.Replace(char, char) vector code path

    gfoidl authored and github-actions committed Aug 17, 2022
    Configuration menu
    Copy the full SHA
    090f739 View commit details
    Browse the repository at this point in the history
  2. Optimized code pathes even further

    gfoidl authored and github-actions committed Aug 17, 2022
    Configuration menu
    Copy the full SHA
    d366d93 View commit details
    Browse the repository at this point in the history
  3. Do vectorized operation at the end of the string only once

    When the remaining length is a multiple of the vector size, then the remainder is processed twice. This is redundant, and not needed.
    This commit changes that, so that the remainder is processed only once when the remaining elements match.
    gfoidl authored and github-actions committed Aug 17, 2022
    Configuration menu
    Copy the full SHA
    b4dcd15 View commit details
    Browse the repository at this point in the history
  4. Don't use trick for collapsed epilogs

    gfoidl authored and github-actions committed Aug 17, 2022
    Configuration menu
    Copy the full SHA
    424f16b View commit details
    Browse the repository at this point in the history
  5. Handle remainder vectorized even if remainingLength <= Vector<ushort>…

    ….Count and added tests for this
    gfoidl authored and github-actions committed Aug 17, 2022
    Configuration menu
    Copy the full SHA
    98c3f6a View commit details
    Browse the repository at this point in the history
  6. Introduce (internal) Vector.LoadUnsafe and Vector.StoreUnsafe and use…

    … it in string.Replace(char, char)
    gfoidl authored and github-actions committed Aug 17, 2022
    Configuration menu
    Copy the full SHA
    0a395c0 View commit details
    Browse the repository at this point in the history
  7. Avoid Unsafe.As<char, ushort> reinterpret casts by introducing string…

    ….GetRawStringDataAsUshort() internal method
    gfoidl authored and github-actions committed Aug 17, 2022
    Configuration menu
    Copy the full SHA
    c5f4740 View commit details
    Browse the repository at this point in the history
  8. Fixed copy/paste error (from local dev to repo)

    gfoidl authored and github-actions committed Aug 17, 2022
    Configuration menu
    Copy the full SHA
    5686225 View commit details
    Browse the repository at this point in the history
  9. PR Feedback

    gfoidl authored and github-actions committed Aug 17, 2022
    Configuration menu
    Copy the full SHA
    d875e1f View commit details
    Browse the repository at this point in the history
  10. Fixed bug and added tests for this

    gfoidl authored and github-actions committed Aug 17, 2022
    Configuration menu
    Copy the full SHA
    d011202 View commit details
    Browse the repository at this point in the history
  11. Make condition about lengthToExamine clearer as suggested

    gfoidl authored and github-actions committed Aug 17, 2022
    Configuration menu
    Copy the full SHA
    7b8adce View commit details
    Browse the repository at this point in the history