Skip to content

Instantly share code, notes, and snippets.

View ledbutter's full-sized avatar

Sven Grosen ledbutter

View GitHub Profile
@ledbutter
ledbutter / gist:d51bdb8f1ef81fcc7e6c
Created August 13, 2015 14:22
Compare String.Join and Aggregate()
IEnumerable<string> values = Enumerable.Repeat("Foo", 100);
Stopwatch watch = new Stopwatch();
watch.Start();
Console.WriteLine(String.Join("<br/>", values));
Console.WriteLine("Performance with Join: {0}", watch.Elapsed);
// "Performance with Join: 00:00:00.0001146"