2024-03-15から1日間の記事一覧
【C#】string.FormatとDefaultInterpolatedStringHandlerで処理速度・GC.Allocの差を計測してみる(string.Formatはボックス化の可能性あり)
はじめに 今回はstring.FormatとDefaultInterpolatedStringHandlerで処理速度・Allocationの優劣を調べてみようと思います。learn.microsoft.comlearn.microsoft.com結論から言うとDefaultInterpolatedStringHandlerが優秀です。(C#10から補完文字列(interpo…