using System.Diagnostics;
public static void Main()
Stopwatch s = Stopwatch.StartNew();
var hello = "Hello".AsSpan();
var space = " ".AsSpan();
var world = "World".AsSpan();
char[] buffer = new char[hello.Length + space.Length + world.Length];
var span = new Span<char>(buffer);
hello.CopyTo(span.Slice(index, hello.Length));
space.CopyTo(span.Slice(index, space.Length));
world.CopyTo(span.Slice(index, world.Length));
string result = span.ToString();
Console.WriteLine("Time elapsed (ns): {0}", s.Elapsed.TotalMilliseconds * 1000000);