# NSolve V12.1.1 much slower than V6.0 for the same polynomial system [closed]

We are solving polynomial systems with real coefficients using NSolve. A typical system is attached below. The problem we have is that Mathematica V12.1.1 solves it 17 times slower than V6.0, see the timing at the bottom. Please advise how can we set up the solver of V12.1.1 to keep the original speed of V6.0.

Edit: it seems that the result depends on the operating system. On our Linux machines with Mathematica V12.1.1, V12.0, V11.0.1 the timing is close to 0.4s, with V6.0 its about 0.02s. On Windows machines the solution for new versions is much faster, see comments below. Can someone cross-check the result on Linux machines?

Kind regards, Igor.

    sys={-117.272 th1 - 3 (50247. th1^3 th2 - 0.000722737 th3) -
0.722164 th1 th3 - 4.00204 th1^2 th3 - 64.5104 th1 th4 -
2.59918 th1^2 th4 - 0.0610914 th1 th5 +
2.93453*10^-6 (1 - th1 - th2 - th3 - th4 - th5 - th6) +
0.0952963 th6,
-0.837066 th2 - 50247. th1^3 th2 + 0.000722737 th3 +
1.63033 (1 - th1 - th2 - th3 - th4 - th5 - th6),
50247. th1^3 th2 - 0.000722737 th3 - 0.722164 th1 th3 -
2.00102 th1^2 th3,
0.722164 th1 th3 - 64.5104 th1 th4 - 1.29959 th1^2 th4,
2.00102 th1^2 th3 + 64.5104 th1 th4 - 0.00740945 th5 -
0.0610914 th1 th5, 4.7592*10^-9 th1 - 0.0952963 th6}
NSolve[sys==0,{th1, th2, th3, th4, th5, th6}] // Timing

(* Timing results (sec): V12.1.1 0.442152, V6.0 0.025431 *)

• Use V6.0 only. My setup :).Using V12.2.0 I have time:0.03125 – Mariusz Iwaniuk Apr 7 at 13:48
• I see 0.077s in MMA 12.0 on laptop, and 0.12s in MMA 12.2 on the cloud. I cannot find a system that reproduces your slow timing, but I do not have MMA 12.1 installed anywhere to try. – MarcoB Apr 7 at 14:08
• With v12.1.1.0 for Windows we got 0.015625 , with v.12.0 - 0.03125, and v.12.2 - 0.03125. Version 12.1 looks faster, but computers are different. – Alex Trounev Apr 7 at 15:10
• I obtain 0.0625 sec on my weak comp with 12.2 on Winows 10 Pro. – user64494 Apr 7 at 15:17
• I think it has to do with a change in default method. Could add Method->"EndomorphismMatrix" and that might affect the speed. – Daniel Lichtblau Apr 7 at 18:15

• I obtain 0.081 sec by default and 0.106 sec with Method -> "EndomorphismMatrix" (Mathematica 12.2 on Windows 10). – Alexey Popkov Apr 11 at 5:46