Sen descrición

tokarskiy 421143e60c Обновить 'README.md' %!s(int64=4) %!d(string=hai) anos
LICENSE 860dd720a7 Initial commit %!s(int64=4) %!d(string=hai) anos
Program.cs 0ab0a14690 Обновить 'Program.cs' %!s(int64=4) %!d(string=hai) anos
Program2.cs bfb3803b9f Добавить 'Program2.cs' %!s(int64=4) %!d(string=hai) anos
README.md 421143e60c Обновить 'README.md' %!s(int64=4) %!d(string=hai) anos

README.md

DotnetStringConcatBenchmark


Program.cs

This program measures productivity of concatenation of 10000 strings performed by different methods:

  1. Plus operator (PlusOperatorConcatTest)
  2. String.Join with entering capacity (FixedListConcatTest)
  3. String.Join without entering capacity (UnfixedListConcatTest)
  4. StringBuilder with entering capacity (FixedStringBuilderTest)
  5. StringBuilder without entering capacity (UnfixedStringBuilderTest)

Result:


Program2.cs

This program measures productivity of concatenation of small number of strings

  1. Plus operator (PlusOperatorConcatTest)
  2. String with dollar (DollarSign)
  3. String.Format (StringFormat)
  4. StringBuilder per each iteration (StringBuilder)
  5. StringBuilder pooling (ClearableStringBuilder)

Result: