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

Use PackedIndexOfIsSupported checks in more places #80254

Commits on Jan 5, 2023

  1. Use PackedIndexOfIsSupported checks in more places

    This should avoids the size regression on WebAssembly and possibly other
    platforms without Sse2.
    
    The regression is side effect of dotnet#78861
    which uses `PackedSpanHelpers.CanUsePackedIndexOf (!!T)` and TShouldUsePacked.Value
    to guard the usage of PackedSpanHelpers.
    
    Because these involve generics, illinker is unable to link
    the PackedSpanHelpers type away and that pulls other parts in, like
    System.Runtime.Intrinsics.X86.* types. See https://gist.github.com/radekdoulik/c0b52247d472f69bcf983ade78a924ea
    for more complete list.
    
    This change gets us back 9,216 bytes in the case of app used to repro
    the regression.
    
        ...
          -             Type System.PackedSpanHelpers
          -             Type System.Runtime.Intrinsics.X86.X86Base
          -             Type System.Runtime.Intrinsics.X86.Sse
          -             Type System.Runtime.Intrinsics.X86.Sse2
        Summary:
          -       9,216 File size -0.76% (of 1,215,488)
          -       2,744 Metadata size -0.43% (of 636,264)
          -           4 Types count
    radekdoulik committed Jan 5, 2023
    Configuration menu
    Copy the full SHA
    7f93bd6 View commit details
    Browse the repository at this point in the history
  2. Update src/libraries/System.Private.CoreLib/src/System/IndexOfAnyValu…

    …es/IndexOfAnyValues.cs
    
    Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com>
    radekdoulik and MihaZupan committed Jan 5, 2023
    Configuration menu
    Copy the full SHA
    26ba175 View commit details
    Browse the repository at this point in the history
  3. Update src/libraries/System.Private.CoreLib/src/System/IndexOfAnyValu…

    …es/IndexOfAnyValues.cs
    
    Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com>
    radekdoulik and MihaZupan committed Jan 5, 2023
    Configuration menu
    Copy the full SHA
    1690674 View commit details
    Browse the repository at this point in the history

Commits on Jan 6, 2023

  1. Feedback

    radekdoulik committed Jan 6, 2023
    Configuration menu
    Copy the full SHA
    e99a140 View commit details
    Browse the repository at this point in the history