During an analysis about memory allocations in an ASP.NET Core service (github/dotnet/extensions#693), I have found that there is maybe an optimization in (at least) object construction by reflection.
When constructing an object by reflection, the method MethodBase.CheckArguments() seems to duplicate the parameters (copyOfParameters) because they may be changed by CheckValue(). But this method seems to just return the value as-is in the normal cases. So isn't it possible to do a "lazy allocation" only if necessary?
/cc @pakrym