Which of the following calls allocates more garbage?
void LogParams(string format, params object[] args)
{
}
void LogArgs(string format, object arg0, object arg1, object arg2)
{
}
LogParams("Hello, {0}, {1}, {2}", "Tom", "Dick", "Harry");
LogArgs("Hello, {0}, {1}, {2}", "Tom", "Dick", "Harry");
Background is looking into how I can optimise log messages that eventually boil down to string.Format() calls, however many of the log messages are essentially just joining strings together.