using System.Diagnostics;
public static void Main()
var bytes = new byte[0x1000000];
var source = new MemoryStream();
source.Write(bytes, 0, bytes.Length);
var sw = new Stopwatch();
var dest = new MemoryStream();
Console.Write($"{(float)sw.ElapsedTicks / Stopwatch.Frequency * 1000:#,0.00}ms");