#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 was):

 > Is it because it caches or is really just better code?

 Hom is implemented by Singular when the base ring is a singular ring.
 {{{
 sage: R.<x,y>=GF(next_prime(10^9))[]
 sage: phi = R.hom([x+1,x*y])
 sage: g=x+y
 sage: print type(g)
 sage: timeit('phi(g)')
 <type
 'sage.rings.polynomial.multi_polynomial_libsingular.MPolynomial_libsingular'>
 625 loops, best of 3: 39.7 µs per loop
 sage: R.<x,y>=GF(next_prime(10^10))[]
 sage: phi = R.hom([x+1,x*y])
 sage: g=x+y
 sage: print type(g)
 sage: timeit('phi(g)')
 <class
 'sage.rings.polynomial.multi_polynomial_element.MPolynomial_polydict'>
 625 loops, best of 3: 305 µs per loop
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6482#comment:2>
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to