Some quick and sometimes dirty C# code to evaluate the performance difference between various approaches.