File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
tests/LinkDotNet.StringBuilder.Benchmarks Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,17 @@ namespace LinkDotNet.StringBuilder.Benchmarks;
55[ MemoryDiagnoser ]
66public 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 {
You can’t perform that action at this time.
0 commit comments