I am curious. A script is a web application / website, for example. 100 simultaneous connections and many (20?) Page loads per second.
If the application requires a formatted string server
string.Format("Hello, {0}", username);
Will there be an interval between "Hello, {0}"? Or he will only be interned with
string hello = "Hello, {0}";
string.Format(hello, username);
What about internment will give better performance: higher or,
StringBuilder builder = new StringBuilder()
builder.Append("Hello, ");
builder.Append(username);
or even
string hello = "Hello, {0}";
StringBuilder builder = new StringBuilder()
builder.Append("Hello, ");
builder.Append(username);
So, my main questions: 1) Will the string string.Format be interpolated 2) Is it worth it to set the variable name for the string constructor for a quick search, or 3) Is the viewing itself quite difficult (if No. 1 is above, no)
I understand that this is likely to lead to small gains, but, as I said, I'm curious.