The best way to find out is to test. I did a simple test:
using static System.Console;
using System.Diagnostics;
public class Program {
public static void Main() {
var x = "";
var sw = new Stopwatch();
sw.Start();
for (var i = 0; i < 10000; i++) {
x = string.Format("teste de string formatada com resultado: {0}", i + 5);
}
sw.Stop();
WriteLine(sw.ElapsedTicks);
sw.Restart();
for (var i = 0; i < 10000; i++) {
x = $"teste de string formatada com resultado: {i + 5}";
}
sw.Stop();
WriteLine(sw.ElapsedTicks);
}
}
See running on dotNetFiddle .
The best test will be done in a controlled environment and not on a shared server where you do not know what is running. I performed a few times. And overall the result was almost the same.
But it is important to note that in other standards this result may be different. This type of test only says about this specific situation, but it can be generalized. It may be that assembling the test otherwise gives a different result, even if it does the same thing. To properly test it is necessary to deeply understand the implementations to try to find the points where each stands out and fail. If the implementation changes, the test is no longer useful.
The big advantage is not speed, but simplicity and convenience.