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

Optimized string.Replace(char, char) #67049

Merged
merged 13 commits into from
Aug 17, 2022

Commits on Mar 22, 2022

  1. Configuration menu
    Copy the full SHA
    549d7c4 View commit details
    Browse the repository at this point in the history

Commits on Mar 23, 2022

  1. Configuration menu
    Copy the full SHA
    7dfe855 View commit details
    Browse the repository at this point in the history

Commits on Apr 13, 2022

  1. Configuration menu
    Copy the full SHA
    5232726 View commit details
    Browse the repository at this point in the history
  2. 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 committed Apr 13, 2022
    Configuration menu
    Copy the full SHA
    a442549 View commit details
    Browse the repository at this point in the history

Commits on Jul 20, 2022

  1. Configuration menu
    Copy the full SHA
    4e99ac4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    30889ac View commit details
    Browse the repository at this point in the history
  3. Handle remainder vectorized even if remainingLength <= Vector<ushort>…

    ….Count and added tests for this
    gfoidl committed Jul 20, 2022
    Configuration menu
    Copy the full SHA
    8627f6f View commit details
    Browse the repository at this point in the history
  4. Introduce (internal) Vector.LoadUnsafe and Vector.StoreUnsafe and use…

    … it in string.Replace(char, char)
    gfoidl committed Jul 20, 2022
    Configuration menu
    Copy the full SHA
    ed83650 View commit details
    Browse the repository at this point in the history
  5. Avoid Unsafe.As<char, ushort> reinterpret casts by introducing string…

    ….GetRawStringDataAsUshort() internal method
    gfoidl committed Jul 20, 2022
    Configuration menu
    Copy the full SHA
    5d92816 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    0ee90f4 View commit details
    Browse the repository at this point in the history

Commits on Aug 15, 2022

  1. PR Feedback

    gfoidl committed Aug 15, 2022
    Configuration menu
    Copy the full SHA
    0a7ca74 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c65192a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    35679cb View commit details
    Browse the repository at this point in the history