#8158: efficiency problem with polynomials (SymbolicRing vs PolynomialRing)
-----------------------------------+----------------------------------------
Reporter: zimmerma | Owner: malb
Type: defect | Status: new
Priority: major | Milestone: sage-4.3.2
Component: commutative algebra | Keywords:
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
-----------------------------------+----------------------------------------
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.<a,b,c> = 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
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8158>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.