In similar vein of #82591, would it be possible to reduce duplication when all type parameters on a type are not relevant for type layout/size?
As an example
// or struct
class Wrapper<T>
{
public List<T> Value { get; }
}
As I understand it today this produces a new instantiation per value type for T.
I understand .NET isn't (immediately) going to support gc shapes (in the golang generics sense) as a size optimization. However this particular case seems like an analysis that can be done at the template level which can 'significantly' reduce bloat.
Is there any appetite for optimizations like these?
@MichalStrehovsky
In similar vein of #82591, would it be possible to reduce duplication when all type parameters on a type are not relevant for type layout/size?
As an example
As I understand it today this produces a new instantiation per value type for T.
I understand .NET isn't (immediately) going to support gc shapes (in the golang generics sense) as a size optimization. However this particular case seems like an analysis that can be done at the template level which can 'significantly' reduce bloat.
Is there any appetite for optimizations like these?
@MichalStrehovsky