Possibly the problem is that MPolynomial.gcd calls UniqueFactorizationDomains.ParentMethods._gcd_univariate_polynomial, which recurses on MPolynomial.gcd, but the setup done by MPolynomial.gcd is possibly not cheap.
On Sunday 3 November 2024 at 12:31:44 UTC+1 Martin R wrote: > Are the following timings to be expected? > > sage: R = SymmetricFunctions(QQ).h().fraction_field() > sage: P = PolynomialRing(R, 200, "x") > sage: e = P.gen(199); e > x199 > sage: %time e.gcd(e) > CPU times: user 41.1 s, sys: 2.24 s, total: 43.4 s > Wall time: 43.5 s > x199 > > sage: R = QQ > sage: P = PolynomialRing(R, 200, "x") > sage: e = P.gen(199); e > x199 > sage: %time e.gcd(e) > CPU times: user 41 µs, sys: 0 ns, total: 41 µs > Wall time: 47 µs > x199 > > sage: R = QQbar > sage: P = PolynomialRing(R, 200, "x") > sage: e = P.gen(199); e > x199 > sage: %time e.gcd(e) > CPU times: user 3.02 s, sys: 183 ms, total: 3.2 s > Wall time: 3.21 s > x199 > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/sage-devel/a55b551e-ebdb-4df1-bca2-fccef16238c1n%40googlegroups.com.