Does Mono C # compiler do loop parallelization at compile time?

not much more than the name says. If I do this:

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 ask because I see that 3 out of 4 cores light up at startup.

Thanks.

+4
source share
1 answer

It’s just that, by default, I think no, it’s not; because MS.Net does not.

Not to say that .Net does not shoot at all of your kernels, but the snippet you posted should be a single thread.

+3
source

All Articles