not much more than the title says. If I do:
int[] arr = new int[(long)Math.Pow(2, 25)];
for (int j = 0; j < arr.Length; j++)
arr[j] = j;
will the compiler parallelize this code in any way? I’m asking because I see 3 of the 4 cores light up when run.
Thanks.
Simply, by default I believe that no it doesn’t; because MS.Net doesn’t.
That’s not to say that .Net isn’t firing on all your cores, but the snippet you posted should be a single thread operation.