id summary reporter owner description type status priority milestone component resolution keywords cc merged author reviewer upstream work_issues branch commit dependencies stopgaps
8158 efficiency problem with polynomials (SymbolicRing vs PolynomialRing) zimmerma tbd "Consider the following example:
{{{
sage: var('a,b,c')
(a, b, c)
sage: time d=expand((a+b+c+1)^100)
CPU times: user 2.45 s, sys: 0.07 s, total: 2.52 s
Wall time: 2.53 s
}}}
I thought it would be more efficient to use PolynomialRing(),
but it is not:
{{{
sage: P. = PolynomialRing(QQ)
sage: time d=(a+b+c+1)^100
CPU times: user 10.28 s, sys: 0.07 s, total: 10.35 s
Wall time: 12.59 s
}}}
However if one wants to factor d, then PolynomialRing is faster
(SymbolicRing seems to loop forever):
{{{
sage: time e = d.factor()
CPU times: user 28.87 s, sys: 0.36 s, total: 29.23 s
Wall time: 34.20 s
}}}" enhancement new major sage-wishlist performance N/A