-
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
Rewrite TagList for .NET 8+ #104132
Rewrite TagList for .NET 8+ #104132
Conversation
Renamed the existing TagList.cs file to be TagList.netfx.cs, then copied it to a TagList.netcore.cs file and rewrote the guts of it to use [InlineArray] for the embedded key/value pairs.
Tagging subscribers to this area: @tarekgh, @tommcdon, @pjanotti |
Any idea why first IndexOf regressed with Val1? would be the same for like 3 or 4 tags too? I don't think IndexOf is used much in TagList, I'm just curious about the result. |
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.
LGTM!
Thanks @stephentoub.
I don't think the IndexOf results are particularly meaningful one way or the other. It's basically just +/- a nanosecond:
|
/ba-g failures are known |
/// Using more than eight tags will cause allocating memory to store the tags. | ||
/// Public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe. | ||
/// </remarks> | ||
[StructLayout(LayoutKind.Sequential)] |
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.
@stephentoub I'm missing the reason why this is necessary.
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.
It's not. It just came along as part of the copy from from the original code and I neglected to delete it.
Renamed the existing TagList.cs file to be TagList.netfx.cs, then copied it to a TagList.netcore.cs file and rewrote the guts of it to use [InlineArray] for the embedded key/value pairs.