Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ public virtual void GetObjectData(SerializationInfo info, StreamingContext conte
}
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't this frequently result in this whole method being inlined into consumer call sites of methods like Dictionary.ContainsKey? That seems bad.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I was not suggesting this as the real fix as I said in #116045 (comment), just wanted to run benchmarks against it, but then I noticed that we already can inline it even without this attribute. I still have a small idea I want to try here (as a workaround for #116055)

internal ref TValue FindValue(TKey key)
{
if (key == null)
Expand Down
Loading