並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 2 件 / 2件

新着順 人気順

c# stringbuilder appendformat exampleの検索結果1 - 2 件 / 2件

  • neue cc - UTF8文字列生成を最適化するライブラリ Utf8StringInterpolation を公開しました

    Utf8StringInterpolationという新しいライブラリを公開しました!UTF8文字列の生成と書き込みに特化していて、動作をカスタマイズした文字列補間式によるC#コンパイラの機能を活用した生成と、StringBuilder的な連続的な書き込みの両方をサポートします。 Cysharp/Utf8StringInterpolation 基本的な流れはこんな感じで、Stringを生成するのと同じように、UTF8を生成/書き込みできます。 using Utf8StringInterpolation; // Create UTF8 encoded string directly(without encoding). byte[] utf8 = Utf8String.Format($"Hello, {name}, Your id is {id}!"); // write to IBuffer

    • 【C#】StringBuilderとDefaultInterpolatedStringHandlerの処理速度・メモリ確保量を比べてみる - はなちるのマイノート

      はじめに 今回はStringBuilderとDefaultInterpolatedStringHandlerの処理速度・メモリ確保量を比べてみたいと思います。 learn.microsoft.com learn.microsoft.com 大抵のStringBuilderの利用シーン、new StringBuilderの代わりにnew DefaultInterpolatedStringHandler(0, 0)を使ったほうが良いと思うのだけど、new DefaultInterpolatedStringHandler(0, 0)という呼びづらさが微妙にそれを躊躇わせる。— neuecc (@neuecc) October 17, 2023 はじめに 概要 もうちょい詳しく 実験 結果 概要 実はDefaultInterpolatedStringHandlerをStringBuilderのよう

        【C#】StringBuilderとDefaultInterpolatedStringHandlerの処理速度・メモリ確保量を比べてみる - はなちるのマイノート
      1