I’m having some trouble with the Parallel commands in Mathematica 12.1:

I need to construct a table where its entries are {M, Eigenvalues of X[M]}, where X is a square matrix of dimension N with N big (>3000) and M a parameter. Specifically, I do the following:

`AbsoluteTiming[BSg1P = Table[M = m; {M, #} & /@ (Eigenvalues[N[X]]), {m, -2, 2, 1}];] `

and I compare with

`AbsoluteTiming[BSg1P = ParallelTable[M = m; {M, #} & /@ (Eigenvalues[N[X]]), {m, -2, 2, 1}];] `

The computing time is similar for both cases: the difference is around 6 sec. for a total time of 300 sec., which makes no sense if the parallel evaluation is performed. Since I have 2 processors, I would expect half of the time or a considerable fraction for the computing duration.

Am I doing something wrong? Or is there something about parallelization that I don’t understand?

On the other hand, if I don’t want to use ParallelTable, is there a way to compute the eigenvalues of X[M] in a faster parallel form?

Thanks.