I am experiencing very different running times when using different OSs. It seems the problem is related with parallelization routine. For example, I got the following times for the code attached.
{126.601112, "9.0 for Mac OS X x86 (64-bit)"} @ MacBook Pro i7-2.3GHz, 8GB DDR3 {177.238, "10.3.1 for Microsoft Windows (64-bit)"} @ i7-5930K 3.5GHz, 64GB DDR4 {454.222, "10.3.0 for Linux x86 (64-bit)"} @ i7-5930K 3.5GHz, 64GB DDR4
Notice that the fastest case occurs for a 3-year old machine running Mathematica 9.0 and that all kernels are 64bit.
Does anyone have a clue about what is going on?
Thanks.
AbsoluteTiming[
v0 = {0., 1.};
\[CapitalDelta]0 = 100.;
\[CapitalOmega] = 37.33;
H[t_] := - \[CapitalDelta]0 Sin[
2 \[Pi] \[CapitalOmega] t] PauliMatrix[1];
\[Delta]t = 10^-4;
u = IdentityMatrix[2];
Nsteps = 5000;
U = Reap[
Do[u = MatrixExp[-I N[(2 \[Pi] \[Delta]t)] H[N[ii \[Delta]t]] ].u;
Sow[u], {ii, 1, Nsteps}]][[2, 1]];
PrependTo[U, IdentityMatrix[2]];
u00 = ParallelTable[{{t, tp} // N,
v0.U[[t/\[Delta]t + 1]].ConjugateTranspose[
U[[tp/\[Delta]t + 1]]].v0}, {t, 0,
Nsteps \[Delta]t, \[Delta]t}, {tp, 0,
Nsteps \[Delta]t, \[Delta]t}];
StringTake[$Version, StringPosition[$Version, ")"][[1, 1]]]]