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

Vectorize {Last}IndexOf{Any} and {Last}IndexOfAnyExcept without code duplication #73768

Merged
merged 37 commits into from
Aug 17, 2022

Commits on Aug 11, 2022

  1. Vectorize LastIndexOf

    adamsitnik committed Aug 11, 2022
    Configuration menu
    Copy the full SHA
    9d01665 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    14224a3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d05cf56 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    22f71ff View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    bbc64e0 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    f265d28 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    b0f259c View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    7dc03c3 View commit details
    Browse the repository at this point in the history

Commits on Aug 12, 2022

  1. vectorize Contains

    adamsitnik committed Aug 12, 2022
    Configuration menu
    Copy the full SHA
    628d429 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    114ca88 View commit details
    Browse the repository at this point in the history
  3. address review from Jan, don't cast Span to ROS. Introduce new helper…

    … and avoid duplication by calling it from both Span and ROS
    adamsitnik committed Aug 12, 2022
    Configuration menu
    Copy the full SHA
    95a1b62 View commit details
    Browse the repository at this point in the history
  4. vectorize IndexOf(value)

    adamsitnik committed Aug 12, 2022
    Configuration menu
    Copy the full SHA
    ab8df3d View commit details
    Browse the repository at this point in the history
  5. rename IndexOf used only by strlen to IndexOfNullByte and optimize it…

    … to searching for zeros
    adamsitnik committed Aug 12, 2022
    Configuration menu
    Copy the full SHA
    bb13957 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    bbb7e4c View commit details
    Browse the repository at this point in the history
  7. vectorize IndexOfAny<T>(value0, value1, value2) and IndexOfAnyExcept<…

    …T>(value0, value1, value2)
    adamsitnik committed Aug 12, 2022
    Configuration menu
    Copy the full SHA
    9186b8f View commit details
    Browse the repository at this point in the history
  8. vectorize IndexOfAny<T>(value0, value1, value2, value3) and IndexOfAn…

    …yExcept<T>(value0, value1, value2, value3)
    adamsitnik committed Aug 12, 2022
    Configuration menu
    Copy the full SHA
    5a39d21 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    9099ef9 View commit details
    Browse the repository at this point in the history
  10. remove dead code

    adamsitnik committed Aug 12, 2022
    Configuration menu
    Copy the full SHA
    5661793 View commit details
    Browse the repository at this point in the history
  11. use built-in helpers

    adamsitnik committed Aug 12, 2022
    Configuration menu
    Copy the full SHA
    8cb8208 View commit details
    Browse the repository at this point in the history
  12. Revert "address review from Jan, don't cast Span to ROS. Introduce ne…

    …w helper and avoid duplication by calling it from both Span and ROS"
    
    This reverts commit 95a1b62.
    
    # Conflicts:
    #	src/libraries/System.Private.CoreLib/src/System/MemoryExtensions.cs
    adamsitnik committed Aug 12, 2022
    Configuration menu
    Copy the full SHA
    ec447c7 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    62f16c1 View commit details
    Browse the repository at this point in the history
  14. fix NativeAOT build

    adamsitnik committed Aug 12, 2022
    Configuration menu
    Copy the full SHA
    26c188d View commit details
    Browse the repository at this point in the history

Commits on Aug 13, 2022

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

Commits on Aug 14, 2022

  1. perform manual loop unrolling in order to avoid perf regression for s…

    …mall inputs
    
    use INumber instead of IEquatable to generate better codegen when comparing multiple values
    adamsitnik committed Aug 14, 2022
    Configuration menu
    Copy the full SHA
    b305c54 View commit details
    Browse the repository at this point in the history
  2. Merge remote-tracking branch 'upstream/main' into vectorizeLastIndexOf

    # Conflicts:
    #	src/libraries/System.Private.CoreLib/src/System/SpanHelpers.Char.cs
    adamsitnik committed Aug 14, 2022
    Configuration menu
    Copy the full SHA
    f954ac5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    846e4fc View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8a74f28 View commit details
    Browse the repository at this point in the history

Commits on Aug 15, 2022

  1. Configuration menu
    Copy the full SHA
    fab3143 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4274f54 View commit details
    Browse the repository at this point in the history
  3. Apply suggestions from code review

    Co-authored-by: Jan Kotas <jkotas@microsoft.com>
    adamsitnik and jkotas committed Aug 15, 2022
    Configuration menu
    Copy the full SHA
    59c867f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3049470 View commit details
    Browse the repository at this point in the history
  5. fix the build

    adamsitnik committed Aug 15, 2022
    Configuration menu
    Copy the full SHA
    afc09bd View commit details
    Browse the repository at this point in the history
  6. fix the NativeAOT build

    adamsitnik committed Aug 15, 2022
    Configuration menu
    Copy the full SHA
    efdff0e View commit details
    Browse the repository at this point in the history

Commits on Aug 16, 2022

  1. Merge remote-tracking branch 'upstream/main' into vectorizeLastIndexOf

    # Conflicts:
    #	src/libraries/System.Private.CoreLib/src/System/MemoryExtensions.cs
    #	src/libraries/System.Private.CoreLib/src/System/SpanHelpers.T.cs
    adamsitnik committed Aug 16, 2022
    Configuration menu
    Copy the full SHA
    5831e09 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7f003da View commit details
    Browse the repository at this point in the history

Commits on Aug 17, 2022

  1. address code review feedback:

    - add a failing test and fix the bug
    - remove comments
    - rename generic arguments to follow existing convention
    - rename constant to start with uppercase character
    adamsitnik committed Aug 17, 2022
    Configuration menu
    Copy the full SHA
    0dc257f View commit details
    Browse the repository at this point in the history
  2. reduce the regression for IndexOfAnyExcept(3) and LastIndexOfAnyExcep…

    …t(3) for small inputs by always calling the heavily optimized SpanHelpers.IndexOfAnyExceptValueType
    adamsitnik committed Aug 17, 2022
    Configuration menu
    Copy the full SHA
    0c6b01d View commit details
    Browse the repository at this point in the history