Open
Description
It's not always possible to make the right choice between size and speed when different implementations exist or are possible. For now, we hardcode that logic based on the runtime pack but that's not optimal. It's hard to test and it's not always the right choice as some scenarios can prefer size over-speed or vice versa based on the developer's need.
Examples, where this could apply, are
- LINQ implementation (hardcoded for browser only)
- JSON implementation (not supported right now 59c60c6)
The proposed API could like like with AppContext settings and feature switch supported as well.
namespace System.Runtime.CompilerServices
{
public static partial class RuntimeFeature
{
public static bool IsSizeOptimized { get; }
}
}
Note: There could be a better place/type where to put the property