-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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 inline Vector{128|256}.Create for constants #54827
Conversation
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
@@ -120,9 +120,11 @@ public BitArray(byte[] bytes) | |||
_version = 0; | |||
} | |||
|
|||
#if !NET6_0_OR_GREATER |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these ifdefs needed... isn't this file only compiled for netcoreappcurrent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't this file only compiled for netcoreappcurrent?
This is the point I don't know (alluded in the description).
But if so, I'll just remove them.
My point is just to make sure that .NET Core 3.1 doesn't regress, as it's a LTS through Dec, 2022.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They're not needed. This file is only included in System.Collections.csproj, which only builds for netcoreappcurrent:
<TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks> |
Base64Decoder/Encoder.cs are only included in System.Memory, which only builds for netcoreappcurrent:
<TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! 👍🏻
src/libraries/System.Memory/src/System/Buffers/Text/Base64Decoder.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Memory/src/System/Buffers/Text/Base64Encoder.cs
Outdated
Show resolved
Hide resolved
It's only built for NetCoreAppCurrent, so no need to special case older runtimes.
Hello @tannergooding! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
Fixes #44115
Used
Vector(128|256)<\w+> \w+ =
as regex-search, seems that these three places are the onley one left.The SSE-helper, that are mentioned in the issue, got re-written by @GrabYourPitchforks some time ago, and there patterns for the new codegen is already used.
Codegen was validated (manually) to see that it's an improvement.
It's not clear to me whether the touched codes are built for .NET Core 3.1 or not. So I added conditional compilation, as for .NET Core 3.1 the codegen is quite worse when Vector{128|256}.Create is used (that's why we initially had the different patterns before the JIT started to emit constants and read them from the data-segment).
/cc: @tannergooding