#6482: multivariate polynomial substitution has a design flaw
---------------------------------+------------------------------------------
Reporter: was | Owner: malb
Type: defect | Status: new
Priority: critical | Milestone: sage-4.1.1
Component: commutative algebra | Keywords:
Reviewer: | Author:
Merged: |
---------------------------------+------------------------------------------
Comment(by malb):
So it is {{{_im_gens_}}} in {{{MPolynomial_libsingular}}} then (sorry for
not checking myself earlier).
It seems the most straight-forward implementation possible including the
comment {{{#TODO: very slow}}} in {{{_im_gens_}}} wins for small examples,
but for bigger ones we get:
{{{
sage: P.<a,b,c,d,e> = PolynomialRing(QQ)
sage: f = P.random_element(degree=3,terms=50)
sage: g = {a:b,b:c,c:d,d:e,e:a}
sage: %timeit f.subs(g)
10000 loops, best of 3: 138 µs per loop
}}}
{{{
sage: phi = P.hom([b,c,d,e,a])
sage: %timeit phi(f)
1000 loops, best of 3: 893 µs per loop
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6482#comment:3>
Sage <http://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
-~----------~----~----~----~------~----~------~--~---