You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was hoping this implementation would produce an inline constant value at runtime via the JIT. However, I'm seeing calls to SegmentedArrayHelper.GetSegmentShift<T> in runtime profiling traces. I tried using SharpLab to find a better way to generate these, but my ideas so far rely on static constructors which are not supported by its assembly output feature.
This property always returns a constant value for a given
T:https://github.com/dotnet/roslyn/blob/6d527c3fb4b223f35bca50d364f46ac3732c4a76/src/Dependencies/Collections/SegmentedArray%601.cs#L33-L40
It relies on these helpers to produce the constant value:
https://github.com/dotnet/roslyn/blob/6d527c3fb4b223f35bca50d364f46ac3732c4a76/src/Dependencies/Collections/Internal/SegmentedArrayHelper.cs#L26-L37
https://github.com/dotnet/roslyn/blob/6d527c3fb4b223f35bca50d364f46ac3732c4a76/src/Dependencies/Collections/Internal/SegmentedArrayHelper.cs#L138
https://github.com/dotnet/roslyn/blob/6d527c3fb4b223f35bca50d364f46ac3732c4a76/src/Dependencies/Collections/Internal/SegmentedArrayHelper.cs#L145
I was hoping this implementation would produce an inline constant value at runtime via the JIT. However, I'm seeing calls to
SegmentedArrayHelper.GetSegmentShift<T>in runtime profiling traces. I tried using SharpLab to find a better way to generate these, but my ideas so far rely on static constructors which are not supported by its assembly output feature.