Skip to content

Commit 7331bfc

Browse files
committed
Readded Benchmark
1 parent 607133b commit 7331bfc

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/LinkDotNet.StringBuilder.Benchmarks/AppendBenchmark.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ namespace LinkDotNet.StringBuilder.Benchmarks;
55
[MemoryDiagnoser]
66
public class AppendBenchmarks
77
{
8+
[Benchmark(Baseline = true)]
9+
public string DotNetStringBuilder()
10+
{
11+
var builder = new System.Text.StringBuilder();
12+
builder.AppendLine("That is the first line of our benchmark.");
13+
builder.AppendLine("We can multiple stuff in here if want.");
14+
builder.AppendLine("The idea is that we can resize the internal structure from time to time.");
15+
builder.AppendLine("We can also add other Append method if we want. But we keep it easy for now.");
16+
return builder.ToString();
17+
}
18+
819
[Benchmark]
920
public string ValueStringBuilder()
1021
{

0 commit comments

Comments
 (0)