These four commands
ParallelSum[Prime[i]^2, {i, 1, 10000} ] // AbsoluteTiming
ParallelSum[Prime[i] + Prime[i + 1], {i, 1, 10000} ] // AbsoluteTiming
ParallelSum[ Prime[i] + Prime[i + 1] + Prime[i + 2], {i, 1, 10000} ] //
AbsoluteTiming
ParallelSum[Prime[i] + Prime[i + 1] + Prime[i + 2] + Prime[i + 3], {i, 1,
10000} ] // AbsoluteTiming
gives out nearly the same time.
but when I change 10000 to 100000
ParallelSum[Prime[i]^2, {i, 1, 100000} ] // AbsoluteTiming
ParallelSum[Prime[i] + Prime[i + 1], {i, 1, 100000} ] // AbsoluteTiming
ParallelSum[
Prime[i] + Prime[i + 1] + Prime[i + 2], {i, 1, 100000} ] // AbsoluteTiming
ParallelSum[Prime[i] + Prime[i + 1] + Prime[i + 2] + Prime[i + 3], {i, 1,
100000} ] // AbsoluteTiming
what makes the difference?

ParalellSumandPrimeis not especially constructive in order to understand the underlying issues.Primeis based onPrimePiwhich uses so called Lagaris Miller Odlyzko method finding primes. This is a sophisticated algorithm using sparse caching and sieving. You should perform extensive analysis for much larger numbers. There is yet another issue related toPrimewhich has quite different timings. You should carefully test this post What is so special about Prime? – Artes Feb 06 '20 at 12:07Parallel.... The argument might have a great influence on the parameters. I would suggest forcing as many parameters as possible to ensure a fair comparison. See e.g. https://mathematica.stackexchange.com/questions/55242/sudden-increase-in-timing-when-summing-over-250-entries/ – anderstood Feb 06 '20 at 13:53