1 solution

Solution 1

I'm not surprised: there is a both an extra loop in the parallel version:

for (int j = 1; j < t.Length; j++)
{
if (x < t[j])
{
x = t[j];
}
}

And the parallel portion is only four iterations and there is the extra thread startup overhead on top.

Depending on the number of cores you have, and the other activity of the system, you may (or may not) get any real parallel processing - it could end up as sequential on the same core if no other cores are available to take the load.