-
-
Save ChrisKulesza/c1b08ab2648780acd36a4b6bd156e85c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var sw = new System.Diagnostics.Stopwatch(); | |
var x = new []{"foo","bar","baz"}; | |
sw.Start(); | |
foreach(var iterations in Enumerable.Range(1,10000000)) | |
{ | |
var result = x.Aggregate ((a,s)=>a+ ", " + s); | |
} | |
sw.ElapsedMilliseconds.Dump(); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var sw = new System.Diagnostics.Stopwatch(); | |
var x = new []{"foo","bar","baz"}; | |
sw.Start(); | |
foreach(var iterations in Enumerable.Range(1,10000000)) | |
{ | |
var result = string.Join(", ",x); | |
} | |
sw.ElapsedMilliseconds.Dump(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment