Dnia 2016-10-08, o godz. 23:55:08 Sotirios Mantziaris <smantzia...@gmail.com> napisaĆ(a):
> Please review my code for any mistakes i made and let me know. > private static void Work(int i){ > var t = string.Format("Task {0} done!", i); > } Above construct is a NOOP and almost certainly did not went to executable. Probaly even your 'for (int i = 0; i < tasks.Length; i++)' block had been optimized away, as there is no work to do as seen by compiler. So in .net version you measure only the tasks array allocation/init time: > var sw = Stopwatch.StartNew(); > var tasks = new Task[taskCount]; > sw.Stop(); In an era of multicore and aggresive optimizers microbenchmarking is moot. -- Wojciech S. Czarnecki ^oo^ OHIR-RIPE -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.